// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.streamanalytics.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.streamanalytics.models.ErrorResponse;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Describes the status of the test operation along with error information, if applicable. */
@Immutable
public final class ResourceTestStatusInner {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceTestStatusInner.class);

    /*
     * The status of the test operation.
     */
    @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
    private String status;

    /*
     * Describes the error that occurred.
     */
    @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
    private ErrorResponse error;

    /**
     * Get the status property: The status of the test operation.
     *
     * @return the status value.
     */
    public String status() {
        return this.status;
    }

    /**
     * Get the error property: Describes the error that occurred.
     *
     * @return the error value.
     */
    public ErrorResponse error() {
        return this.error;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (error() != null) {
            error().validate();
        }
    }
}
