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

package com.azure.resourcemanager.reservations.models;

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

/** error details. */
@Fluent
public final class RefundPolicyError {
    /*
     * Error code describing the reason that service is not able to process the incoming request
     */
    @JsonProperty(value = "code")
    private ErrorResponseCode code;

    /*
     * The message property.
     */
    @JsonProperty(value = "message")
    private String message;

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

    /**
     * Get the code property: Error code describing the reason that service is not able to process the incoming request.
     *
     * @return the code value.
     */
    public ErrorResponseCode code() {
        return this.code;
    }

    /**
     * Set the code property: Error code describing the reason that service is not able to process the incoming request.
     *
     * @param code the code value to set.
     * @return the RefundPolicyError object itself.
     */
    public RefundPolicyError withCode(ErrorResponseCode code) {
        this.code = code;
        return this;
    }

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

    /**
     * Set the message property: The message property.
     *
     * @param message the message value to set.
     * @return the RefundPolicyError object itself.
     */
    public RefundPolicyError withMessage(String message) {
        this.message = message;
        return this;
    }

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