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

/** Reservation refund details. */
@Fluent
public final class ReservationToReturnForExchange {
    /*
     * Fully qualified id of the reservation being returned.
     */
    @JsonProperty(value = "reservationId")
    private String reservationId;

    /*
     * Quantity to be returned
     */
    @JsonProperty(value = "quantity")
    private Integer quantity;

    /*
     * Pricing information containing the amount and the currency code
     */
    @JsonProperty(value = "billingRefundAmount")
    private Price billingRefundAmount;

    /*
     * billing information
     */
    @JsonProperty(value = "billingInformation")
    private BillingInformation billingInformation;

    /*
     * Status of the individual operation.
     */
    @JsonProperty(value = "status")
    private OperationStatus status;

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

    /**
     * Get the reservationId property: Fully qualified id of the reservation being returned.
     *
     * @return the reservationId value.
     */
    public String reservationId() {
        return this.reservationId;
    }

    /**
     * Set the reservationId property: Fully qualified id of the reservation being returned.
     *
     * @param reservationId the reservationId value to set.
     * @return the ReservationToReturnForExchange object itself.
     */
    public ReservationToReturnForExchange withReservationId(String reservationId) {
        this.reservationId = reservationId;
        return this;
    }

    /**
     * Get the quantity property: Quantity to be returned.
     *
     * @return the quantity value.
     */
    public Integer quantity() {
        return this.quantity;
    }

    /**
     * Set the quantity property: Quantity to be returned.
     *
     * @param quantity the quantity value to set.
     * @return the ReservationToReturnForExchange object itself.
     */
    public ReservationToReturnForExchange withQuantity(Integer quantity) {
        this.quantity = quantity;
        return this;
    }

    /**
     * Get the billingRefundAmount property: Pricing information containing the amount and the currency code.
     *
     * @return the billingRefundAmount value.
     */
    public Price billingRefundAmount() {
        return this.billingRefundAmount;
    }

    /**
     * Set the billingRefundAmount property: Pricing information containing the amount and the currency code.
     *
     * @param billingRefundAmount the billingRefundAmount value to set.
     * @return the ReservationToReturnForExchange object itself.
     */
    public ReservationToReturnForExchange withBillingRefundAmount(Price billingRefundAmount) {
        this.billingRefundAmount = billingRefundAmount;
        return this;
    }

    /**
     * Get the billingInformation property: billing information.
     *
     * @return the billingInformation value.
     */
    public BillingInformation billingInformation() {
        return this.billingInformation;
    }

    /**
     * Set the billingInformation property: billing information.
     *
     * @param billingInformation the billingInformation value to set.
     * @return the ReservationToReturnForExchange object itself.
     */
    public ReservationToReturnForExchange withBillingInformation(BillingInformation billingInformation) {
        this.billingInformation = billingInformation;
        return this;
    }

    /**
     * Get the status property: Status of the individual operation.
     *
     * @return the status value.
     */
    public OperationStatus status() {
        return this.status;
    }

    /**
     * Set the status property: Status of the individual operation.
     *
     * @param status the status value to set.
     * @return the ReservationToReturnForExchange object itself.
     */
    public ReservationToReturnForExchange withStatus(OperationStatus status) {
        this.status = status;
        return this;
    }

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