/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.cognitiveservices.knowledge.qnamaker.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * An object containing more specific information about the error. As per
 * Microsoft One API guidelines -
 * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
 */
public class InnerErrorModel {
    /**
     * A more specific error code than was provided by the containing error.
     */
    @JsonProperty(value = "code")
    private String code;

    /**
     * An object containing more specific information than the current object
     * about the error.
     */
    @JsonProperty(value = "innerError")
    private InnerErrorModel innerError;

    /**
     * Get the code value.
     *
     * @return the code value
     */
    public String code() {
        return this.code;
    }

    /**
     * Set the code value.
     *
     * @param code the code value to set
     * @return the InnerErrorModel object itself.
     */
    public InnerErrorModel withCode(String code) {
        this.code = code;
        return this;
    }

    /**
     * Get the innerError value.
     *
     * @return the innerError value
     */
    public InnerErrorModel innerError() {
        return this.innerError;
    }

    /**
     * Set the innerError value.
     *
     * @param innerError the innerError value to set
     * @return the InnerErrorModel object itself.
     */
    public InnerErrorModel withInnerError(InnerErrorModel innerError) {
        this.innerError = innerError;
        return this;
    }

}
