// 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.ReservationPropertyUtilization;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The property of reservation object. */
@Fluent
public final class ReservationProperty {
    /*
     * The array of applied scopes of a reservation. Will be null if the reservation is in Shared scope
     */
    @JsonProperty(value = "appliedScopes")
    private List<String> appliedScopes;

    /*
     * The applied scope type of the reservation.
     */
    @JsonProperty(value = "appliedScopeType", access = JsonProperty.Access.WRITE_ONLY)
    private String appliedScopeType;

    /*
     * The reserved source type of the reservation, e.g. virtual machine.
     */
    @JsonProperty(value = "reservedResourceType", access = JsonProperty.Access.WRITE_ONLY)
    private String reservedResourceType;

    /*
     * The number of the reservation.
     */
    @JsonProperty(value = "quantity", access = JsonProperty.Access.WRITE_ONLY)
    private Float quantity;

    /*
     * The provisioning state of the reservation, e.g. Succeeded
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private String provisioningState;

    /*
     * The expiry date of the reservation
     */
    @JsonProperty(value = "expiryDate", access = JsonProperty.Access.WRITE_ONLY)
    private String expiryDate;

    /*
     * The provisioning state of the reservation, e.g. Succeeded
     */
    @JsonProperty(value = "provisioningSubState", access = JsonProperty.Access.WRITE_ONLY)
    private String provisioningSubState;

    /*
     * The display name of the reservation
     */
    @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY)
    private String displayName;

    /*
     * The provisioning state of the reservation for display, e.g. Succeeded
     */
    @JsonProperty(value = "displayProvisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private String displayProvisioningState;

    /*
     * The renew state of the reservation for display, e.g. On
     */
    @JsonProperty(value = "userFriendlyRenewState", access = JsonProperty.Access.WRITE_ONLY)
    private String userFriendlyRenewState;

    /*
     * The applied scope type of the reservation for display, e.g. Shared
     */
    @JsonProperty(value = "userFriendlyAppliedScopeType", access = JsonProperty.Access.WRITE_ONLY)
    private String userFriendlyAppliedScopeType;

    /*
     * The effective date time of the reservation
     */
    @JsonProperty(value = "effectiveDateTime", access = JsonProperty.Access.WRITE_ONLY)
    private String effectiveDateTime;

    /*
     * The sku description of the reservation
     */
    @JsonProperty(value = "skuDescription", access = JsonProperty.Access.WRITE_ONLY)
    private String skuDescription;

    /*
     * The term of the reservation, e.g. P1Y
     */
    @JsonProperty(value = "term", access = JsonProperty.Access.WRITE_ONLY)
    private String term;

    /*
     * The renew state of the reservation
     */
    @JsonProperty(value = "renew", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean renew;

    /*
     * The renew source of the reservation
     */
    @JsonProperty(value = "renewSource", access = JsonProperty.Access.WRITE_ONLY)
    private String renewSource;

    /*
     * Reservation utilization
     */
    @JsonProperty(value = "utilization", access = JsonProperty.Access.WRITE_ONLY)
    private ReservationPropertyUtilization utilization;

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

    /**
     * Get the appliedScopes property: The array of applied scopes of a reservation. Will be null if the reservation is
     * in Shared scope.
     *
     * @return the appliedScopes value.
     */
    public List<String> appliedScopes() {
        return this.appliedScopes;
    }

    /**
     * Set the appliedScopes property: The array of applied scopes of a reservation. Will be null if the reservation is
     * in Shared scope.
     *
     * @param appliedScopes the appliedScopes value to set.
     * @return the ReservationProperty object itself.
     */
    public ReservationProperty withAppliedScopes(List<String> appliedScopes) {
        this.appliedScopes = appliedScopes;
        return this;
    }

    /**
     * Get the appliedScopeType property: The applied scope type of the reservation.
     *
     * @return the appliedScopeType value.
     */
    public String appliedScopeType() {
        return this.appliedScopeType;
    }

    /**
     * Get the reservedResourceType property: The reserved source type of the reservation, e.g. virtual machine.
     *
     * @return the reservedResourceType value.
     */
    public String reservedResourceType() {
        return this.reservedResourceType;
    }

    /**
     * Get the quantity property: The number of the reservation.
     *
     * @return the quantity value.
     */
    public Float quantity() {
        return this.quantity;
    }

    /**
     * Get the provisioningState property: The provisioning state of the reservation, e.g. Succeeded.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the expiryDate property: The expiry date of the reservation.
     *
     * @return the expiryDate value.
     */
    public String expiryDate() {
        return this.expiryDate;
    }

    /**
     * Get the provisioningSubState property: The provisioning state of the reservation, e.g. Succeeded.
     *
     * @return the provisioningSubState value.
     */
    public String provisioningSubState() {
        return this.provisioningSubState;
    }

    /**
     * Get the displayName property: The display name of the reservation.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.displayName;
    }

    /**
     * Get the displayProvisioningState property: The provisioning state of the reservation for display, e.g. Succeeded.
     *
     * @return the displayProvisioningState value.
     */
    public String displayProvisioningState() {
        return this.displayProvisioningState;
    }

    /**
     * Get the userFriendlyRenewState property: The renew state of the reservation for display, e.g. On.
     *
     * @return the userFriendlyRenewState value.
     */
    public String userFriendlyRenewState() {
        return this.userFriendlyRenewState;
    }

    /**
     * Get the userFriendlyAppliedScopeType property: The applied scope type of the reservation for display, e.g.
     * Shared.
     *
     * @return the userFriendlyAppliedScopeType value.
     */
    public String userFriendlyAppliedScopeType() {
        return this.userFriendlyAppliedScopeType;
    }

    /**
     * Get the effectiveDateTime property: The effective date time of the reservation.
     *
     * @return the effectiveDateTime value.
     */
    public String effectiveDateTime() {
        return this.effectiveDateTime;
    }

    /**
     * Get the skuDescription property: The sku description of the reservation.
     *
     * @return the skuDescription value.
     */
    public String skuDescription() {
        return this.skuDescription;
    }

    /**
     * Get the term property: The term of the reservation, e.g. P1Y.
     *
     * @return the term value.
     */
    public String term() {
        return this.term;
    }

    /**
     * Get the renew property: The renew state of the reservation.
     *
     * @return the renew value.
     */
    public Boolean renew() {
        return this.renew;
    }

    /**
     * Get the renewSource property: The renew source of the reservation.
     *
     * @return the renewSource value.
     */
    public String renewSource() {
        return this.renewSource;
    }

    /**
     * Get the utilization property: Reservation utilization.
     *
     * @return the utilization value.
     */
    public ReservationPropertyUtilization utilization() {
        return this.utilization;
    }

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