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

com.amazonaws.services.costexplorer.model.ReservationPurchaseRecommendation 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

The newest version!
/*
 * Copyright 2020-2025 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 com.amazonaws.services.costexplorer.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A specific reservation that Amazon Web Services recommends for purchase. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ReservationPurchaseRecommendation implements Serializable, Cloneable, StructuredPojo { /** *

* The account scope that Amazon Web Services recommends that you purchase this instance for. For example, you can * purchase this reservation for an entire organization in Amazon Web Services Organizations. *

*/ private String accountScope; /** *

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

*/ private String lookbackPeriodInDays; /** *

* The term of the reservation that you want recommendations for, in years. *

*/ private String termInYears; /** *

* The payment option for the reservation (for example, AllUpfront or NoUpfront). *

*/ private String paymentOption; /** *

* Hardware specifications for the service that you want recommendations for. *

*/ private ServiceSpecification serviceSpecification; /** *

* Details about the recommended purchases. *

*/ private java.util.List recommendationDetails; /** *

* A summary about the recommended purchase. *

*/ private ReservationPurchaseRecommendationSummary recommendationSummary; /** *

* The account scope that Amazon Web Services recommends that you purchase this instance for. For example, you can * purchase this reservation for an entire organization in Amazon Web Services Organizations. *

* * @param accountScope * The account scope that Amazon Web Services recommends that you purchase this instance for. For example, * you can purchase this reservation for an entire organization in Amazon Web Services Organizations. * @see AccountScope */ public void setAccountScope(String accountScope) { this.accountScope = accountScope; } /** *

* The account scope that Amazon Web Services recommends that you purchase this instance for. For example, you can * purchase this reservation for an entire organization in Amazon Web Services Organizations. *

* * @return The account scope that Amazon Web Services recommends that you purchase this instance for. For example, * you can purchase this reservation for an entire organization in Amazon Web Services Organizations. * @see AccountScope */ public String getAccountScope() { return this.accountScope; } /** *

* The account scope that Amazon Web Services recommends that you purchase this instance for. For example, you can * purchase this reservation for an entire organization in Amazon Web Services Organizations. *

* * @param accountScope * The account scope that Amazon Web Services recommends that you purchase this instance for. For example, * you can purchase this reservation for an entire organization in Amazon Web Services Organizations. * @return Returns a reference to this object so that method calls can be chained together. * @see AccountScope */ public ReservationPurchaseRecommendation withAccountScope(String accountScope) { setAccountScope(accountScope); return this; } /** *

* The account scope that Amazon Web Services recommends that you purchase this instance for. For example, you can * purchase this reservation for an entire organization in Amazon Web Services Organizations. *

* * @param accountScope * The account scope that Amazon Web Services recommends that you purchase this instance for. For example, * you can purchase this reservation for an entire organization in Amazon Web Services Organizations. * @return Returns a reference to this object so that method calls can be chained together. * @see AccountScope */ public ReservationPurchaseRecommendation withAccountScope(AccountScope accountScope) { this.accountScope = accountScope.toString(); return this; } /** *

* 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 */ public void setLookbackPeriodInDays(String lookbackPeriodInDays) { this.lookbackPeriodInDays = lookbackPeriodInDays; } /** *

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

* * @return How many days of previous usage that Amazon Web Services considers when making this recommendation. * @see LookbackPeriodInDays */ public String getLookbackPeriodInDays() { return this.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. * @return Returns a reference to this object so that method calls can be chained together. * @see LookbackPeriodInDays */ public ReservationPurchaseRecommendation withLookbackPeriodInDays(String lookbackPeriodInDays) { setLookbackPeriodInDays(lookbackPeriodInDays); return this; } /** *

* 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. * @return Returns a reference to this object so that method calls can be chained together. * @see LookbackPeriodInDays */ public ReservationPurchaseRecommendation withLookbackPeriodInDays(LookbackPeriodInDays lookbackPeriodInDays) { this.lookbackPeriodInDays = lookbackPeriodInDays.toString(); return this; } /** *

* The term of the reservation that you want recommendations for, in years. *

* * @param termInYears * The term of the reservation that you want recommendations for, in years. * @see TermInYears */ public void setTermInYears(String termInYears) { this.termInYears = termInYears; } /** *

* The term of the reservation that you want recommendations for, in years. *

* * @return The term of the reservation that you want recommendations for, in years. * @see TermInYears */ public String getTermInYears() { return this.termInYears; } /** *

* The term of the reservation that you want recommendations for, in years. *

* * @param termInYears * The term of the reservation that you want recommendations for, in years. * @return Returns a reference to this object so that method calls can be chained together. * @see TermInYears */ public ReservationPurchaseRecommendation withTermInYears(String termInYears) { setTermInYears(termInYears); return this; } /** *

* The term of the reservation that you want recommendations for, in years. *

* * @param termInYears * The term of the reservation that you want recommendations for, in years. * @return Returns a reference to this object so that method calls can be chained together. * @see TermInYears */ public ReservationPurchaseRecommendation withTermInYears(TermInYears termInYears) { this.termInYears = termInYears.toString(); return this; } /** *

* The payment option for the reservation (for example, AllUpfront or NoUpfront). *

* * @param paymentOption * The payment option for the reservation (for example, AllUpfront or NoUpfront). * @see PaymentOption */ public void setPaymentOption(String paymentOption) { this.paymentOption = paymentOption; } /** *

* The payment option for the reservation (for example, AllUpfront or NoUpfront). *

* * @return The payment option for the reservation (for example, AllUpfront or NoUpfront). * @see PaymentOption */ public String getPaymentOption() { return this.paymentOption; } /** *

* The payment option for the reservation (for example, AllUpfront or NoUpfront). *

* * @param paymentOption * The payment option for the reservation (for example, AllUpfront or NoUpfront). * @return Returns a reference to this object so that method calls can be chained together. * @see PaymentOption */ public ReservationPurchaseRecommendation withPaymentOption(String paymentOption) { setPaymentOption(paymentOption); return this; } /** *

* The payment option for the reservation (for example, AllUpfront or NoUpfront). *

* * @param paymentOption * The payment option for the reservation (for example, AllUpfront or NoUpfront). * @return Returns a reference to this object so that method calls can be chained together. * @see PaymentOption */ public ReservationPurchaseRecommendation withPaymentOption(PaymentOption paymentOption) { this.paymentOption = paymentOption.toString(); return this; } /** *

* Hardware specifications for the service that you want recommendations for. *

* * @param serviceSpecification * Hardware specifications for the service that you want recommendations for. */ public void setServiceSpecification(ServiceSpecification serviceSpecification) { this.serviceSpecification = serviceSpecification; } /** *

* Hardware specifications for the service that you want recommendations for. *

* * @return Hardware specifications for the service that you want recommendations for. */ public ServiceSpecification getServiceSpecification() { return this.serviceSpecification; } /** *

* Hardware specifications for the service that you want recommendations for. *

* * @param serviceSpecification * Hardware specifications for the service that you want recommendations for. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationPurchaseRecommendation withServiceSpecification(ServiceSpecification serviceSpecification) { setServiceSpecification(serviceSpecification); return this; } /** *

* Details about the recommended purchases. *

* * @return Details about the recommended purchases. */ public java.util.List getRecommendationDetails() { return recommendationDetails; } /** *

* Details about the recommended purchases. *

* * @param recommendationDetails * Details about the recommended purchases. */ public void setRecommendationDetails(java.util.Collection recommendationDetails) { if (recommendationDetails == null) { this.recommendationDetails = null; return; } this.recommendationDetails = new java.util.ArrayList(recommendationDetails); } /** *

* Details about the recommended purchases. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRecommendationDetails(java.util.Collection)} or * {@link #withRecommendationDetails(java.util.Collection)} if you want to override the existing values. *

* * @param recommendationDetails * Details about the recommended purchases. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationPurchaseRecommendation withRecommendationDetails(ReservationPurchaseRecommendationDetail... recommendationDetails) { if (this.recommendationDetails == null) { setRecommendationDetails(new java.util.ArrayList(recommendationDetails.length)); } for (ReservationPurchaseRecommendationDetail ele : recommendationDetails) { this.recommendationDetails.add(ele); } return this; } /** *

* Details about the recommended purchases. *

* * @param recommendationDetails * Details about the recommended purchases. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationPurchaseRecommendation withRecommendationDetails(java.util.Collection recommendationDetails) { setRecommendationDetails(recommendationDetails); return this; } /** *

* A summary about the recommended purchase. *

* * @param recommendationSummary * A summary about the recommended purchase. */ public void setRecommendationSummary(ReservationPurchaseRecommendationSummary recommendationSummary) { this.recommendationSummary = recommendationSummary; } /** *

* A summary about the recommended purchase. *

* * @return A summary about the recommended purchase. */ public ReservationPurchaseRecommendationSummary getRecommendationSummary() { return this.recommendationSummary; } /** *

* A summary about the recommended purchase. *

* * @param recommendationSummary * A summary about the recommended purchase. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationPurchaseRecommendation withRecommendationSummary(ReservationPurchaseRecommendationSummary recommendationSummary) { setRecommendationSummary(recommendationSummary); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAccountScope() != null) sb.append("AccountScope: ").append(getAccountScope()).append(","); if (getLookbackPeriodInDays() != null) sb.append("LookbackPeriodInDays: ").append(getLookbackPeriodInDays()).append(","); if (getTermInYears() != null) sb.append("TermInYears: ").append(getTermInYears()).append(","); if (getPaymentOption() != null) sb.append("PaymentOption: ").append(getPaymentOption()).append(","); if (getServiceSpecification() != null) sb.append("ServiceSpecification: ").append(getServiceSpecification()).append(","); if (getRecommendationDetails() != null) sb.append("RecommendationDetails: ").append(getRecommendationDetails()).append(","); if (getRecommendationSummary() != null) sb.append("RecommendationSummary: ").append(getRecommendationSummary()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReservationPurchaseRecommendation == false) return false; ReservationPurchaseRecommendation other = (ReservationPurchaseRecommendation) obj; if (other.getAccountScope() == null ^ this.getAccountScope() == null) return false; if (other.getAccountScope() != null && other.getAccountScope().equals(this.getAccountScope()) == false) return false; if (other.getLookbackPeriodInDays() == null ^ this.getLookbackPeriodInDays() == null) return false; if (other.getLookbackPeriodInDays() != null && other.getLookbackPeriodInDays().equals(this.getLookbackPeriodInDays()) == false) return false; if (other.getTermInYears() == null ^ this.getTermInYears() == null) return false; if (other.getTermInYears() != null && other.getTermInYears().equals(this.getTermInYears()) == false) return false; if (other.getPaymentOption() == null ^ this.getPaymentOption() == null) return false; if (other.getPaymentOption() != null && other.getPaymentOption().equals(this.getPaymentOption()) == false) return false; if (other.getServiceSpecification() == null ^ this.getServiceSpecification() == null) return false; if (other.getServiceSpecification() != null && other.getServiceSpecification().equals(this.getServiceSpecification()) == false) return false; if (other.getRecommendationDetails() == null ^ this.getRecommendationDetails() == null) return false; if (other.getRecommendationDetails() != null && other.getRecommendationDetails().equals(this.getRecommendationDetails()) == false) return false; if (other.getRecommendationSummary() == null ^ this.getRecommendationSummary() == null) return false; if (other.getRecommendationSummary() != null && other.getRecommendationSummary().equals(this.getRecommendationSummary()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAccountScope() == null) ? 0 : getAccountScope().hashCode()); hashCode = prime * hashCode + ((getLookbackPeriodInDays() == null) ? 0 : getLookbackPeriodInDays().hashCode()); hashCode = prime * hashCode + ((getTermInYears() == null) ? 0 : getTermInYears().hashCode()); hashCode = prime * hashCode + ((getPaymentOption() == null) ? 0 : getPaymentOption().hashCode()); hashCode = prime * hashCode + ((getServiceSpecification() == null) ? 0 : getServiceSpecification().hashCode()); hashCode = prime * hashCode + ((getRecommendationDetails() == null) ? 0 : getRecommendationDetails().hashCode()); hashCode = prime * hashCode + ((getRecommendationSummary() == null) ? 0 : getRecommendationSummary().hashCode()); return hashCode; } @Override public ReservationPurchaseRecommendation clone() { try { return (ReservationPurchaseRecommendation) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.costexplorer.model.transform.ReservationPurchaseRecommendationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy