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

package com.azure.ai.personalizer.models;

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

/** An object containing more specific information than the parent object about the error. */
@Fluent
public final class InternalError {
    /*
     * Detailed error code.
     */
    @JsonProperty(value = "code")
    private String code;

    /*
     * An object containing more specific information than the parent object
     * about the error.
     */
    @JsonProperty(value = "innererror")
    private InternalError innererror;

    /**
     * Get the code property: Detailed error code.
     *
     * @return the code value.
     */
    public String getCode() {
        return this.code;
    }

    /**
     * Set the code property: Detailed error code.
     *
     * @param code the code value to set.
     * @return the InternalError object itself.
     */
    public InternalError setCode(String code) {
        this.code = code;
        return this;
    }

    /**
     * Get the innererror property: An object containing more specific information than the parent object about the
     * error.
     *
     * @return the innererror value.
     */
    public InternalError getInnererror() {
        return this.innererror;
    }

    /**
     * Set the innererror property: An object containing more specific information than the parent object about the
     * error.
     *
     * @param innererror the innererror value to set.
     * @return the InternalError object itself.
     */
    public InternalError setInnererror(InternalError innererror) {
        this.innererror = innererror;
        return this;
    }
}
