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

package com.azure.messaging.servicebus.administration.implementation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;

/** The error response from Service Bus. */
@JacksonXmlRootElement(localName = "ServiceBusManagementError")
@Fluent
public final class ServiceBusManagementError {
    /*
     * The service error code.
     */
    @JsonProperty(value = "Code")
    private Integer code;

    /*
     * The service error message.
     */
    @JsonProperty(value = "Detail")
    private String detail;

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

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

    /**
     * Set the code property: The service error code.
     *
     * @param code the code value to set.
     * @return the ServiceBusManagementError object itself.
     */
    public ServiceBusManagementError setCode(Integer code) {
        this.code = code;
        return this;
    }

    /**
     * Get the detail property: The service error message.
     *
     * @return the detail value.
     */
    public String getDetail() {
        return this.detail;
    }

    /**
     * Set the detail property: The service error message.
     *
     * @param detail the detail value to set.
     * @return the ServiceBusManagementError object itself.
     */
    public ServiceBusManagementError setDetail(String detail) {
        this.detail = detail;
        return this;
    }
}
