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

software.amazon.awssdk.services.costexplorer.model.ReservationPurchaseRecommendationDetail 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.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 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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Details about your recommended reservation purchase. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ReservationPurchaseRecommendationDetail implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AccountId").getter(getter(ReservationPurchaseRecommendationDetail::accountId)) .setter(setter(Builder::accountId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AccountId").build()).build(); private static final SdkField INSTANCE_DETAILS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("InstanceDetails") .getter(getter(ReservationPurchaseRecommendationDetail::instanceDetails)).setter(setter(Builder::instanceDetails)) .constructor(InstanceDetails::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceDetails").build()).build(); private static final SdkField RECOMMENDED_NUMBER_OF_INSTANCES_TO_PURCHASE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("RecommendedNumberOfInstancesToPurchase") .getter(getter(ReservationPurchaseRecommendationDetail::recommendedNumberOfInstancesToPurchase)) .setter(setter(Builder::recommendedNumberOfInstancesToPurchase)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("RecommendedNumberOfInstancesToPurchase").build()).build(); private static final SdkField RECOMMENDED_NORMALIZED_UNITS_TO_PURCHASE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("RecommendedNormalizedUnitsToPurchase") .getter(getter(ReservationPurchaseRecommendationDetail::recommendedNormalizedUnitsToPurchase)) .setter(setter(Builder::recommendedNormalizedUnitsToPurchase)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("RecommendedNormalizedUnitsToPurchase").build()).build(); private static final SdkField MINIMUM_NUMBER_OF_INSTANCES_USED_PER_HOUR_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("MinimumNumberOfInstancesUsedPerHour") .getter(getter(ReservationPurchaseRecommendationDetail::minimumNumberOfInstancesUsedPerHour)) .setter(setter(Builder::minimumNumberOfInstancesUsedPerHour)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("MinimumNumberOfInstancesUsedPerHour").build()).build(); private static final SdkField MINIMUM_NORMALIZED_UNITS_USED_PER_HOUR_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("MinimumNormalizedUnitsUsedPerHour") .getter(getter(ReservationPurchaseRecommendationDetail::minimumNormalizedUnitsUsedPerHour)) .setter(setter(Builder::minimumNormalizedUnitsUsedPerHour)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MinimumNormalizedUnitsUsedPerHour") .build()).build(); private static final SdkField MAXIMUM_NUMBER_OF_INSTANCES_USED_PER_HOUR_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("MaximumNumberOfInstancesUsedPerHour") .getter(getter(ReservationPurchaseRecommendationDetail::maximumNumberOfInstancesUsedPerHour)) .setter(setter(Builder::maximumNumberOfInstancesUsedPerHour)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("MaximumNumberOfInstancesUsedPerHour").build()).build(); private static final SdkField MAXIMUM_NORMALIZED_UNITS_USED_PER_HOUR_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("MaximumNormalizedUnitsUsedPerHour") .getter(getter(ReservationPurchaseRecommendationDetail::maximumNormalizedUnitsUsedPerHour)) .setter(setter(Builder::maximumNormalizedUnitsUsedPerHour)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaximumNormalizedUnitsUsedPerHour") .build()).build(); private static final SdkField AVERAGE_NUMBER_OF_INSTANCES_USED_PER_HOUR_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("AverageNumberOfInstancesUsedPerHour") .getter(getter(ReservationPurchaseRecommendationDetail::averageNumberOfInstancesUsedPerHour)) .setter(setter(Builder::averageNumberOfInstancesUsedPerHour)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("AverageNumberOfInstancesUsedPerHour").build()).build(); private static final SdkField AVERAGE_NORMALIZED_UNITS_USED_PER_HOUR_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("AverageNormalizedUnitsUsedPerHour") .getter(getter(ReservationPurchaseRecommendationDetail::averageNormalizedUnitsUsedPerHour)) .setter(setter(Builder::averageNormalizedUnitsUsedPerHour)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AverageNormalizedUnitsUsedPerHour") .build()).build(); private static final SdkField AVERAGE_UTILIZATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AverageUtilization").getter(getter(ReservationPurchaseRecommendationDetail::averageUtilization)) .setter(setter(Builder::averageUtilization)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AverageUtilization").build()) .build(); private static final SdkField ESTIMATED_BREAK_EVEN_IN_MONTHS_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("EstimatedBreakEvenInMonths") .getter(getter(ReservationPurchaseRecommendationDetail::estimatedBreakEvenInMonths)) .setter(setter(Builder::estimatedBreakEvenInMonths)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedBreakEvenInMonths").build()) .build(); private static final SdkField CURRENCY_CODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CurrencyCode").getter(getter(ReservationPurchaseRecommendationDetail::currencyCode)) .setter(setter(Builder::currencyCode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CurrencyCode").build()).build(); private static final SdkField ESTIMATED_MONTHLY_SAVINGS_AMOUNT_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("EstimatedMonthlySavingsAmount") .getter(getter(ReservationPurchaseRecommendationDetail::estimatedMonthlySavingsAmount)) .setter(setter(Builder::estimatedMonthlySavingsAmount)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedMonthlySavingsAmount") .build()).build(); private static final SdkField ESTIMATED_MONTHLY_SAVINGS_PERCENTAGE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("EstimatedMonthlySavingsPercentage") .getter(getter(ReservationPurchaseRecommendationDetail::estimatedMonthlySavingsPercentage)) .setter(setter(Builder::estimatedMonthlySavingsPercentage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedMonthlySavingsPercentage") .build()).build(); private static final SdkField ESTIMATED_MONTHLY_ON_DEMAND_COST_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("EstimatedMonthlyOnDemandCost") .getter(getter(ReservationPurchaseRecommendationDetail::estimatedMonthlyOnDemandCost)) .setter(setter(Builder::estimatedMonthlyOnDemandCost)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedMonthlyOnDemandCost") .build()).build(); private static final SdkField ESTIMATED_RESERVATION_COST_FOR_LOOKBACK_PERIOD_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("EstimatedReservationCostForLookbackPeriod") .getter(getter(ReservationPurchaseRecommendationDetail::estimatedReservationCostForLookbackPeriod)) .setter(setter(Builder::estimatedReservationCostForLookbackPeriod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("EstimatedReservationCostForLookbackPeriod").build()).build(); private static final SdkField UPFRONT_COST_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("UpfrontCost").getter(getter(ReservationPurchaseRecommendationDetail::upfrontCost)) .setter(setter(Builder::upfrontCost)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UpfrontCost").build()).build(); private static final SdkField RECURRING_STANDARD_MONTHLY_COST_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("RecurringStandardMonthlyCost") .getter(getter(ReservationPurchaseRecommendationDetail::recurringStandardMonthlyCost)) .setter(setter(Builder::recurringStandardMonthlyCost)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RecurringStandardMonthlyCost") .build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ACCOUNT_ID_FIELD, INSTANCE_DETAILS_FIELD, RECOMMENDED_NUMBER_OF_INSTANCES_TO_PURCHASE_FIELD, RECOMMENDED_NORMALIZED_UNITS_TO_PURCHASE_FIELD, MINIMUM_NUMBER_OF_INSTANCES_USED_PER_HOUR_FIELD, MINIMUM_NORMALIZED_UNITS_USED_PER_HOUR_FIELD, MAXIMUM_NUMBER_OF_INSTANCES_USED_PER_HOUR_FIELD, MAXIMUM_NORMALIZED_UNITS_USED_PER_HOUR_FIELD, AVERAGE_NUMBER_OF_INSTANCES_USED_PER_HOUR_FIELD, AVERAGE_NORMALIZED_UNITS_USED_PER_HOUR_FIELD, AVERAGE_UTILIZATION_FIELD, ESTIMATED_BREAK_EVEN_IN_MONTHS_FIELD, CURRENCY_CODE_FIELD, ESTIMATED_MONTHLY_SAVINGS_AMOUNT_FIELD, ESTIMATED_MONTHLY_SAVINGS_PERCENTAGE_FIELD, ESTIMATED_MONTHLY_ON_DEMAND_COST_FIELD, ESTIMATED_RESERVATION_COST_FOR_LOOKBACK_PERIOD_FIELD, UPFRONT_COST_FIELD, RECURRING_STANDARD_MONTHLY_COST_FIELD)); private static final long serialVersionUID = 1L; private final String accountId; private final InstanceDetails instanceDetails; private final String recommendedNumberOfInstancesToPurchase; private final String recommendedNormalizedUnitsToPurchase; private final String minimumNumberOfInstancesUsedPerHour; private final String minimumNormalizedUnitsUsedPerHour; private final String maximumNumberOfInstancesUsedPerHour; private final String maximumNormalizedUnitsUsedPerHour; private final String averageNumberOfInstancesUsedPerHour; private final String averageNormalizedUnitsUsedPerHour; private final String averageUtilization; private final String estimatedBreakEvenInMonths; private final String currencyCode; private final String estimatedMonthlySavingsAmount; private final String estimatedMonthlySavingsPercentage; private final String estimatedMonthlyOnDemandCost; private final String estimatedReservationCostForLookbackPeriod; private final String upfrontCost; private final String recurringStandardMonthlyCost; private ReservationPurchaseRecommendationDetail(BuilderImpl builder) { this.accountId = builder.accountId; this.instanceDetails = builder.instanceDetails; this.recommendedNumberOfInstancesToPurchase = builder.recommendedNumberOfInstancesToPurchase; this.recommendedNormalizedUnitsToPurchase = builder.recommendedNormalizedUnitsToPurchase; this.minimumNumberOfInstancesUsedPerHour = builder.minimumNumberOfInstancesUsedPerHour; this.minimumNormalizedUnitsUsedPerHour = builder.minimumNormalizedUnitsUsedPerHour; this.maximumNumberOfInstancesUsedPerHour = builder.maximumNumberOfInstancesUsedPerHour; this.maximumNormalizedUnitsUsedPerHour = builder.maximumNormalizedUnitsUsedPerHour; this.averageNumberOfInstancesUsedPerHour = builder.averageNumberOfInstancesUsedPerHour; this.averageNormalizedUnitsUsedPerHour = builder.averageNormalizedUnitsUsedPerHour; this.averageUtilization = builder.averageUtilization; this.estimatedBreakEvenInMonths = builder.estimatedBreakEvenInMonths; this.currencyCode = builder.currencyCode; this.estimatedMonthlySavingsAmount = builder.estimatedMonthlySavingsAmount; this.estimatedMonthlySavingsPercentage = builder.estimatedMonthlySavingsPercentage; this.estimatedMonthlyOnDemandCost = builder.estimatedMonthlyOnDemandCost; this.estimatedReservationCostForLookbackPeriod = builder.estimatedReservationCostForLookbackPeriod; this.upfrontCost = builder.upfrontCost; this.recurringStandardMonthlyCost = builder.recurringStandardMonthlyCost; } /** *

* The account that this RI recommendation is for. *

* * @return The account that this RI recommendation is for. */ public String accountId() { return accountId; } /** *

* Details about the instances that AWS recommends that you purchase. *

* * @return Details about the instances that AWS recommends that you purchase. */ public InstanceDetails instanceDetails() { return instanceDetails; } /** *

* The number of instances that AWS recommends that you purchase. *

* * @return The number of instances that AWS recommends that you purchase. */ public String recommendedNumberOfInstancesToPurchase() { return recommendedNumberOfInstancesToPurchase; } /** *

* The number of normalized units that AWS recommends that you purchase. *

* * @return The number of normalized units that AWS recommends that you purchase. */ public String recommendedNormalizedUnitsToPurchase() { return recommendedNormalizedUnitsToPurchase; } /** *

* The minimum number of instances that you used in an hour during the historical period. AWS uses this to calculate * your recommended reservation purchases. *

* * @return The minimum number of instances that you used in an hour during the historical period. AWS uses this to * calculate your recommended reservation purchases. */ public String minimumNumberOfInstancesUsedPerHour() { return minimumNumberOfInstancesUsedPerHour; } /** *

* The minimum number of normalized units that you used in an hour during the historical period. AWS uses this to * calculate your recommended reservation purchases. *

* * @return The minimum number of normalized units that you used in an hour during the historical period. AWS uses * this to calculate your recommended reservation purchases. */ public String minimumNormalizedUnitsUsedPerHour() { return minimumNormalizedUnitsUsedPerHour; } /** *

* The maximum number of instances that you used in an hour during the historical period. AWS uses this to calculate * your recommended reservation purchases. *

* * @return The maximum number of instances that you used in an hour during the historical period. AWS uses this to * calculate your recommended reservation purchases. */ public String maximumNumberOfInstancesUsedPerHour() { return maximumNumberOfInstancesUsedPerHour; } /** *

* The maximum number of normalized units that you used in an hour during the historical period. AWS uses this to * calculate your recommended reservation purchases. *

* * @return The maximum number of normalized units that you used in an hour during the historical period. AWS uses * this to calculate your recommended reservation purchases. */ public String maximumNormalizedUnitsUsedPerHour() { return maximumNormalizedUnitsUsedPerHour; } /** *

* The average number of instances that you used in an hour during the historical period. AWS uses this to calculate * your recommended reservation purchases. *

* * @return The average number of instances that you used in an hour during the historical period. AWS uses this to * calculate your recommended reservation purchases. */ public String averageNumberOfInstancesUsedPerHour() { return averageNumberOfInstancesUsedPerHour; } /** *

* The average number of normalized units that you used in an hour during the historical period. AWS uses this to * calculate your recommended reservation purchases. *

* * @return The average number of normalized units that you used in an hour during the historical period. AWS uses * this to calculate your recommended reservation purchases. */ public String averageNormalizedUnitsUsedPerHour() { return averageNormalizedUnitsUsedPerHour; } /** *

* The average utilization of your instances. AWS uses this to calculate your recommended reservation purchases. *

* * @return The average utilization of your instances. AWS uses this to calculate your recommended reservation * purchases. */ public String averageUtilization() { return averageUtilization; } /** *

* How long AWS estimates that it takes for this instance to start saving you money, in months. *

* * @return How long AWS estimates that it takes for this instance to start saving you money, in months. */ public String estimatedBreakEvenInMonths() { return estimatedBreakEvenInMonths; } /** *

* The currency code that AWS used to calculate the costs for this instance. *

* * @return The currency code that AWS used to calculate the costs for this instance. */ public String currencyCode() { return currencyCode; } /** *

* How much AWS estimates that this specific recommendation could save you in a month. *

* * @return How much AWS estimates that this specific recommendation could save you in a month. */ public String estimatedMonthlySavingsAmount() { return estimatedMonthlySavingsAmount; } /** *

* How much AWS estimates that this specific recommendation could save you in a month, as a percentage of your * overall costs. *

* * @return How much AWS estimates that this specific recommendation could save you in a month, as a percentage of * your overall costs. */ public String estimatedMonthlySavingsPercentage() { return estimatedMonthlySavingsPercentage; } /** *

* How much AWS estimates that you spend on On-Demand Instances in a month. *

* * @return How much AWS estimates that you spend on On-Demand Instances in a month. */ public String estimatedMonthlyOnDemandCost() { return estimatedMonthlyOnDemandCost; } /** *

* How much AWS estimates that you would have spent for all usage during the specified historical period if you had * a reservation. *

* * @return How much AWS estimates that you would have spent for all usage during the specified historical period if * you had a reservation. */ public String estimatedReservationCostForLookbackPeriod() { return estimatedReservationCostForLookbackPeriod; } /** *

* How much purchasing this instance costs you upfront. *

* * @return How much purchasing this instance costs you upfront. */ public String upfrontCost() { return upfrontCost; } /** *

* How much purchasing this instance costs you on a monthly basis. *

* * @return How much purchasing this instance costs you on a monthly basis. */ public String recurringStandardMonthlyCost() { return recurringStandardMonthlyCost; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(accountId()); hashCode = 31 * hashCode + Objects.hashCode(instanceDetails()); hashCode = 31 * hashCode + Objects.hashCode(recommendedNumberOfInstancesToPurchase()); hashCode = 31 * hashCode + Objects.hashCode(recommendedNormalizedUnitsToPurchase()); hashCode = 31 * hashCode + Objects.hashCode(minimumNumberOfInstancesUsedPerHour()); hashCode = 31 * hashCode + Objects.hashCode(minimumNormalizedUnitsUsedPerHour()); hashCode = 31 * hashCode + Objects.hashCode(maximumNumberOfInstancesUsedPerHour()); hashCode = 31 * hashCode + Objects.hashCode(maximumNormalizedUnitsUsedPerHour()); hashCode = 31 * hashCode + Objects.hashCode(averageNumberOfInstancesUsedPerHour()); hashCode = 31 * hashCode + Objects.hashCode(averageNormalizedUnitsUsedPerHour()); hashCode = 31 * hashCode + Objects.hashCode(averageUtilization()); hashCode = 31 * hashCode + Objects.hashCode(estimatedBreakEvenInMonths()); hashCode = 31 * hashCode + Objects.hashCode(currencyCode()); hashCode = 31 * hashCode + Objects.hashCode(estimatedMonthlySavingsAmount()); hashCode = 31 * hashCode + Objects.hashCode(estimatedMonthlySavingsPercentage()); hashCode = 31 * hashCode + Objects.hashCode(estimatedMonthlyOnDemandCost()); hashCode = 31 * hashCode + Objects.hashCode(estimatedReservationCostForLookbackPeriod()); hashCode = 31 * hashCode + Objects.hashCode(upfrontCost()); hashCode = 31 * hashCode + Objects.hashCode(recurringStandardMonthlyCost()); return hashCode; } @Override public boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ReservationPurchaseRecommendationDetail)) { return false; } ReservationPurchaseRecommendationDetail other = (ReservationPurchaseRecommendationDetail) obj; return Objects.equals(accountId(), other.accountId()) && Objects.equals(instanceDetails(), other.instanceDetails()) && Objects.equals(recommendedNumberOfInstancesToPurchase(), other.recommendedNumberOfInstancesToPurchase()) && Objects.equals(recommendedNormalizedUnitsToPurchase(), other.recommendedNormalizedUnitsToPurchase()) && Objects.equals(minimumNumberOfInstancesUsedPerHour(), other.minimumNumberOfInstancesUsedPerHour()) && Objects.equals(minimumNormalizedUnitsUsedPerHour(), other.minimumNormalizedUnitsUsedPerHour()) && Objects.equals(maximumNumberOfInstancesUsedPerHour(), other.maximumNumberOfInstancesUsedPerHour()) && Objects.equals(maximumNormalizedUnitsUsedPerHour(), other.maximumNormalizedUnitsUsedPerHour()) && Objects.equals(averageNumberOfInstancesUsedPerHour(), other.averageNumberOfInstancesUsedPerHour()) && Objects.equals(averageNormalizedUnitsUsedPerHour(), other.averageNormalizedUnitsUsedPerHour()) && Objects.equals(averageUtilization(), other.averageUtilization()) && Objects.equals(estimatedBreakEvenInMonths(), other.estimatedBreakEvenInMonths()) && Objects.equals(currencyCode(), other.currencyCode()) && Objects.equals(estimatedMonthlySavingsAmount(), other.estimatedMonthlySavingsAmount()) && Objects.equals(estimatedMonthlySavingsPercentage(), other.estimatedMonthlySavingsPercentage()) && Objects.equals(estimatedMonthlyOnDemandCost(), other.estimatedMonthlyOnDemandCost()) && Objects.equals(estimatedReservationCostForLookbackPeriod(), other.estimatedReservationCostForLookbackPeriod()) && Objects.equals(upfrontCost(), other.upfrontCost()) && Objects.equals(recurringStandardMonthlyCost(), other.recurringStandardMonthlyCost()); } /** * 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 String toString() { return ToString.builder("ReservationPurchaseRecommendationDetail").add("AccountId", accountId()) .add("InstanceDetails", instanceDetails()) .add("RecommendedNumberOfInstancesToPurchase", recommendedNumberOfInstancesToPurchase()) .add("RecommendedNormalizedUnitsToPurchase", recommendedNormalizedUnitsToPurchase()) .add("MinimumNumberOfInstancesUsedPerHour", minimumNumberOfInstancesUsedPerHour()) .add("MinimumNormalizedUnitsUsedPerHour", minimumNormalizedUnitsUsedPerHour()) .add("MaximumNumberOfInstancesUsedPerHour", maximumNumberOfInstancesUsedPerHour()) .add("MaximumNormalizedUnitsUsedPerHour", maximumNormalizedUnitsUsedPerHour()) .add("AverageNumberOfInstancesUsedPerHour", averageNumberOfInstancesUsedPerHour()) .add("AverageNormalizedUnitsUsedPerHour", averageNormalizedUnitsUsedPerHour()) .add("AverageUtilization", averageUtilization()).add("EstimatedBreakEvenInMonths", estimatedBreakEvenInMonths()) .add("CurrencyCode", currencyCode()).add("EstimatedMonthlySavingsAmount", estimatedMonthlySavingsAmount()) .add("EstimatedMonthlySavingsPercentage", estimatedMonthlySavingsPercentage()) .add("EstimatedMonthlyOnDemandCost", estimatedMonthlyOnDemandCost()) .add("EstimatedReservationCostForLookbackPeriod", estimatedReservationCostForLookbackPeriod()) .add("UpfrontCost", upfrontCost()).add("RecurringStandardMonthlyCost", recurringStandardMonthlyCost()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AccountId": return Optional.ofNullable(clazz.cast(accountId())); case "InstanceDetails": return Optional.ofNullable(clazz.cast(instanceDetails())); case "RecommendedNumberOfInstancesToPurchase": return Optional.ofNullable(clazz.cast(recommendedNumberOfInstancesToPurchase())); case "RecommendedNormalizedUnitsToPurchase": return Optional.ofNullable(clazz.cast(recommendedNormalizedUnitsToPurchase())); case "MinimumNumberOfInstancesUsedPerHour": return Optional.ofNullable(clazz.cast(minimumNumberOfInstancesUsedPerHour())); case "MinimumNormalizedUnitsUsedPerHour": return Optional.ofNullable(clazz.cast(minimumNormalizedUnitsUsedPerHour())); case "MaximumNumberOfInstancesUsedPerHour": return Optional.ofNullable(clazz.cast(maximumNumberOfInstancesUsedPerHour())); case "MaximumNormalizedUnitsUsedPerHour": return Optional.ofNullable(clazz.cast(maximumNormalizedUnitsUsedPerHour())); case "AverageNumberOfInstancesUsedPerHour": return Optional.ofNullable(clazz.cast(averageNumberOfInstancesUsedPerHour())); case "AverageNormalizedUnitsUsedPerHour": return Optional.ofNullable(clazz.cast(averageNormalizedUnitsUsedPerHour())); case "AverageUtilization": return Optional.ofNullable(clazz.cast(averageUtilization())); case "EstimatedBreakEvenInMonths": return Optional.ofNullable(clazz.cast(estimatedBreakEvenInMonths())); case "CurrencyCode": return Optional.ofNullable(clazz.cast(currencyCode())); case "EstimatedMonthlySavingsAmount": return Optional.ofNullable(clazz.cast(estimatedMonthlySavingsAmount())); case "EstimatedMonthlySavingsPercentage": return Optional.ofNullable(clazz.cast(estimatedMonthlySavingsPercentage())); case "EstimatedMonthlyOnDemandCost": return Optional.ofNullable(clazz.cast(estimatedMonthlyOnDemandCost())); case "EstimatedReservationCostForLookbackPeriod": return Optional.ofNullable(clazz.cast(estimatedReservationCostForLookbackPeriod())); case "UpfrontCost": return Optional.ofNullable(clazz.cast(upfrontCost())); case "RecurringStandardMonthlyCost": return Optional.ofNullable(clazz.cast(recurringStandardMonthlyCost())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ReservationPurchaseRecommendationDetail) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The account that this RI recommendation is for. *

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

* Details about the instances that AWS recommends that you purchase. *

* * @param instanceDetails * Details about the instances that AWS recommends that you purchase. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceDetails(InstanceDetails instanceDetails); /** *

* Details about the instances that AWS recommends that you purchase. *

* This is a convenience that creates an instance of the {@link InstanceDetails.Builder} avoiding the need to * create one manually via {@link InstanceDetails#builder()}. * * When the {@link Consumer} completes, {@link InstanceDetails.Builder#build()} is called immediately and its * result is passed to {@link #instanceDetails(InstanceDetails)}. * * @param instanceDetails * a consumer that will call methods on {@link InstanceDetails.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #instanceDetails(InstanceDetails) */ default Builder instanceDetails(Consumer instanceDetails) { return instanceDetails(InstanceDetails.builder().applyMutation(instanceDetails).build()); } /** *

* The number of instances that AWS recommends that you purchase. *

* * @param recommendedNumberOfInstancesToPurchase * The number of instances that AWS recommends that you purchase. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recommendedNumberOfInstancesToPurchase(String recommendedNumberOfInstancesToPurchase); /** *

* The number of normalized units that AWS recommends that you purchase. *

* * @param recommendedNormalizedUnitsToPurchase * The number of normalized units that AWS recommends that you purchase. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recommendedNormalizedUnitsToPurchase(String recommendedNormalizedUnitsToPurchase); /** *

* The minimum number of instances that you used in an hour during the historical period. AWS uses this to * calculate your recommended reservation purchases. *

* * @param minimumNumberOfInstancesUsedPerHour * The minimum number of instances that you used in an hour during the historical period. AWS uses this * to calculate your recommended reservation purchases. * @return Returns a reference to this object so that method calls can be chained together. */ Builder minimumNumberOfInstancesUsedPerHour(String minimumNumberOfInstancesUsedPerHour); /** *

* The minimum number of normalized units that you used in an hour during the historical period. AWS uses this * to calculate your recommended reservation purchases. *

* * @param minimumNormalizedUnitsUsedPerHour * The minimum number of normalized units that you used in an hour during the historical period. AWS uses * this to calculate your recommended reservation purchases. * @return Returns a reference to this object so that method calls can be chained together. */ Builder minimumNormalizedUnitsUsedPerHour(String minimumNormalizedUnitsUsedPerHour); /** *

* The maximum number of instances that you used in an hour during the historical period. AWS uses this to * calculate your recommended reservation purchases. *

* * @param maximumNumberOfInstancesUsedPerHour * The maximum number of instances that you used in an hour during the historical period. AWS uses this * to calculate your recommended reservation purchases. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maximumNumberOfInstancesUsedPerHour(String maximumNumberOfInstancesUsedPerHour); /** *

* The maximum number of normalized units that you used in an hour during the historical period. AWS uses this * to calculate your recommended reservation purchases. *

* * @param maximumNormalizedUnitsUsedPerHour * The maximum number of normalized units that you used in an hour during the historical period. AWS uses * this to calculate your recommended reservation purchases. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maximumNormalizedUnitsUsedPerHour(String maximumNormalizedUnitsUsedPerHour); /** *

* The average number of instances that you used in an hour during the historical period. AWS uses this to * calculate your recommended reservation purchases. *

* * @param averageNumberOfInstancesUsedPerHour * The average number of instances that you used in an hour during the historical period. AWS uses this * to calculate your recommended reservation purchases. * @return Returns a reference to this object so that method calls can be chained together. */ Builder averageNumberOfInstancesUsedPerHour(String averageNumberOfInstancesUsedPerHour); /** *

* The average number of normalized units that you used in an hour during the historical period. AWS uses this * to calculate your recommended reservation purchases. *

* * @param averageNormalizedUnitsUsedPerHour * The average number of normalized units that you used in an hour during the historical period. AWS uses * this to calculate your recommended reservation purchases. * @return Returns a reference to this object so that method calls can be chained together. */ Builder averageNormalizedUnitsUsedPerHour(String averageNormalizedUnitsUsedPerHour); /** *

* The average utilization of your instances. AWS uses this to calculate your recommended reservation purchases. *

* * @param averageUtilization * The average utilization of your instances. AWS uses this to calculate your recommended reservation * purchases. * @return Returns a reference to this object so that method calls can be chained together. */ Builder averageUtilization(String averageUtilization); /** *

* How long AWS estimates that it takes for this instance to start saving you money, in months. *

* * @param estimatedBreakEvenInMonths * How long AWS estimates that it takes for this instance to start saving you money, in months. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedBreakEvenInMonths(String estimatedBreakEvenInMonths); /** *

* The currency code that AWS used to calculate the costs for this instance. *

* * @param currencyCode * The currency code that AWS used to calculate the costs for this instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currencyCode(String currencyCode); /** *

* How much AWS estimates that this specific recommendation could save you in a month. *

* * @param estimatedMonthlySavingsAmount * How much AWS estimates that this specific recommendation could save you in a month. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedMonthlySavingsAmount(String estimatedMonthlySavingsAmount); /** *

* How much AWS estimates that this specific recommendation could save you in a month, as a percentage of your * overall costs. *

* * @param estimatedMonthlySavingsPercentage * How much AWS estimates that this specific recommendation could save you in a month, as a percentage of * your overall costs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedMonthlySavingsPercentage(String estimatedMonthlySavingsPercentage); /** *

* How much AWS estimates that you spend on On-Demand Instances in a month. *

* * @param estimatedMonthlyOnDemandCost * How much AWS estimates that you spend on On-Demand Instances in a month. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedMonthlyOnDemandCost(String estimatedMonthlyOnDemandCost); /** *

* How much AWS estimates that you would have spent for all usage during the specified historical period if you * had a reservation. *

* * @param estimatedReservationCostForLookbackPeriod * How much AWS estimates that you would have spent for all usage during the specified historical period * if you had a reservation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedReservationCostForLookbackPeriod(String estimatedReservationCostForLookbackPeriod); /** *

* How much purchasing this instance costs you upfront. *

* * @param upfrontCost * How much purchasing this instance costs you upfront. * @return Returns a reference to this object so that method calls can be chained together. */ Builder upfrontCost(String upfrontCost); /** *

* How much purchasing this instance costs you on a monthly basis. *

* * @param recurringStandardMonthlyCost * How much purchasing this instance costs you on a monthly basis. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recurringStandardMonthlyCost(String recurringStandardMonthlyCost); } static final class BuilderImpl implements Builder { private String accountId; private InstanceDetails instanceDetails; private String recommendedNumberOfInstancesToPurchase; private String recommendedNormalizedUnitsToPurchase; private String minimumNumberOfInstancesUsedPerHour; private String minimumNormalizedUnitsUsedPerHour; private String maximumNumberOfInstancesUsedPerHour; private String maximumNormalizedUnitsUsedPerHour; private String averageNumberOfInstancesUsedPerHour; private String averageNormalizedUnitsUsedPerHour; private String averageUtilization; private String estimatedBreakEvenInMonths; private String currencyCode; private String estimatedMonthlySavingsAmount; private String estimatedMonthlySavingsPercentage; private String estimatedMonthlyOnDemandCost; private String estimatedReservationCostForLookbackPeriod; private String upfrontCost; private String recurringStandardMonthlyCost; private BuilderImpl() { } private BuilderImpl(ReservationPurchaseRecommendationDetail model) { accountId(model.accountId); instanceDetails(model.instanceDetails); recommendedNumberOfInstancesToPurchase(model.recommendedNumberOfInstancesToPurchase); recommendedNormalizedUnitsToPurchase(model.recommendedNormalizedUnitsToPurchase); minimumNumberOfInstancesUsedPerHour(model.minimumNumberOfInstancesUsedPerHour); minimumNormalizedUnitsUsedPerHour(model.minimumNormalizedUnitsUsedPerHour); maximumNumberOfInstancesUsedPerHour(model.maximumNumberOfInstancesUsedPerHour); maximumNormalizedUnitsUsedPerHour(model.maximumNormalizedUnitsUsedPerHour); averageNumberOfInstancesUsedPerHour(model.averageNumberOfInstancesUsedPerHour); averageNormalizedUnitsUsedPerHour(model.averageNormalizedUnitsUsedPerHour); averageUtilization(model.averageUtilization); estimatedBreakEvenInMonths(model.estimatedBreakEvenInMonths); currencyCode(model.currencyCode); estimatedMonthlySavingsAmount(model.estimatedMonthlySavingsAmount); estimatedMonthlySavingsPercentage(model.estimatedMonthlySavingsPercentage); estimatedMonthlyOnDemandCost(model.estimatedMonthlyOnDemandCost); estimatedReservationCostForLookbackPeriod(model.estimatedReservationCostForLookbackPeriod); upfrontCost(model.upfrontCost); recurringStandardMonthlyCost(model.recurringStandardMonthlyCost); } public final String getAccountId() { return accountId; } @Override public final Builder accountId(String accountId) { this.accountId = accountId; return this; } public final void setAccountId(String accountId) { this.accountId = accountId; } public final InstanceDetails.Builder getInstanceDetails() { return instanceDetails != null ? instanceDetails.toBuilder() : null; } @Override public final Builder instanceDetails(InstanceDetails instanceDetails) { this.instanceDetails = instanceDetails; return this; } public final void setInstanceDetails(InstanceDetails.BuilderImpl instanceDetails) { this.instanceDetails = instanceDetails != null ? instanceDetails.build() : null; } public final String getRecommendedNumberOfInstancesToPurchase() { return recommendedNumberOfInstancesToPurchase; } @Override public final Builder recommendedNumberOfInstancesToPurchase(String recommendedNumberOfInstancesToPurchase) { this.recommendedNumberOfInstancesToPurchase = recommendedNumberOfInstancesToPurchase; return this; } public final void setRecommendedNumberOfInstancesToPurchase(String recommendedNumberOfInstancesToPurchase) { this.recommendedNumberOfInstancesToPurchase = recommendedNumberOfInstancesToPurchase; } public final String getRecommendedNormalizedUnitsToPurchase() { return recommendedNormalizedUnitsToPurchase; } @Override public final Builder recommendedNormalizedUnitsToPurchase(String recommendedNormalizedUnitsToPurchase) { this.recommendedNormalizedUnitsToPurchase = recommendedNormalizedUnitsToPurchase; return this; } public final void setRecommendedNormalizedUnitsToPurchase(String recommendedNormalizedUnitsToPurchase) { this.recommendedNormalizedUnitsToPurchase = recommendedNormalizedUnitsToPurchase; } public final String getMinimumNumberOfInstancesUsedPerHour() { return minimumNumberOfInstancesUsedPerHour; } @Override public final Builder minimumNumberOfInstancesUsedPerHour(String minimumNumberOfInstancesUsedPerHour) { this.minimumNumberOfInstancesUsedPerHour = minimumNumberOfInstancesUsedPerHour; return this; } public final void setMinimumNumberOfInstancesUsedPerHour(String minimumNumberOfInstancesUsedPerHour) { this.minimumNumberOfInstancesUsedPerHour = minimumNumberOfInstancesUsedPerHour; } public final String getMinimumNormalizedUnitsUsedPerHour() { return minimumNormalizedUnitsUsedPerHour; } @Override public final Builder minimumNormalizedUnitsUsedPerHour(String minimumNormalizedUnitsUsedPerHour) { this.minimumNormalizedUnitsUsedPerHour = minimumNormalizedUnitsUsedPerHour; return this; } public final void setMinimumNormalizedUnitsUsedPerHour(String minimumNormalizedUnitsUsedPerHour) { this.minimumNormalizedUnitsUsedPerHour = minimumNormalizedUnitsUsedPerHour; } public final String getMaximumNumberOfInstancesUsedPerHour() { return maximumNumberOfInstancesUsedPerHour; } @Override public final Builder maximumNumberOfInstancesUsedPerHour(String maximumNumberOfInstancesUsedPerHour) { this.maximumNumberOfInstancesUsedPerHour = maximumNumberOfInstancesUsedPerHour; return this; } public final void setMaximumNumberOfInstancesUsedPerHour(String maximumNumberOfInstancesUsedPerHour) { this.maximumNumberOfInstancesUsedPerHour = maximumNumberOfInstancesUsedPerHour; } public final String getMaximumNormalizedUnitsUsedPerHour() { return maximumNormalizedUnitsUsedPerHour; } @Override public final Builder maximumNormalizedUnitsUsedPerHour(String maximumNormalizedUnitsUsedPerHour) { this.maximumNormalizedUnitsUsedPerHour = maximumNormalizedUnitsUsedPerHour; return this; } public final void setMaximumNormalizedUnitsUsedPerHour(String maximumNormalizedUnitsUsedPerHour) { this.maximumNormalizedUnitsUsedPerHour = maximumNormalizedUnitsUsedPerHour; } public final String getAverageNumberOfInstancesUsedPerHour() { return averageNumberOfInstancesUsedPerHour; } @Override public final Builder averageNumberOfInstancesUsedPerHour(String averageNumberOfInstancesUsedPerHour) { this.averageNumberOfInstancesUsedPerHour = averageNumberOfInstancesUsedPerHour; return this; } public final void setAverageNumberOfInstancesUsedPerHour(String averageNumberOfInstancesUsedPerHour) { this.averageNumberOfInstancesUsedPerHour = averageNumberOfInstancesUsedPerHour; } public final String getAverageNormalizedUnitsUsedPerHour() { return averageNormalizedUnitsUsedPerHour; } @Override public final Builder averageNormalizedUnitsUsedPerHour(String averageNormalizedUnitsUsedPerHour) { this.averageNormalizedUnitsUsedPerHour = averageNormalizedUnitsUsedPerHour; return this; } public final void setAverageNormalizedUnitsUsedPerHour(String averageNormalizedUnitsUsedPerHour) { this.averageNormalizedUnitsUsedPerHour = averageNormalizedUnitsUsedPerHour; } public final String getAverageUtilization() { return averageUtilization; } @Override public final Builder averageUtilization(String averageUtilization) { this.averageUtilization = averageUtilization; return this; } public final void setAverageUtilization(String averageUtilization) { this.averageUtilization = averageUtilization; } public final String getEstimatedBreakEvenInMonths() { return estimatedBreakEvenInMonths; } @Override public final Builder estimatedBreakEvenInMonths(String estimatedBreakEvenInMonths) { this.estimatedBreakEvenInMonths = estimatedBreakEvenInMonths; return this; } public final void setEstimatedBreakEvenInMonths(String estimatedBreakEvenInMonths) { this.estimatedBreakEvenInMonths = estimatedBreakEvenInMonths; } public final String getCurrencyCode() { return currencyCode; } @Override public final Builder currencyCode(String currencyCode) { this.currencyCode = currencyCode; return this; } public final void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } public final String getEstimatedMonthlySavingsAmount() { return estimatedMonthlySavingsAmount; } @Override public final Builder estimatedMonthlySavingsAmount(String estimatedMonthlySavingsAmount) { this.estimatedMonthlySavingsAmount = estimatedMonthlySavingsAmount; return this; } public final void setEstimatedMonthlySavingsAmount(String estimatedMonthlySavingsAmount) { this.estimatedMonthlySavingsAmount = estimatedMonthlySavingsAmount; } public final String getEstimatedMonthlySavingsPercentage() { return estimatedMonthlySavingsPercentage; } @Override public final Builder estimatedMonthlySavingsPercentage(String estimatedMonthlySavingsPercentage) { this.estimatedMonthlySavingsPercentage = estimatedMonthlySavingsPercentage; return this; } public final void setEstimatedMonthlySavingsPercentage(String estimatedMonthlySavingsPercentage) { this.estimatedMonthlySavingsPercentage = estimatedMonthlySavingsPercentage; } public final String getEstimatedMonthlyOnDemandCost() { return estimatedMonthlyOnDemandCost; } @Override public final Builder estimatedMonthlyOnDemandCost(String estimatedMonthlyOnDemandCost) { this.estimatedMonthlyOnDemandCost = estimatedMonthlyOnDemandCost; return this; } public final void setEstimatedMonthlyOnDemandCost(String estimatedMonthlyOnDemandCost) { this.estimatedMonthlyOnDemandCost = estimatedMonthlyOnDemandCost; } public final String getEstimatedReservationCostForLookbackPeriod() { return estimatedReservationCostForLookbackPeriod; } @Override public final Builder estimatedReservationCostForLookbackPeriod(String estimatedReservationCostForLookbackPeriod) { this.estimatedReservationCostForLookbackPeriod = estimatedReservationCostForLookbackPeriod; return this; } public final void setEstimatedReservationCostForLookbackPeriod(String estimatedReservationCostForLookbackPeriod) { this.estimatedReservationCostForLookbackPeriod = estimatedReservationCostForLookbackPeriod; } public final String getUpfrontCost() { return upfrontCost; } @Override public final Builder upfrontCost(String upfrontCost) { this.upfrontCost = upfrontCost; return this; } public final void setUpfrontCost(String upfrontCost) { this.upfrontCost = upfrontCost; } public final String getRecurringStandardMonthlyCost() { return recurringStandardMonthlyCost; } @Override public final Builder recurringStandardMonthlyCost(String recurringStandardMonthlyCost) { this.recurringStandardMonthlyCost = recurringStandardMonthlyCost; return this; } public final void setRecurringStandardMonthlyCost(String recurringStandardMonthlyCost) { this.recurringStandardMonthlyCost = recurringStandardMonthlyCost; } @Override public ReservationPurchaseRecommendationDetail build() { return new ReservationPurchaseRecommendationDetail(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy