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

/** The refund properties of reservation. */
@Fluent
public final class RefundResponseProperties {
    /*
     * Refund session identifier
     */
    @JsonProperty(value = "sessionId")
    private String sessionId;

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

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

    /*
     * Refund policy result
     */
    @JsonProperty(value = "policyResult")
    private RefundPolicyResult policyResult;

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

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

    /**
     * Get the sessionId property: Refund session identifier.
     *
     * @return the sessionId value.
     */
    public String sessionId() {
        return this.sessionId;
    }

    /**
     * Set the sessionId property: Refund session identifier.
     *
     * @param sessionId the sessionId value to set.
     * @return the RefundResponseProperties object itself.
     */
    public RefundResponseProperties withSessionId(String sessionId) {
        this.sessionId = sessionId;
        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 RefundResponseProperties object itself.
     */
    public RefundResponseProperties 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 RefundResponseProperties object itself.
     */
    public RefundResponseProperties withBillingRefundAmount(Price billingRefundAmount) {
        this.billingRefundAmount = billingRefundAmount;
        return this;
    }

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

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

    /**
     * Get the policyResult property: Refund policy result.
     *
     * @return the policyResult value.
     */
    public RefundPolicyResult policyResult() {
        return this.policyResult;
    }

    /**
     * Set the policyResult property: Refund policy result.
     *
     * @param policyResult the policyResult value to set.
     * @return the RefundResponseProperties object itself.
     */
    public RefundResponseProperties withPolicyResult(RefundPolicyResult policyResult) {
        this.policyResult = policyResult;
        return this;
    }

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

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

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