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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.exception.ManagementError;
import com.azure.resourcemanager.mediaservices.models.AsyncOperationStatus;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The status of an async operation. */
@Fluent
public final class AsyncOperationResultInner {
    /*
     * The error object
     */
    @JsonProperty(value = "error")
    private ManagementError error;

    /*
     * Operation Id of the async operation.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Operation status of the async operation.
     */
    @JsonProperty(value = "status")
    private AsyncOperationStatus status;

    /** Creates an instance of AsyncOperationResultInner class. */
    public AsyncOperationResultInner() {
    }

    /**
     * Get the error property: The error object.
     *
     * @return the error value.
     */
    public ManagementError error() {
        return this.error;
    }

    /**
     * Set the error property: The error object.
     *
     * @param error the error value to set.
     * @return the AsyncOperationResultInner object itself.
     */
    public AsyncOperationResultInner withError(ManagementError error) {
        this.error = error;
        return this;
    }

    /**
     * Get the name property: Operation Id of the async operation.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Operation Id of the async operation.
     *
     * @param name the name value to set.
     * @return the AsyncOperationResultInner object itself.
     */
    public AsyncOperationResultInner withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the status property: Operation status of the async operation.
     *
     * @return the status value.
     */
    public AsyncOperationStatus status() {
        return this.status;
    }

    /**
     * Set the status property: Operation status of the async operation.
     *
     * @param status the status value to set.
     * @return the AsyncOperationResultInner object itself.
     */
    public AsyncOperationResultInner withStatus(AsyncOperationStatus status) {
        this.status = status;
        return this;
    }

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