All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.costexplorer.model.RecommendationDetailData Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Cost Explorer module holds the client classes that are used for communicating with AWS Cost Explorer Service

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.costexplorer.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* The details and metrics for the given recommendation. *

*/ @Generated("software.amazon.awssdk:codegen") public final class RecommendationDetailData implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ACCOUNT_SCOPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AccountScope").getter(getter(RecommendationDetailData::accountScopeAsString)) .setter(setter(Builder::accountScope)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AccountScope").build()).build(); private static final SdkField LOOKBACK_PERIOD_IN_DAYS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LookbackPeriodInDays").getter(getter(RecommendationDetailData::lookbackPeriodInDaysAsString)) .setter(setter(Builder::lookbackPeriodInDays)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LookbackPeriodInDays").build()) .build(); private static final SdkField SAVINGS_PLANS_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SavingsPlansType").getter(getter(RecommendationDetailData::savingsPlansTypeAsString)) .setter(setter(Builder::savingsPlansType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SavingsPlansType").build()).build(); private static final SdkField TERM_IN_YEARS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("TermInYears").getter(getter(RecommendationDetailData::termInYearsAsString)) .setter(setter(Builder::termInYears)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TermInYears").build()).build(); private static final SdkField PAYMENT_OPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("PaymentOption").getter(getter(RecommendationDetailData::paymentOptionAsString)) .setter(setter(Builder::paymentOption)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PaymentOption").build()).build(); private static final SdkField ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AccountId").getter(getter(RecommendationDetailData::accountId)).setter(setter(Builder::accountId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AccountId").build()).build(); private static final SdkField CURRENCY_CODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CurrencyCode").getter(getter(RecommendationDetailData::currencyCode)) .setter(setter(Builder::currencyCode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CurrencyCode").build()).build(); private static final SdkField INSTANCE_FAMILY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("InstanceFamily").getter(getter(RecommendationDetailData::instanceFamily)) .setter(setter(Builder::instanceFamily)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceFamily").build()).build(); private static final SdkField REGION_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Region") .getter(getter(RecommendationDetailData::region)).setter(setter(Builder::region)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Region").build()).build(); private static final SdkField OFFERING_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("OfferingId").getter(getter(RecommendationDetailData::offeringId)).setter(setter(Builder::offeringId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OfferingId").build()).build(); private static final SdkField GENERATION_TIMESTAMP_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("GenerationTimestamp").getter(getter(RecommendationDetailData::generationTimestamp)) .setter(setter(Builder::generationTimestamp)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GenerationTimestamp").build()) .build(); private static final SdkField LATEST_USAGE_TIMESTAMP_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LatestUsageTimestamp").getter(getter(RecommendationDetailData::latestUsageTimestamp)) .setter(setter(Builder::latestUsageTimestamp)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LatestUsageTimestamp").build()) .build(); private static final SdkField CURRENT_AVERAGE_HOURLY_ON_DEMAND_SPEND_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("CurrentAverageHourlyOnDemandSpend") .getter(getter(RecommendationDetailData::currentAverageHourlyOnDemandSpend)) .setter(setter(Builder::currentAverageHourlyOnDemandSpend)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CurrentAverageHourlyOnDemandSpend") .build()).build(); private static final SdkField CURRENT_MAXIMUM_HOURLY_ON_DEMAND_SPEND_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("CurrentMaximumHourlyOnDemandSpend") .getter(getter(RecommendationDetailData::currentMaximumHourlyOnDemandSpend)) .setter(setter(Builder::currentMaximumHourlyOnDemandSpend)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CurrentMaximumHourlyOnDemandSpend") .build()).build(); private static final SdkField CURRENT_MINIMUM_HOURLY_ON_DEMAND_SPEND_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("CurrentMinimumHourlyOnDemandSpend") .getter(getter(RecommendationDetailData::currentMinimumHourlyOnDemandSpend)) .setter(setter(Builder::currentMinimumHourlyOnDemandSpend)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CurrentMinimumHourlyOnDemandSpend") .build()).build(); private static final SdkField ESTIMATED_AVERAGE_UTILIZATION_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("EstimatedAverageUtilization") .getter(getter(RecommendationDetailData::estimatedAverageUtilization)) .setter(setter(Builder::estimatedAverageUtilization)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedAverageUtilization") .build()).build(); private static final SdkField ESTIMATED_MONTHLY_SAVINGS_AMOUNT_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("EstimatedMonthlySavingsAmount") .getter(getter(RecommendationDetailData::estimatedMonthlySavingsAmount)) .setter(setter(Builder::estimatedMonthlySavingsAmount)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedMonthlySavingsAmount") .build()).build(); private static final SdkField ESTIMATED_ON_DEMAND_COST_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EstimatedOnDemandCost").getter(getter(RecommendationDetailData::estimatedOnDemandCost)) .setter(setter(Builder::estimatedOnDemandCost)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedOnDemandCost").build()) .build(); private static final SdkField ESTIMATED_ON_DEMAND_COST_WITH_CURRENT_COMMITMENT_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("EstimatedOnDemandCostWithCurrentCommitment") .getter(getter(RecommendationDetailData::estimatedOnDemandCostWithCurrentCommitment)) .setter(setter(Builder::estimatedOnDemandCostWithCurrentCommitment)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("EstimatedOnDemandCostWithCurrentCommitment").build()).build(); private static final SdkField ESTIMATED_ROI_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EstimatedROI").getter(getter(RecommendationDetailData::estimatedROI)) .setter(setter(Builder::estimatedROI)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedROI").build()).build(); private static final SdkField ESTIMATED_SP_COST_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EstimatedSPCost").getter(getter(RecommendationDetailData::estimatedSPCost)) .setter(setter(Builder::estimatedSPCost)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedSPCost").build()).build(); private static final SdkField ESTIMATED_SAVINGS_AMOUNT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EstimatedSavingsAmount").getter(getter(RecommendationDetailData::estimatedSavingsAmount)) .setter(setter(Builder::estimatedSavingsAmount)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedSavingsAmount").build()) .build(); private static final SdkField ESTIMATED_SAVINGS_PERCENTAGE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("EstimatedSavingsPercentage") .getter(getter(RecommendationDetailData::estimatedSavingsPercentage)) .setter(setter(Builder::estimatedSavingsPercentage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedSavingsPercentage").build()) .build(); private static final SdkField EXISTING_HOURLY_COMMITMENT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ExistingHourlyCommitment").getter(getter(RecommendationDetailData::existingHourlyCommitment)) .setter(setter(Builder::existingHourlyCommitment)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExistingHourlyCommitment").build()) .build(); private static final SdkField HOURLY_COMMITMENT_TO_PURCHASE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("HourlyCommitmentToPurchase") .getter(getter(RecommendationDetailData::hourlyCommitmentToPurchase)) .setter(setter(Builder::hourlyCommitmentToPurchase)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HourlyCommitmentToPurchase").build()) .build(); private static final SdkField UPFRONT_COST_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("UpfrontCost").getter(getter(RecommendationDetailData::upfrontCost)).setter(setter(Builder::upfrontCost)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UpfrontCost").build()).build(); private static final SdkField CURRENT_AVERAGE_COVERAGE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CurrentAverageCoverage").getter(getter(RecommendationDetailData::currentAverageCoverage)) .setter(setter(Builder::currentAverageCoverage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CurrentAverageCoverage").build()) .build(); private static final SdkField ESTIMATED_AVERAGE_COVERAGE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EstimatedAverageCoverage").getter(getter(RecommendationDetailData::estimatedAverageCoverage)) .setter(setter(Builder::estimatedAverageCoverage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedAverageCoverage").build()) .build(); private static final SdkField> METRICS_OVER_LOOKBACK_PERIOD_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("MetricsOverLookbackPeriod") .getter(getter(RecommendationDetailData::metricsOverLookbackPeriod)) .setter(setter(Builder::metricsOverLookbackPeriod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MetricsOverLookbackPeriod").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(RecommendationDetailHourlyMetrics::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ACCOUNT_SCOPE_FIELD, LOOKBACK_PERIOD_IN_DAYS_FIELD, SAVINGS_PLANS_TYPE_FIELD, TERM_IN_YEARS_FIELD, PAYMENT_OPTION_FIELD, ACCOUNT_ID_FIELD, CURRENCY_CODE_FIELD, INSTANCE_FAMILY_FIELD, REGION_FIELD, OFFERING_ID_FIELD, GENERATION_TIMESTAMP_FIELD, LATEST_USAGE_TIMESTAMP_FIELD, CURRENT_AVERAGE_HOURLY_ON_DEMAND_SPEND_FIELD, CURRENT_MAXIMUM_HOURLY_ON_DEMAND_SPEND_FIELD, CURRENT_MINIMUM_HOURLY_ON_DEMAND_SPEND_FIELD, ESTIMATED_AVERAGE_UTILIZATION_FIELD, ESTIMATED_MONTHLY_SAVINGS_AMOUNT_FIELD, ESTIMATED_ON_DEMAND_COST_FIELD, ESTIMATED_ON_DEMAND_COST_WITH_CURRENT_COMMITMENT_FIELD, ESTIMATED_ROI_FIELD, ESTIMATED_SP_COST_FIELD, ESTIMATED_SAVINGS_AMOUNT_FIELD, ESTIMATED_SAVINGS_PERCENTAGE_FIELD, EXISTING_HOURLY_COMMITMENT_FIELD, HOURLY_COMMITMENT_TO_PURCHASE_FIELD, UPFRONT_COST_FIELD, CURRENT_AVERAGE_COVERAGE_FIELD, ESTIMATED_AVERAGE_COVERAGE_FIELD, METRICS_OVER_LOOKBACK_PERIOD_FIELD)); private static final long serialVersionUID = 1L; private final String accountScope; private final String lookbackPeriodInDays; private final String savingsPlansType; private final String termInYears; private final String paymentOption; private final String accountId; private final String currencyCode; private final String instanceFamily; private final String region; private final String offeringId; private final String generationTimestamp; private final String latestUsageTimestamp; private final String currentAverageHourlyOnDemandSpend; private final String currentMaximumHourlyOnDemandSpend; private final String currentMinimumHourlyOnDemandSpend; private final String estimatedAverageUtilization; private final String estimatedMonthlySavingsAmount; private final String estimatedOnDemandCost; private final String estimatedOnDemandCostWithCurrentCommitment; private final String estimatedROI; private final String estimatedSPCost; private final String estimatedSavingsAmount; private final String estimatedSavingsPercentage; private final String existingHourlyCommitment; private final String hourlyCommitmentToPurchase; private final String upfrontCost; private final String currentAverageCoverage; private final String estimatedAverageCoverage; private final List metricsOverLookbackPeriod; private RecommendationDetailData(BuilderImpl builder) { this.accountScope = builder.accountScope; this.lookbackPeriodInDays = builder.lookbackPeriodInDays; this.savingsPlansType = builder.savingsPlansType; this.termInYears = builder.termInYears; this.paymentOption = builder.paymentOption; this.accountId = builder.accountId; this.currencyCode = builder.currencyCode; this.instanceFamily = builder.instanceFamily; this.region = builder.region; this.offeringId = builder.offeringId; this.generationTimestamp = builder.generationTimestamp; this.latestUsageTimestamp = builder.latestUsageTimestamp; this.currentAverageHourlyOnDemandSpend = builder.currentAverageHourlyOnDemandSpend; this.currentMaximumHourlyOnDemandSpend = builder.currentMaximumHourlyOnDemandSpend; this.currentMinimumHourlyOnDemandSpend = builder.currentMinimumHourlyOnDemandSpend; this.estimatedAverageUtilization = builder.estimatedAverageUtilization; this.estimatedMonthlySavingsAmount = builder.estimatedMonthlySavingsAmount; this.estimatedOnDemandCost = builder.estimatedOnDemandCost; this.estimatedOnDemandCostWithCurrentCommitment = builder.estimatedOnDemandCostWithCurrentCommitment; this.estimatedROI = builder.estimatedROI; this.estimatedSPCost = builder.estimatedSPCost; this.estimatedSavingsAmount = builder.estimatedSavingsAmount; this.estimatedSavingsPercentage = builder.estimatedSavingsPercentage; this.existingHourlyCommitment = builder.existingHourlyCommitment; this.hourlyCommitmentToPurchase = builder.hourlyCommitmentToPurchase; this.upfrontCost = builder.upfrontCost; this.currentAverageCoverage = builder.currentAverageCoverage; this.estimatedAverageCoverage = builder.estimatedAverageCoverage; this.metricsOverLookbackPeriod = builder.metricsOverLookbackPeriod; } /** *

* The account scope that you want your recommendations for. Amazon Web Services calculates recommendations * including the management account and member accounts if the value is set to PAYER. If the value is LINKED, * recommendations are calculated for individual member accounts only. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #accountScope} will * return {@link AccountScope#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #accountScopeAsString}. *

* * @return The account scope that you want your recommendations for. Amazon Web Services calculates recommendations * including the management account and member accounts if the value is set to PAYER. If the value is * LINKED, recommendations are calculated for individual member accounts only. * @see AccountScope */ public final AccountScope accountScope() { return AccountScope.fromValue(accountScope); } /** *

* The account scope that you want your recommendations for. Amazon Web Services calculates recommendations * including the management account and member accounts if the value is set to PAYER. If the value is LINKED, * recommendations are calculated for individual member accounts only. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #accountScope} will * return {@link AccountScope#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #accountScopeAsString}. *

* * @return The account scope that you want your recommendations for. Amazon Web Services calculates recommendations * including the management account and member accounts if the value is set to PAYER. If the value is * LINKED, recommendations are calculated for individual member accounts only. * @see AccountScope */ public final String accountScopeAsString() { return accountScope; } /** *

* How many days of previous usage that Amazon Web Services considers when making this recommendation. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #lookbackPeriodInDays} will return {@link LookbackPeriodInDays#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #lookbackPeriodInDaysAsString}. *

* * @return How many days of previous usage that Amazon Web Services considers when making this recommendation. * @see LookbackPeriodInDays */ public final LookbackPeriodInDays lookbackPeriodInDays() { return LookbackPeriodInDays.fromValue(lookbackPeriodInDays); } /** *

* How many days of previous usage that Amazon Web Services considers when making this recommendation. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #lookbackPeriodInDays} will return {@link LookbackPeriodInDays#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #lookbackPeriodInDaysAsString}. *

* * @return How many days of previous usage that Amazon Web Services considers when making this recommendation. * @see LookbackPeriodInDays */ public final String lookbackPeriodInDaysAsString() { return lookbackPeriodInDays; } /** *

* The requested Savings Plan recommendation type. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #savingsPlansType} * will return {@link SupportedSavingsPlansType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #savingsPlansTypeAsString}. *

* * @return The requested Savings Plan recommendation type. * @see SupportedSavingsPlansType */ public final SupportedSavingsPlansType savingsPlansType() { return SupportedSavingsPlansType.fromValue(savingsPlansType); } /** *

* The requested Savings Plan recommendation type. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #savingsPlansType} * will return {@link SupportedSavingsPlansType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #savingsPlansTypeAsString}. *

* * @return The requested Savings Plan recommendation type. * @see SupportedSavingsPlansType */ public final String savingsPlansTypeAsString() { return savingsPlansType; } /** *

* The term of the commitment in years. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #termInYears} will * return {@link TermInYears#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #termInYearsAsString}. *

* * @return The term of the commitment in years. * @see TermInYears */ public final TermInYears termInYears() { return TermInYears.fromValue(termInYears); } /** *

* The term of the commitment in years. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #termInYears} will * return {@link TermInYears#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #termInYearsAsString}. *

* * @return The term of the commitment in years. * @see TermInYears */ public final String termInYearsAsString() { return termInYears; } /** *

* The payment option for the commitment (for example, All Upfront or No Upfront). *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #paymentOption} * will return {@link PaymentOption#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #paymentOptionAsString}. *

* * @return The payment option for the commitment (for example, All Upfront or No Upfront). * @see PaymentOption */ public final PaymentOption paymentOption() { return PaymentOption.fromValue(paymentOption); } /** *

* The payment option for the commitment (for example, All Upfront or No Upfront). *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #paymentOption} * will return {@link PaymentOption#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #paymentOptionAsString}. *

* * @return The payment option for the commitment (for example, All Upfront or No Upfront). * @see PaymentOption */ public final String paymentOptionAsString() { return paymentOption; } /** *

* The AccountID that the recommendation is generated for. *

* * @return The AccountID that the recommendation is generated for. */ public final String accountId() { return accountId; } /** *

* The currency code that Amazon Web Services used to generate the recommendation and present potential savings. *

* * @return The currency code that Amazon Web Services used to generate the recommendation and present potential * savings. */ public final String currencyCode() { return currencyCode; } /** *

* The instance family of the recommended Savings Plan. *

* * @return The instance family of the recommended Savings Plan. */ public final String instanceFamily() { return instanceFamily; } /** *

* The region the recommendation is generated for. *

* * @return The region the recommendation is generated for. */ public final String region() { return region; } /** *

* The unique ID that's used to distinguish Savings Plans from one another. *

* * @return The unique ID that's used to distinguish Savings Plans from one another. */ public final String offeringId() { return offeringId; } /** * Returns the value of the GenerationTimestamp property for this object. * * @return The value of the GenerationTimestamp property for this object. */ public final String generationTimestamp() { return generationTimestamp; } /** * Returns the value of the LatestUsageTimestamp property for this object. * * @return The value of the LatestUsageTimestamp property for this object. */ public final String latestUsageTimestamp() { return latestUsageTimestamp; } /** *

* The average value of hourly On-Demand spend over the lookback period of the applicable usage type. *

* * @return The average value of hourly On-Demand spend over the lookback period of the applicable usage type. */ public final String currentAverageHourlyOnDemandSpend() { return currentAverageHourlyOnDemandSpend; } /** *

* The highest value of hourly On-Demand spend over the lookback period of the applicable usage type. *

* * @return The highest value of hourly On-Demand spend over the lookback period of the applicable usage type. */ public final String currentMaximumHourlyOnDemandSpend() { return currentMaximumHourlyOnDemandSpend; } /** *

* The lowest value of hourly On-Demand spend over the lookback period of the applicable usage type. *

* * @return The lowest value of hourly On-Demand spend over the lookback period of the applicable usage type. */ public final String currentMinimumHourlyOnDemandSpend() { return currentMinimumHourlyOnDemandSpend; } /** *

* The estimated utilization of the recommended Savings Plan. *

* * @return The estimated utilization of the recommended Savings Plan. */ public final String estimatedAverageUtilization() { return estimatedAverageUtilization; } /** *

* The estimated monthly savings amount based on the recommended Savings Plan. *

* * @return The estimated monthly savings amount based on the recommended Savings Plan. */ public final String estimatedMonthlySavingsAmount() { return estimatedMonthlySavingsAmount; } /** *

* The remaining On-Demand cost estimated to not be covered by the recommended Savings Plan, over the length of the * lookback period. *

* * @return The remaining On-Demand cost estimated to not be covered by the recommended Savings Plan, over the length * of the lookback period. */ public final String estimatedOnDemandCost() { return estimatedOnDemandCost; } /** *

* The estimated On-Demand costs you expect with no additional commitment, based on your usage of the selected time * period and the Savings Plan you own. *

* * @return The estimated On-Demand costs you expect with no additional commitment, based on your usage of the * selected time period and the Savings Plan you own. */ public final String estimatedOnDemandCostWithCurrentCommitment() { return estimatedOnDemandCostWithCurrentCommitment; } /** *

* The estimated return on investment that's based on the recommended Savings Plan that you purchased. This is * calculated as estimatedSavingsAmount/estimatedSPCost*100. *

* * @return The estimated return on investment that's based on the recommended Savings Plan that you purchased. This * is calculated as estimatedSavingsAmount/estimatedSPCost*100. */ public final String estimatedROI() { return estimatedROI; } /** *

* The cost of the recommended Savings Plan over the length of the lookback period. *

* * @return The cost of the recommended Savings Plan over the length of the lookback period. */ public final String estimatedSPCost() { return estimatedSPCost; } /** *

* The estimated savings amount that's based on the recommended Savings Plan over the length of the lookback period. *

* * @return The estimated savings amount that's based on the recommended Savings Plan over the length of the lookback * period. */ public final String estimatedSavingsAmount() { return estimatedSavingsAmount; } /** *

* The estimated savings percentage relative to the total cost of applicable On-Demand usage over the lookback * period. *

* * @return The estimated savings percentage relative to the total cost of applicable On-Demand usage over the * lookback period. */ public final String estimatedSavingsPercentage() { return estimatedSavingsPercentage; } /** *

* The existing hourly commitment for the Savings Plan type. *

* * @return The existing hourly commitment for the Savings Plan type. */ public final String existingHourlyCommitment() { return existingHourlyCommitment; } /** *

* The recommended hourly commitment level for the Savings Plan type and the configuration that's based on the usage * during the lookback period. *

* * @return The recommended hourly commitment level for the Savings Plan type and the configuration that's based on * the usage during the lookback period. */ public final String hourlyCommitmentToPurchase() { return hourlyCommitmentToPurchase; } /** *

* The upfront cost of the recommended Savings Plan, based on the selected payment option. *

* * @return The upfront cost of the recommended Savings Plan, based on the selected payment option. */ public final String upfrontCost() { return upfrontCost; } /** *

* The average value of hourly coverage over the lookback period. *

* * @return The average value of hourly coverage over the lookback period. */ public final String currentAverageCoverage() { return currentAverageCoverage; } /** *

* The estimated coverage of the recommended Savings Plan. *

* * @return The estimated coverage of the recommended Savings Plan. */ public final String estimatedAverageCoverage() { return estimatedAverageCoverage; } /** * For responses, this returns true if the service returned a value for the MetricsOverLookbackPeriod property. This * DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the * property). This is useful because the SDK will never return a null collection or map, but you may need to * differentiate between the service returning nothing (or null) and the service returning an empty collection or * map. For requests, this returns true if a value for the property was specified in the request builder, and false * if a value was not specified. */ public final boolean hasMetricsOverLookbackPeriod() { return metricsOverLookbackPeriod != null && !(metricsOverLookbackPeriod instanceof SdkAutoConstructList); } /** *

* The related hourly cost, coverage, and utilization metrics over the lookback period. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasMetricsOverLookbackPeriod} method. *

* * @return The related hourly cost, coverage, and utilization metrics over the lookback period. */ public final List metricsOverLookbackPeriod() { return metricsOverLookbackPeriod; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(accountScopeAsString()); hashCode = 31 * hashCode + Objects.hashCode(lookbackPeriodInDaysAsString()); hashCode = 31 * hashCode + Objects.hashCode(savingsPlansTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(termInYearsAsString()); hashCode = 31 * hashCode + Objects.hashCode(paymentOptionAsString()); hashCode = 31 * hashCode + Objects.hashCode(accountId()); hashCode = 31 * hashCode + Objects.hashCode(currencyCode()); hashCode = 31 * hashCode + Objects.hashCode(instanceFamily()); hashCode = 31 * hashCode + Objects.hashCode(region()); hashCode = 31 * hashCode + Objects.hashCode(offeringId()); hashCode = 31 * hashCode + Objects.hashCode(generationTimestamp()); hashCode = 31 * hashCode + Objects.hashCode(latestUsageTimestamp()); hashCode = 31 * hashCode + Objects.hashCode(currentAverageHourlyOnDemandSpend()); hashCode = 31 * hashCode + Objects.hashCode(currentMaximumHourlyOnDemandSpend()); hashCode = 31 * hashCode + Objects.hashCode(currentMinimumHourlyOnDemandSpend()); hashCode = 31 * hashCode + Objects.hashCode(estimatedAverageUtilization()); hashCode = 31 * hashCode + Objects.hashCode(estimatedMonthlySavingsAmount()); hashCode = 31 * hashCode + Objects.hashCode(estimatedOnDemandCost()); hashCode = 31 * hashCode + Objects.hashCode(estimatedOnDemandCostWithCurrentCommitment()); hashCode = 31 * hashCode + Objects.hashCode(estimatedROI()); hashCode = 31 * hashCode + Objects.hashCode(estimatedSPCost()); hashCode = 31 * hashCode + Objects.hashCode(estimatedSavingsAmount()); hashCode = 31 * hashCode + Objects.hashCode(estimatedSavingsPercentage()); hashCode = 31 * hashCode + Objects.hashCode(existingHourlyCommitment()); hashCode = 31 * hashCode + Objects.hashCode(hourlyCommitmentToPurchase()); hashCode = 31 * hashCode + Objects.hashCode(upfrontCost()); hashCode = 31 * hashCode + Objects.hashCode(currentAverageCoverage()); hashCode = 31 * hashCode + Objects.hashCode(estimatedAverageCoverage()); hashCode = 31 * hashCode + Objects.hashCode(hasMetricsOverLookbackPeriod() ? metricsOverLookbackPeriod() : null); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof RecommendationDetailData)) { return false; } RecommendationDetailData other = (RecommendationDetailData) obj; return Objects.equals(accountScopeAsString(), other.accountScopeAsString()) && Objects.equals(lookbackPeriodInDaysAsString(), other.lookbackPeriodInDaysAsString()) && Objects.equals(savingsPlansTypeAsString(), other.savingsPlansTypeAsString()) && Objects.equals(termInYearsAsString(), other.termInYearsAsString()) && Objects.equals(paymentOptionAsString(), other.paymentOptionAsString()) && Objects.equals(accountId(), other.accountId()) && Objects.equals(currencyCode(), other.currencyCode()) && Objects.equals(instanceFamily(), other.instanceFamily()) && Objects.equals(region(), other.region()) && Objects.equals(offeringId(), other.offeringId()) && Objects.equals(generationTimestamp(), other.generationTimestamp()) && Objects.equals(latestUsageTimestamp(), other.latestUsageTimestamp()) && Objects.equals(currentAverageHourlyOnDemandSpend(), other.currentAverageHourlyOnDemandSpend()) && Objects.equals(currentMaximumHourlyOnDemandSpend(), other.currentMaximumHourlyOnDemandSpend()) && Objects.equals(currentMinimumHourlyOnDemandSpend(), other.currentMinimumHourlyOnDemandSpend()) && Objects.equals(estimatedAverageUtilization(), other.estimatedAverageUtilization()) && Objects.equals(estimatedMonthlySavingsAmount(), other.estimatedMonthlySavingsAmount()) && Objects.equals(estimatedOnDemandCost(), other.estimatedOnDemandCost()) && Objects.equals(estimatedOnDemandCostWithCurrentCommitment(), other.estimatedOnDemandCostWithCurrentCommitment()) && Objects.equals(estimatedROI(), other.estimatedROI()) && Objects.equals(estimatedSPCost(), other.estimatedSPCost()) && Objects.equals(estimatedSavingsAmount(), other.estimatedSavingsAmount()) && Objects.equals(estimatedSavingsPercentage(), other.estimatedSavingsPercentage()) && Objects.equals(existingHourlyCommitment(), other.existingHourlyCommitment()) && Objects.equals(hourlyCommitmentToPurchase(), other.hourlyCommitmentToPurchase()) && Objects.equals(upfrontCost(), other.upfrontCost()) && Objects.equals(currentAverageCoverage(), other.currentAverageCoverage()) && Objects.equals(estimatedAverageCoverage(), other.estimatedAverageCoverage()) && hasMetricsOverLookbackPeriod() == other.hasMetricsOverLookbackPeriod() && Objects.equals(metricsOverLookbackPeriod(), other.metricsOverLookbackPeriod()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("RecommendationDetailData").add("AccountScope", accountScopeAsString()) .add("LookbackPeriodInDays", lookbackPeriodInDaysAsString()).add("SavingsPlansType", savingsPlansTypeAsString()) .add("TermInYears", termInYearsAsString()).add("PaymentOption", paymentOptionAsString()) .add("AccountId", accountId()).add("CurrencyCode", currencyCode()).add("InstanceFamily", instanceFamily()) .add("Region", region()).add("OfferingId", offeringId()).add("GenerationTimestamp", generationTimestamp()) .add("LatestUsageTimestamp", latestUsageTimestamp()) .add("CurrentAverageHourlyOnDemandSpend", currentAverageHourlyOnDemandSpend()) .add("CurrentMaximumHourlyOnDemandSpend", currentMaximumHourlyOnDemandSpend()) .add("CurrentMinimumHourlyOnDemandSpend", currentMinimumHourlyOnDemandSpend()) .add("EstimatedAverageUtilization", estimatedAverageUtilization()) .add("EstimatedMonthlySavingsAmount", estimatedMonthlySavingsAmount()) .add("EstimatedOnDemandCost", estimatedOnDemandCost()) .add("EstimatedOnDemandCostWithCurrentCommitment", estimatedOnDemandCostWithCurrentCommitment()) .add("EstimatedROI", estimatedROI()).add("EstimatedSPCost", estimatedSPCost()) .add("EstimatedSavingsAmount", estimatedSavingsAmount()) .add("EstimatedSavingsPercentage", estimatedSavingsPercentage()) .add("ExistingHourlyCommitment", existingHourlyCommitment()) .add("HourlyCommitmentToPurchase", hourlyCommitmentToPurchase()).add("UpfrontCost", upfrontCost()) .add("CurrentAverageCoverage", currentAverageCoverage()) .add("EstimatedAverageCoverage", estimatedAverageCoverage()) .add("MetricsOverLookbackPeriod", hasMetricsOverLookbackPeriod() ? metricsOverLookbackPeriod() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AccountScope": return Optional.ofNullable(clazz.cast(accountScopeAsString())); case "LookbackPeriodInDays": return Optional.ofNullable(clazz.cast(lookbackPeriodInDaysAsString())); case "SavingsPlansType": return Optional.ofNullable(clazz.cast(savingsPlansTypeAsString())); case "TermInYears": return Optional.ofNullable(clazz.cast(termInYearsAsString())); case "PaymentOption": return Optional.ofNullable(clazz.cast(paymentOptionAsString())); case "AccountId": return Optional.ofNullable(clazz.cast(accountId())); case "CurrencyCode": return Optional.ofNullable(clazz.cast(currencyCode())); case "InstanceFamily": return Optional.ofNullable(clazz.cast(instanceFamily())); case "Region": return Optional.ofNullable(clazz.cast(region())); case "OfferingId": return Optional.ofNullable(clazz.cast(offeringId())); case "GenerationTimestamp": return Optional.ofNullable(clazz.cast(generationTimestamp())); case "LatestUsageTimestamp": return Optional.ofNullable(clazz.cast(latestUsageTimestamp())); case "CurrentAverageHourlyOnDemandSpend": return Optional.ofNullable(clazz.cast(currentAverageHourlyOnDemandSpend())); case "CurrentMaximumHourlyOnDemandSpend": return Optional.ofNullable(clazz.cast(currentMaximumHourlyOnDemandSpend())); case "CurrentMinimumHourlyOnDemandSpend": return Optional.ofNullable(clazz.cast(currentMinimumHourlyOnDemandSpend())); case "EstimatedAverageUtilization": return Optional.ofNullable(clazz.cast(estimatedAverageUtilization())); case "EstimatedMonthlySavingsAmount": return Optional.ofNullable(clazz.cast(estimatedMonthlySavingsAmount())); case "EstimatedOnDemandCost": return Optional.ofNullable(clazz.cast(estimatedOnDemandCost())); case "EstimatedOnDemandCostWithCurrentCommitment": return Optional.ofNullable(clazz.cast(estimatedOnDemandCostWithCurrentCommitment())); case "EstimatedROI": return Optional.ofNullable(clazz.cast(estimatedROI())); case "EstimatedSPCost": return Optional.ofNullable(clazz.cast(estimatedSPCost())); case "EstimatedSavingsAmount": return Optional.ofNullable(clazz.cast(estimatedSavingsAmount())); case "EstimatedSavingsPercentage": return Optional.ofNullable(clazz.cast(estimatedSavingsPercentage())); case "ExistingHourlyCommitment": return Optional.ofNullable(clazz.cast(existingHourlyCommitment())); case "HourlyCommitmentToPurchase": return Optional.ofNullable(clazz.cast(hourlyCommitmentToPurchase())); case "UpfrontCost": return Optional.ofNullable(clazz.cast(upfrontCost())); case "CurrentAverageCoverage": return Optional.ofNullable(clazz.cast(currentAverageCoverage())); case "EstimatedAverageCoverage": return Optional.ofNullable(clazz.cast(estimatedAverageCoverage())); case "MetricsOverLookbackPeriod": return Optional.ofNullable(clazz.cast(metricsOverLookbackPeriod())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((RecommendationDetailData) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The account scope that you want your recommendations for. Amazon Web Services calculates recommendations * including the management account and member accounts if the value is set to PAYER. If the value is LINKED, * recommendations are calculated for individual member accounts only. *

* * @param accountScope * The account scope that you want your recommendations for. Amazon Web Services calculates * recommendations including the management account and member accounts if the value is set to PAYER. If * the value is LINKED, recommendations are calculated for individual member accounts only. * @see AccountScope * @return Returns a reference to this object so that method calls can be chained together. * @see AccountScope */ Builder accountScope(String accountScope); /** *

* The account scope that you want your recommendations for. Amazon Web Services calculates recommendations * including the management account and member accounts if the value is set to PAYER. If the value is LINKED, * recommendations are calculated for individual member accounts only. *

* * @param accountScope * The account scope that you want your recommendations for. Amazon Web Services calculates * recommendations including the management account and member accounts if the value is set to PAYER. If * the value is LINKED, recommendations are calculated for individual member accounts only. * @see AccountScope * @return Returns a reference to this object so that method calls can be chained together. * @see AccountScope */ Builder accountScope(AccountScope accountScope); /** *

* How many days of previous usage that Amazon Web Services considers when making this recommendation. *

* * @param lookbackPeriodInDays * How many days of previous usage that Amazon Web Services considers when making this recommendation. * @see LookbackPeriodInDays * @return Returns a reference to this object so that method calls can be chained together. * @see LookbackPeriodInDays */ Builder lookbackPeriodInDays(String lookbackPeriodInDays); /** *

* How many days of previous usage that Amazon Web Services considers when making this recommendation. *

* * @param lookbackPeriodInDays * How many days of previous usage that Amazon Web Services considers when making this recommendation. * @see LookbackPeriodInDays * @return Returns a reference to this object so that method calls can be chained together. * @see LookbackPeriodInDays */ Builder lookbackPeriodInDays(LookbackPeriodInDays lookbackPeriodInDays); /** *

* The requested Savings Plan recommendation type. *

* * @param savingsPlansType * The requested Savings Plan recommendation type. * @see SupportedSavingsPlansType * @return Returns a reference to this object so that method calls can be chained together. * @see SupportedSavingsPlansType */ Builder savingsPlansType(String savingsPlansType); /** *

* The requested Savings Plan recommendation type. *

* * @param savingsPlansType * The requested Savings Plan recommendation type. * @see SupportedSavingsPlansType * @return Returns a reference to this object so that method calls can be chained together. * @see SupportedSavingsPlansType */ Builder savingsPlansType(SupportedSavingsPlansType savingsPlansType); /** *

* The term of the commitment in years. *

* * @param termInYears * The term of the commitment in years. * @see TermInYears * @return Returns a reference to this object so that method calls can be chained together. * @see TermInYears */ Builder termInYears(String termInYears); /** *

* The term of the commitment in years. *

* * @param termInYears * The term of the commitment in years. * @see TermInYears * @return Returns a reference to this object so that method calls can be chained together. * @see TermInYears */ Builder termInYears(TermInYears termInYears); /** *

* The payment option for the commitment (for example, All Upfront or No Upfront). *

* * @param paymentOption * The payment option for the commitment (for example, All Upfront or No Upfront). * @see PaymentOption * @return Returns a reference to this object so that method calls can be chained together. * @see PaymentOption */ Builder paymentOption(String paymentOption); /** *

* The payment option for the commitment (for example, All Upfront or No Upfront). *

* * @param paymentOption * The payment option for the commitment (for example, All Upfront or No Upfront). * @see PaymentOption * @return Returns a reference to this object so that method calls can be chained together. * @see PaymentOption */ Builder paymentOption(PaymentOption paymentOption); /** *

* The AccountID that the recommendation is generated for. *

* * @param accountId * The AccountID that the recommendation is generated for. * @return Returns a reference to this object so that method calls can be chained together. */ Builder accountId(String accountId); /** *

* The currency code that Amazon Web Services used to generate the recommendation and present potential savings. *

* * @param currencyCode * The currency code that Amazon Web Services used to generate the recommendation and present potential * savings. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currencyCode(String currencyCode); /** *

* The instance family of the recommended Savings Plan. *

* * @param instanceFamily * The instance family of the recommended Savings Plan. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceFamily(String instanceFamily); /** *

* The region the recommendation is generated for. *

* * @param region * The region the recommendation is generated for. * @return Returns a reference to this object so that method calls can be chained together. */ Builder region(String region); /** *

* The unique ID that's used to distinguish Savings Plans from one another. *

* * @param offeringId * The unique ID that's used to distinguish Savings Plans from one another. * @return Returns a reference to this object so that method calls can be chained together. */ Builder offeringId(String offeringId); /** * Sets the value of the GenerationTimestamp property for this object. * * @param generationTimestamp * The new value for the GenerationTimestamp property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder generationTimestamp(String generationTimestamp); /** * Sets the value of the LatestUsageTimestamp property for this object. * * @param latestUsageTimestamp * The new value for the LatestUsageTimestamp property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder latestUsageTimestamp(String latestUsageTimestamp); /** *

* The average value of hourly On-Demand spend over the lookback period of the applicable usage type. *

* * @param currentAverageHourlyOnDemandSpend * The average value of hourly On-Demand spend over the lookback period of the applicable usage type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currentAverageHourlyOnDemandSpend(String currentAverageHourlyOnDemandSpend); /** *

* The highest value of hourly On-Demand spend over the lookback period of the applicable usage type. *

* * @param currentMaximumHourlyOnDemandSpend * The highest value of hourly On-Demand spend over the lookback period of the applicable usage type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currentMaximumHourlyOnDemandSpend(String currentMaximumHourlyOnDemandSpend); /** *

* The lowest value of hourly On-Demand spend over the lookback period of the applicable usage type. *

* * @param currentMinimumHourlyOnDemandSpend * The lowest value of hourly On-Demand spend over the lookback period of the applicable usage type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currentMinimumHourlyOnDemandSpend(String currentMinimumHourlyOnDemandSpend); /** *

* The estimated utilization of the recommended Savings Plan. *

* * @param estimatedAverageUtilization * The estimated utilization of the recommended Savings Plan. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedAverageUtilization(String estimatedAverageUtilization); /** *

* The estimated monthly savings amount based on the recommended Savings Plan. *

* * @param estimatedMonthlySavingsAmount * The estimated monthly savings amount based on the recommended Savings Plan. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedMonthlySavingsAmount(String estimatedMonthlySavingsAmount); /** *

* The remaining On-Demand cost estimated to not be covered by the recommended Savings Plan, over the length of * the lookback period. *

* * @param estimatedOnDemandCost * The remaining On-Demand cost estimated to not be covered by the recommended Savings Plan, over the * length of the lookback period. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedOnDemandCost(String estimatedOnDemandCost); /** *

* The estimated On-Demand costs you expect with no additional commitment, based on your usage of the selected * time period and the Savings Plan you own. *

* * @param estimatedOnDemandCostWithCurrentCommitment * The estimated On-Demand costs you expect with no additional commitment, based on your usage of the * selected time period and the Savings Plan you own. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedOnDemandCostWithCurrentCommitment(String estimatedOnDemandCostWithCurrentCommitment); /** *

* The estimated return on investment that's based on the recommended Savings Plan that you purchased. This is * calculated as estimatedSavingsAmount/estimatedSPCost*100. *

* * @param estimatedROI * The estimated return on investment that's based on the recommended Savings Plan that you purchased. * This is calculated as estimatedSavingsAmount/estimatedSPCost*100. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedROI(String estimatedROI); /** *

* The cost of the recommended Savings Plan over the length of the lookback period. *

* * @param estimatedSPCost * The cost of the recommended Savings Plan over the length of the lookback period. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedSPCost(String estimatedSPCost); /** *

* The estimated savings amount that's based on the recommended Savings Plan over the length of the lookback * period. *

* * @param estimatedSavingsAmount * The estimated savings amount that's based on the recommended Savings Plan over the length of the * lookback period. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedSavingsAmount(String estimatedSavingsAmount); /** *

* The estimated savings percentage relative to the total cost of applicable On-Demand usage over the lookback * period. *

* * @param estimatedSavingsPercentage * The estimated savings percentage relative to the total cost of applicable On-Demand usage over the * lookback period. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedSavingsPercentage(String estimatedSavingsPercentage); /** *

* The existing hourly commitment for the Savings Plan type. *

* * @param existingHourlyCommitment * The existing hourly commitment for the Savings Plan type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder existingHourlyCommitment(String existingHourlyCommitment); /** *

* The recommended hourly commitment level for the Savings Plan type and the configuration that's based on the * usage during the lookback period. *

* * @param hourlyCommitmentToPurchase * The recommended hourly commitment level for the Savings Plan type and the configuration that's based * on the usage during the lookback period. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hourlyCommitmentToPurchase(String hourlyCommitmentToPurchase); /** *

* The upfront cost of the recommended Savings Plan, based on the selected payment option. *

* * @param upfrontCost * The upfront cost of the recommended Savings Plan, based on the selected payment option. * @return Returns a reference to this object so that method calls can be chained together. */ Builder upfrontCost(String upfrontCost); /** *

* The average value of hourly coverage over the lookback period. *

* * @param currentAverageCoverage * The average value of hourly coverage over the lookback period. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currentAverageCoverage(String currentAverageCoverage); /** *

* The estimated coverage of the recommended Savings Plan. *

* * @param estimatedAverageCoverage * The estimated coverage of the recommended Savings Plan. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedAverageCoverage(String estimatedAverageCoverage); /** *

* The related hourly cost, coverage, and utilization metrics over the lookback period. *

* * @param metricsOverLookbackPeriod * The related hourly cost, coverage, and utilization metrics over the lookback period. * @return Returns a reference to this object so that method calls can be chained together. */ Builder metricsOverLookbackPeriod(Collection metricsOverLookbackPeriod); /** *

* The related hourly cost, coverage, and utilization metrics over the lookback period. *

* * @param metricsOverLookbackPeriod * The related hourly cost, coverage, and utilization metrics over the lookback period. * @return Returns a reference to this object so that method calls can be chained together. */ Builder metricsOverLookbackPeriod(RecommendationDetailHourlyMetrics... metricsOverLookbackPeriod); /** *

* The related hourly cost, coverage, and utilization metrics over the lookback period. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.costexplorer.model.RecommendationDetailHourlyMetrics.Builder} avoiding * the need to create one manually via * {@link software.amazon.awssdk.services.costexplorer.model.RecommendationDetailHourlyMetrics#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.costexplorer.model.RecommendationDetailHourlyMetrics.Builder#build()} * is called immediately and its result is passed to {@link * #metricsOverLookbackPeriod(List)}. * * @param metricsOverLookbackPeriod * a consumer that will call methods on * {@link software.amazon.awssdk.services.costexplorer.model.RecommendationDetailHourlyMetrics.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #metricsOverLookbackPeriod(java.util.Collection) */ Builder metricsOverLookbackPeriod(Consumer... metricsOverLookbackPeriod); } static final class BuilderImpl implements Builder { private String accountScope; private String lookbackPeriodInDays; private String savingsPlansType; private String termInYears; private String paymentOption; private String accountId; private String currencyCode; private String instanceFamily; private String region; private String offeringId; private String generationTimestamp; private String latestUsageTimestamp; private String currentAverageHourlyOnDemandSpend; private String currentMaximumHourlyOnDemandSpend; private String currentMinimumHourlyOnDemandSpend; private String estimatedAverageUtilization; private String estimatedMonthlySavingsAmount; private String estimatedOnDemandCost; private String estimatedOnDemandCostWithCurrentCommitment; private String estimatedROI; private String estimatedSPCost; private String estimatedSavingsAmount; private String estimatedSavingsPercentage; private String existingHourlyCommitment; private String hourlyCommitmentToPurchase; private String upfrontCost; private String currentAverageCoverage; private String estimatedAverageCoverage; private List metricsOverLookbackPeriod = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(RecommendationDetailData model) { accountScope(model.accountScope); lookbackPeriodInDays(model.lookbackPeriodInDays); savingsPlansType(model.savingsPlansType); termInYears(model.termInYears); paymentOption(model.paymentOption); accountId(model.accountId); currencyCode(model.currencyCode); instanceFamily(model.instanceFamily); region(model.region); offeringId(model.offeringId); generationTimestamp(model.generationTimestamp); latestUsageTimestamp(model.latestUsageTimestamp); currentAverageHourlyOnDemandSpend(model.currentAverageHourlyOnDemandSpend); currentMaximumHourlyOnDemandSpend(model.currentMaximumHourlyOnDemandSpend); currentMinimumHourlyOnDemandSpend(model.currentMinimumHourlyOnDemandSpend); estimatedAverageUtilization(model.estimatedAverageUtilization); estimatedMonthlySavingsAmount(model.estimatedMonthlySavingsAmount); estimatedOnDemandCost(model.estimatedOnDemandCost); estimatedOnDemandCostWithCurrentCommitment(model.estimatedOnDemandCostWithCurrentCommitment); estimatedROI(model.estimatedROI); estimatedSPCost(model.estimatedSPCost); estimatedSavingsAmount(model.estimatedSavingsAmount); estimatedSavingsPercentage(model.estimatedSavingsPercentage); existingHourlyCommitment(model.existingHourlyCommitment); hourlyCommitmentToPurchase(model.hourlyCommitmentToPurchase); upfrontCost(model.upfrontCost); currentAverageCoverage(model.currentAverageCoverage); estimatedAverageCoverage(model.estimatedAverageCoverage); metricsOverLookbackPeriod(model.metricsOverLookbackPeriod); } public final String getAccountScope() { return accountScope; } public final void setAccountScope(String accountScope) { this.accountScope = accountScope; } @Override public final Builder accountScope(String accountScope) { this.accountScope = accountScope; return this; } @Override public final Builder accountScope(AccountScope accountScope) { this.accountScope(accountScope == null ? null : accountScope.toString()); return this; } public final String getLookbackPeriodInDays() { return lookbackPeriodInDays; } public final void setLookbackPeriodInDays(String lookbackPeriodInDays) { this.lookbackPeriodInDays = lookbackPeriodInDays; } @Override public final Builder lookbackPeriodInDays(String lookbackPeriodInDays) { this.lookbackPeriodInDays = lookbackPeriodInDays; return this; } @Override public final Builder lookbackPeriodInDays(LookbackPeriodInDays lookbackPeriodInDays) { this.lookbackPeriodInDays(lookbackPeriodInDays == null ? null : lookbackPeriodInDays.toString()); return this; } public final String getSavingsPlansType() { return savingsPlansType; } public final void setSavingsPlansType(String savingsPlansType) { this.savingsPlansType = savingsPlansType; } @Override public final Builder savingsPlansType(String savingsPlansType) { this.savingsPlansType = savingsPlansType; return this; } @Override public final Builder savingsPlansType(SupportedSavingsPlansType savingsPlansType) { this.savingsPlansType(savingsPlansType == null ? null : savingsPlansType.toString()); return this; } public final String getTermInYears() { return termInYears; } public final void setTermInYears(String termInYears) { this.termInYears = termInYears; } @Override public final Builder termInYears(String termInYears) { this.termInYears = termInYears; return this; } @Override public final Builder termInYears(TermInYears termInYears) { this.termInYears(termInYears == null ? null : termInYears.toString()); return this; } public final String getPaymentOption() { return paymentOption; } public final void setPaymentOption(String paymentOption) { this.paymentOption = paymentOption; } @Override public final Builder paymentOption(String paymentOption) { this.paymentOption = paymentOption; return this; } @Override public final Builder paymentOption(PaymentOption paymentOption) { this.paymentOption(paymentOption == null ? null : paymentOption.toString()); return this; } public final String getAccountId() { return accountId; } public final void setAccountId(String accountId) { this.accountId = accountId; } @Override public final Builder accountId(String accountId) { this.accountId = accountId; return this; } public final String getCurrencyCode() { return currencyCode; } public final void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } @Override public final Builder currencyCode(String currencyCode) { this.currencyCode = currencyCode; return this; } public final String getInstanceFamily() { return instanceFamily; } public final void setInstanceFamily(String instanceFamily) { this.instanceFamily = instanceFamily; } @Override public final Builder instanceFamily(String instanceFamily) { this.instanceFamily = instanceFamily; return this; } public final String getRegion() { return region; } public final void setRegion(String region) { this.region = region; } @Override public final Builder region(String region) { this.region = region; return this; } public final String getOfferingId() { return offeringId; } public final void setOfferingId(String offeringId) { this.offeringId = offeringId; } @Override public final Builder offeringId(String offeringId) { this.offeringId = offeringId; return this; } public final String getGenerationTimestamp() { return generationTimestamp; } public final void setGenerationTimestamp(String generationTimestamp) { this.generationTimestamp = generationTimestamp; } @Override public final Builder generationTimestamp(String generationTimestamp) { this.generationTimestamp = generationTimestamp; return this; } public final String getLatestUsageTimestamp() { return latestUsageTimestamp; } public final void setLatestUsageTimestamp(String latestUsageTimestamp) { this.latestUsageTimestamp = latestUsageTimestamp; } @Override public final Builder latestUsageTimestamp(String latestUsageTimestamp) { this.latestUsageTimestamp = latestUsageTimestamp; return this; } public final String getCurrentAverageHourlyOnDemandSpend() { return currentAverageHourlyOnDemandSpend; } public final void setCurrentAverageHourlyOnDemandSpend(String currentAverageHourlyOnDemandSpend) { this.currentAverageHourlyOnDemandSpend = currentAverageHourlyOnDemandSpend; } @Override public final Builder currentAverageHourlyOnDemandSpend(String currentAverageHourlyOnDemandSpend) { this.currentAverageHourlyOnDemandSpend = currentAverageHourlyOnDemandSpend; return this; } public final String getCurrentMaximumHourlyOnDemandSpend() { return currentMaximumHourlyOnDemandSpend; } public final void setCurrentMaximumHourlyOnDemandSpend(String currentMaximumHourlyOnDemandSpend) { this.currentMaximumHourlyOnDemandSpend = currentMaximumHourlyOnDemandSpend; } @Override public final Builder currentMaximumHourlyOnDemandSpend(String currentMaximumHourlyOnDemandSpend) { this.currentMaximumHourlyOnDemandSpend = currentMaximumHourlyOnDemandSpend; return this; } public final String getCurrentMinimumHourlyOnDemandSpend() { return currentMinimumHourlyOnDemandSpend; } public final void setCurrentMinimumHourlyOnDemandSpend(String currentMinimumHourlyOnDemandSpend) { this.currentMinimumHourlyOnDemandSpend = currentMinimumHourlyOnDemandSpend; } @Override public final Builder currentMinimumHourlyOnDemandSpend(String currentMinimumHourlyOnDemandSpend) { this.currentMinimumHourlyOnDemandSpend = currentMinimumHourlyOnDemandSpend; return this; } public final String getEstimatedAverageUtilization() { return estimatedAverageUtilization; } public final void setEstimatedAverageUtilization(String estimatedAverageUtilization) { this.estimatedAverageUtilization = estimatedAverageUtilization; } @Override public final Builder estimatedAverageUtilization(String estimatedAverageUtilization) { this.estimatedAverageUtilization = estimatedAverageUtilization; return this; } public final String getEstimatedMonthlySavingsAmount() { return estimatedMonthlySavingsAmount; } public final void setEstimatedMonthlySavingsAmount(String estimatedMonthlySavingsAmount) { this.estimatedMonthlySavingsAmount = estimatedMonthlySavingsAmount; } @Override public final Builder estimatedMonthlySavingsAmount(String estimatedMonthlySavingsAmount) { this.estimatedMonthlySavingsAmount = estimatedMonthlySavingsAmount; return this; } public final String getEstimatedOnDemandCost() { return estimatedOnDemandCost; } public final void setEstimatedOnDemandCost(String estimatedOnDemandCost) { this.estimatedOnDemandCost = estimatedOnDemandCost; } @Override public final Builder estimatedOnDemandCost(String estimatedOnDemandCost) { this.estimatedOnDemandCost = estimatedOnDemandCost; return this; } public final String getEstimatedOnDemandCostWithCurrentCommitment() { return estimatedOnDemandCostWithCurrentCommitment; } public final void setEstimatedOnDemandCostWithCurrentCommitment(String estimatedOnDemandCostWithCurrentCommitment) { this.estimatedOnDemandCostWithCurrentCommitment = estimatedOnDemandCostWithCurrentCommitment; } @Override public final Builder estimatedOnDemandCostWithCurrentCommitment(String estimatedOnDemandCostWithCurrentCommitment) { this.estimatedOnDemandCostWithCurrentCommitment = estimatedOnDemandCostWithCurrentCommitment; return this; } public final String getEstimatedROI() { return estimatedROI; } public final void setEstimatedROI(String estimatedROI) { this.estimatedROI = estimatedROI; } @Override public final Builder estimatedROI(String estimatedROI) { this.estimatedROI = estimatedROI; return this; } public final String getEstimatedSPCost() { return estimatedSPCost; } public final void setEstimatedSPCost(String estimatedSPCost) { this.estimatedSPCost = estimatedSPCost; } @Override public final Builder estimatedSPCost(String estimatedSPCost) { this.estimatedSPCost = estimatedSPCost; return this; } public final String getEstimatedSavingsAmount() { return estimatedSavingsAmount; } public final void setEstimatedSavingsAmount(String estimatedSavingsAmount) { this.estimatedSavingsAmount = estimatedSavingsAmount; } @Override public final Builder estimatedSavingsAmount(String estimatedSavingsAmount) { this.estimatedSavingsAmount = estimatedSavingsAmount; return this; } public final String getEstimatedSavingsPercentage() { return estimatedSavingsPercentage; } public final void setEstimatedSavingsPercentage(String estimatedSavingsPercentage) { this.estimatedSavingsPercentage = estimatedSavingsPercentage; } @Override public final Builder estimatedSavingsPercentage(String estimatedSavingsPercentage) { this.estimatedSavingsPercentage = estimatedSavingsPercentage; return this; } public final String getExistingHourlyCommitment() { return existingHourlyCommitment; } public final void setExistingHourlyCommitment(String existingHourlyCommitment) { this.existingHourlyCommitment = existingHourlyCommitment; } @Override public final Builder existingHourlyCommitment(String existingHourlyCommitment) { this.existingHourlyCommitment = existingHourlyCommitment; return this; } public final String getHourlyCommitmentToPurchase() { return hourlyCommitmentToPurchase; } public final void setHourlyCommitmentToPurchase(String hourlyCommitmentToPurchase) { this.hourlyCommitmentToPurchase = hourlyCommitmentToPurchase; } @Override public final Builder hourlyCommitmentToPurchase(String hourlyCommitmentToPurchase) { this.hourlyCommitmentToPurchase = hourlyCommitmentToPurchase; return this; } public final String getUpfrontCost() { return upfrontCost; } public final void setUpfrontCost(String upfrontCost) { this.upfrontCost = upfrontCost; } @Override public final Builder upfrontCost(String upfrontCost) { this.upfrontCost = upfrontCost; return this; } public final String getCurrentAverageCoverage() { return currentAverageCoverage; } public final void setCurrentAverageCoverage(String currentAverageCoverage) { this.currentAverageCoverage = currentAverageCoverage; } @Override public final Builder currentAverageCoverage(String currentAverageCoverage) { this.currentAverageCoverage = currentAverageCoverage; return this; } public final String getEstimatedAverageCoverage() { return estimatedAverageCoverage; } public final void setEstimatedAverageCoverage(String estimatedAverageCoverage) { this.estimatedAverageCoverage = estimatedAverageCoverage; } @Override public final Builder estimatedAverageCoverage(String estimatedAverageCoverage) { this.estimatedAverageCoverage = estimatedAverageCoverage; return this; } public final List getMetricsOverLookbackPeriod() { List result = MetricsOverLookbackPeriodCopier .copyToBuilder(this.metricsOverLookbackPeriod); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setMetricsOverLookbackPeriod( Collection metricsOverLookbackPeriod) { this.metricsOverLookbackPeriod = MetricsOverLookbackPeriodCopier.copyFromBuilder(metricsOverLookbackPeriod); } @Override public final Builder metricsOverLookbackPeriod(Collection metricsOverLookbackPeriod) { this.metricsOverLookbackPeriod = MetricsOverLookbackPeriodCopier.copy(metricsOverLookbackPeriod); return this; } @Override @SafeVarargs public final Builder metricsOverLookbackPeriod(RecommendationDetailHourlyMetrics... metricsOverLookbackPeriod) { metricsOverLookbackPeriod(Arrays.asList(metricsOverLookbackPeriod)); return this; } @Override @SafeVarargs public final Builder metricsOverLookbackPeriod( Consumer... metricsOverLookbackPeriod) { metricsOverLookbackPeriod(Stream.of(metricsOverLookbackPeriod) .map(c -> RecommendationDetailHourlyMetrics.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } @Override public RecommendationDetailData build() { return new RecommendationDetailData(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy