// 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;

/** Properties needed for calculate refund including the scope and the reservation to be returned. */
@Fluent
public final class CalculateRefundRequestProperties {
    /*
     * The scope of the refund, e.g. Reservation
     */
    @JsonProperty(value = "scope")
    private String scope;

    /*
     * Reservation to return
     */
    @JsonProperty(value = "reservationToReturn")
    private ReservationToReturn reservationToReturn;

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

    /**
     * Get the scope property: The scope of the refund, e.g. Reservation.
     *
     * @return the scope value.
     */
    public String scope() {
        return this.scope;
    }

    /**
     * Set the scope property: The scope of the refund, e.g. Reservation.
     *
     * @param scope the scope value to set.
     * @return the CalculateRefundRequestProperties object itself.
     */
    public CalculateRefundRequestProperties withScope(String scope) {
        this.scope = scope;
        return this;
    }

    /**
     * Get the reservationToReturn property: Reservation to return.
     *
     * @return the reservationToReturn value.
     */
    public ReservationToReturn reservationToReturn() {
        return this.reservationToReturn;
    }

    /**
     * Set the reservationToReturn property: Reservation to return.
     *
     * @param reservationToReturn the reservationToReturn value to set.
     * @return the CalculateRefundRequestProperties object itself.
     */
    public CalculateRefundRequestProperties withReservationToReturn(ReservationToReturn reservationToReturn) {
        this.reservationToReturn = reservationToReturn;
        return this;
    }

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