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

package com.azure.resourcemanager.consumption.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsResourceProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsSavingsProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsUsageProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The properties of the reservation recommendation. */
@Immutable
public final class ReservationRecommendationDetailsProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsProperties.class);

    /*
     * An ISO 4217 currency code identifier for the costs and savings
     */
    @JsonProperty(value = "currency", access = JsonProperty.Access.WRITE_ONLY)
    private String currency;

    /*
     * Resource specific properties.
     */
    @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
    private ReservationRecommendationDetailsResourceProperties resource;

    /*
     * Resource Group.
     */
    @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY)
    private String resourceGroup;

    /*
     * Savings information for the recommendation.
     */
    @JsonProperty(value = "savings", access = JsonProperty.Access.WRITE_ONLY)
    private ReservationRecommendationDetailsSavingsProperties savings;

    /*
     * Scope of the reservation, ex: Single or Shared.
     */
    @JsonProperty(value = "scope", access = JsonProperty.Access.WRITE_ONLY)
    private String scope;

    /*
     * Historical usage details used to calculate the estimated savings.
     */
    @JsonProperty(value = "usage", access = JsonProperty.Access.WRITE_ONLY)
    private ReservationRecommendationDetailsUsageProperties usage;

    /**
     * Get the currency property: An ISO 4217 currency code identifier for the costs and savings.
     *
     * @return the currency value.
     */
    public String currency() {
        return this.currency;
    }

    /**
     * Get the resource property: Resource specific properties.
     *
     * @return the resource value.
     */
    public ReservationRecommendationDetailsResourceProperties resource() {
        return this.resource;
    }

    /**
     * Get the resourceGroup property: Resource Group.
     *
     * @return the resourceGroup value.
     */
    public String resourceGroup() {
        return this.resourceGroup;
    }

    /**
     * Get the savings property: Savings information for the recommendation.
     *
     * @return the savings value.
     */
    public ReservationRecommendationDetailsSavingsProperties savings() {
        return this.savings;
    }

    /**
     * Get the scope property: Scope of the reservation, ex: Single or Shared.
     *
     * @return the scope value.
     */
    public String scope() {
        return this.scope;
    }

    /**
     * Get the usage property: Historical usage details used to calculate the estimated savings.
     *
     * @return the usage value.
     */
    public ReservationRecommendationDetailsUsageProperties usage() {
        return this.usage;
    }

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