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

package com.azure.resourcemanager.billing.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** The properties of a payment. */
@Fluent
public final class PaymentProperties {
    /*
     * The type of payment.
     */
    @JsonProperty(value = "paymentType", access = JsonProperty.Access.WRITE_ONLY)
    private String paymentType;

    /*
     * The paid amount.
     */
    @JsonProperty(value = "amount", access = JsonProperty.Access.WRITE_ONLY)
    private Amount amount;

    /*
     * The date when the payment was made.
     */
    @JsonProperty(value = "date", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime date;

    /*
     * The family of payment method.
     */
    @JsonProperty(value = "paymentMethodFamily")
    private PaymentMethodFamily paymentMethodFamily;

    /*
     * The type of payment method.
     */
    @JsonProperty(value = "paymentMethodType", access = JsonProperty.Access.WRITE_ONLY)
    private String paymentMethodType;

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

    /**
     * Get the paymentType property: The type of payment.
     *
     * @return the paymentType value.
     */
    public String paymentType() {
        return this.paymentType;
    }

    /**
     * Get the amount property: The paid amount.
     *
     * @return the amount value.
     */
    public Amount amount() {
        return this.amount;
    }

    /**
     * Get the date property: The date when the payment was made.
     *
     * @return the date value.
     */
    public OffsetDateTime date() {
        return this.date;
    }

    /**
     * Get the paymentMethodFamily property: The family of payment method.
     *
     * @return the paymentMethodFamily value.
     */
    public PaymentMethodFamily paymentMethodFamily() {
        return this.paymentMethodFamily;
    }

    /**
     * Set the paymentMethodFamily property: The family of payment method.
     *
     * @param paymentMethodFamily the paymentMethodFamily value to set.
     * @return the PaymentProperties object itself.
     */
    public PaymentProperties withPaymentMethodFamily(PaymentMethodFamily paymentMethodFamily) {
        this.paymentMethodFamily = paymentMethodFamily;
        return this;
    }

    /**
     * Get the paymentMethodType property: The type of payment method.
     *
     * @return the paymentMethodType value.
     */
    public String paymentMethodType() {
        return this.paymentMethodType;
    }

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