// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.billing.models.MarketplacePurchasesPolicy;
import com.azure.resourcemanager.billing.models.ReservationPurchasesPolicy;
import com.azure.resourcemanager.billing.models.ViewChargesPolicy;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The properties of a policy. */
@Fluent
public final class PolicyProperties {
    /*
     * The policy that controls whether Azure marketplace purchases are allowed for a billing profile.
     */
    @JsonProperty(value = "marketplacePurchases")
    private MarketplacePurchasesPolicy marketplacePurchases;

    /*
     * The policy that controls whether Azure reservation purchases are allowed for a billing profile.
     */
    @JsonProperty(value = "reservationPurchases")
    private ReservationPurchasesPolicy reservationPurchases;

    /*
     * The policy that controls whether users with Azure RBAC access to a subscription can view its charges.
     */
    @JsonProperty(value = "viewCharges")
    private ViewChargesPolicy viewCharges;

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

    /**
     * Get the marketplacePurchases property: The policy that controls whether Azure marketplace purchases are allowed
     * for a billing profile.
     *
     * @return the marketplacePurchases value.
     */
    public MarketplacePurchasesPolicy marketplacePurchases() {
        return this.marketplacePurchases;
    }

    /**
     * Set the marketplacePurchases property: The policy that controls whether Azure marketplace purchases are allowed
     * for a billing profile.
     *
     * @param marketplacePurchases the marketplacePurchases value to set.
     * @return the PolicyProperties object itself.
     */
    public PolicyProperties withMarketplacePurchases(MarketplacePurchasesPolicy marketplacePurchases) {
        this.marketplacePurchases = marketplacePurchases;
        return this;
    }

    /**
     * Get the reservationPurchases property: The policy that controls whether Azure reservation purchases are allowed
     * for a billing profile.
     *
     * @return the reservationPurchases value.
     */
    public ReservationPurchasesPolicy reservationPurchases() {
        return this.reservationPurchases;
    }

    /**
     * Set the reservationPurchases property: The policy that controls whether Azure reservation purchases are allowed
     * for a billing profile.
     *
     * @param reservationPurchases the reservationPurchases value to set.
     * @return the PolicyProperties object itself.
     */
    public PolicyProperties withReservationPurchases(ReservationPurchasesPolicy reservationPurchases) {
        this.reservationPurchases = reservationPurchases;
        return this;
    }

    /**
     * Get the viewCharges property: The policy that controls whether users with Azure RBAC access to a subscription can
     * view its charges.
     *
     * @return the viewCharges value.
     */
    public ViewChargesPolicy viewCharges() {
        return this.viewCharges;
    }

    /**
     * Set the viewCharges property: The policy that controls whether users with Azure RBAC access to a subscription can
     * view its charges.
     *
     * @param viewCharges the viewCharges value to set.
     * @return the PolicyProperties object itself.
     */
    public PolicyProperties withViewCharges(ViewChargesPolicy viewCharges) {
        this.viewCharges = viewCharges;
        return this;
    }

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