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

package com.azure.resourcemanager.workloads.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Object containing more specific information than the current object about the error. */
@Fluent
public final class ErrorInnerError {
    /*
     * Standard error object.
     */
    @JsonProperty(value = "innerError")
    private Error innerError;

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

    /**
     * Get the innerError property: Standard error object.
     *
     * @return the innerError value.
     */
    public Error innerError() {
        return this.innerError;
    }

    /**
     * Set the innerError property: Standard error object.
     *
     * @param innerError the innerError value to set.
     * @return the ErrorInnerError object itself.
     */
    public ErrorInnerError withInnerError(Error innerError) {
        this.innerError = innerError;
        return this;
    }

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