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

com.amazonaws.services.savingsplans.model.SavingsPlanOfferingRate Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2017-2022 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.savingsplans.model;

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

/**
 * 

* Information about a Savings Plan offering rate. *

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

* The Savings Plan offering. *

*/ private ParentSavingsPlanOffering savingsPlanOffering; /** *

* The Savings Plan rate. *

*/ private String rate; /** *

* The unit. *

*/ private String unit; /** *

* The product type. *

*/ private String productType; /** *

* The service. *

*/ private String serviceCode; /** *

* The usage details of the line item in the billing report. *

*/ private String usageType; /** *

* The specific AWS operation for the line item in the billing report. *

*/ private String operation; /** *

* The properties. *

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

* The Savings Plan offering. *

* * @param savingsPlanOffering * The Savings Plan offering. */ public void setSavingsPlanOffering(ParentSavingsPlanOffering savingsPlanOffering) { this.savingsPlanOffering = savingsPlanOffering; } /** *

* The Savings Plan offering. *

* * @return The Savings Plan offering. */ public ParentSavingsPlanOffering getSavingsPlanOffering() { return this.savingsPlanOffering; } /** *

* The Savings Plan offering. *

* * @param savingsPlanOffering * The Savings Plan offering. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanOfferingRate withSavingsPlanOffering(ParentSavingsPlanOffering savingsPlanOffering) { setSavingsPlanOffering(savingsPlanOffering); return this; } /** *

* The Savings Plan rate. *

* * @param rate * The Savings Plan rate. */ public void setRate(String rate) { this.rate = rate; } /** *

* The Savings Plan rate. *

* * @return The Savings Plan rate. */ public String getRate() { return this.rate; } /** *

* The Savings Plan rate. *

* * @param rate * The Savings Plan rate. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanOfferingRate withRate(String rate) { setRate(rate); return this; } /** *

* The unit. *

* * @param unit * The unit. * @see SavingsPlanRateUnit */ public void setUnit(String unit) { this.unit = unit; } /** *

* The unit. *

* * @return The unit. * @see SavingsPlanRateUnit */ public String getUnit() { return this.unit; } /** *

* The unit. *

* * @param unit * The unit. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanRateUnit */ public SavingsPlanOfferingRate withUnit(String unit) { setUnit(unit); return this; } /** *

* The unit. *

* * @param unit * The unit. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanRateUnit */ public SavingsPlanOfferingRate withUnit(SavingsPlanRateUnit unit) { this.unit = unit.toString(); return this; } /** *

* The product type. *

* * @param productType * The product type. * @see SavingsPlanProductType */ public void setProductType(String productType) { this.productType = productType; } /** *

* The product type. *

* * @return The product type. * @see SavingsPlanProductType */ public String getProductType() { return this.productType; } /** *

* The product type. *

* * @param productType * The product type. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanProductType */ public SavingsPlanOfferingRate withProductType(String productType) { setProductType(productType); return this; } /** *

* The product type. *

* * @param productType * The product type. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanProductType */ public SavingsPlanOfferingRate withProductType(SavingsPlanProductType productType) { this.productType = productType.toString(); return this; } /** *

* The service. *

* * @param serviceCode * The service. * @see SavingsPlanRateServiceCode */ public void setServiceCode(String serviceCode) { this.serviceCode = serviceCode; } /** *

* The service. *

* * @return The service. * @see SavingsPlanRateServiceCode */ public String getServiceCode() { return this.serviceCode; } /** *

* The service. *

* * @param serviceCode * The service. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanRateServiceCode */ public SavingsPlanOfferingRate withServiceCode(String serviceCode) { setServiceCode(serviceCode); return this; } /** *

* The service. *

* * @param serviceCode * The service. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanRateServiceCode */ public SavingsPlanOfferingRate withServiceCode(SavingsPlanRateServiceCode serviceCode) { this.serviceCode = serviceCode.toString(); return this; } /** *

* The usage details of the line item in the billing report. *

* * @param usageType * The usage details of the line item in the billing report. */ public void setUsageType(String usageType) { this.usageType = usageType; } /** *

* The usage details of the line item in the billing report. *

* * @return The usage details of the line item in the billing report. */ public String getUsageType() { return this.usageType; } /** *

* The usage details of the line item in the billing report. *

* * @param usageType * The usage details of the line item in the billing report. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanOfferingRate withUsageType(String usageType) { setUsageType(usageType); return this; } /** *

* The specific AWS operation for the line item in the billing report. *

* * @param operation * The specific AWS operation for the line item in the billing report. */ public void setOperation(String operation) { this.operation = operation; } /** *

* The specific AWS operation for the line item in the billing report. *

* * @return The specific AWS operation for the line item in the billing report. */ public String getOperation() { return this.operation; } /** *

* The specific AWS operation for the line item in the billing report. *

* * @param operation * The specific AWS operation for the line item in the billing report. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanOfferingRate withOperation(String operation) { setOperation(operation); return this; } /** *

* The properties. *

* * @return The properties. */ public java.util.List getProperties() { return properties; } /** *

* The properties. *

* * @param properties * The properties. */ public void setProperties(java.util.Collection properties) { if (properties == null) { this.properties = null; return; } this.properties = new java.util.ArrayList(properties); } /** *

* The properties. *

*

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

* * @param properties * The properties. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanOfferingRate withProperties(SavingsPlanOfferingRateProperty... properties) { if (this.properties == null) { setProperties(new java.util.ArrayList(properties.length)); } for (SavingsPlanOfferingRateProperty ele : properties) { this.properties.add(ele); } return this; } /** *

* The properties. *

* * @param properties * The properties. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanOfferingRate withProperties(java.util.Collection properties) { setProperties(properties); 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 (getSavingsPlanOffering() != null) sb.append("SavingsPlanOffering: ").append(getSavingsPlanOffering()).append(","); if (getRate() != null) sb.append("Rate: ").append(getRate()).append(","); if (getUnit() != null) sb.append("Unit: ").append(getUnit()).append(","); if (getProductType() != null) sb.append("ProductType: ").append(getProductType()).append(","); if (getServiceCode() != null) sb.append("ServiceCode: ").append(getServiceCode()).append(","); if (getUsageType() != null) sb.append("UsageType: ").append(getUsageType()).append(","); if (getOperation() != null) sb.append("Operation: ").append(getOperation()).append(","); if (getProperties() != null) sb.append("Properties: ").append(getProperties()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SavingsPlanOfferingRate == false) return false; SavingsPlanOfferingRate other = (SavingsPlanOfferingRate) obj; if (other.getSavingsPlanOffering() == null ^ this.getSavingsPlanOffering() == null) return false; if (other.getSavingsPlanOffering() != null && other.getSavingsPlanOffering().equals(this.getSavingsPlanOffering()) == false) return false; if (other.getRate() == null ^ this.getRate() == null) return false; if (other.getRate() != null && other.getRate().equals(this.getRate()) == false) return false; if (other.getUnit() == null ^ this.getUnit() == null) return false; if (other.getUnit() != null && other.getUnit().equals(this.getUnit()) == false) return false; if (other.getProductType() == null ^ this.getProductType() == null) return false; if (other.getProductType() != null && other.getProductType().equals(this.getProductType()) == false) return false; if (other.getServiceCode() == null ^ this.getServiceCode() == null) return false; if (other.getServiceCode() != null && other.getServiceCode().equals(this.getServiceCode()) == false) return false; if (other.getUsageType() == null ^ this.getUsageType() == null) return false; if (other.getUsageType() != null && other.getUsageType().equals(this.getUsageType()) == false) return false; if (other.getOperation() == null ^ this.getOperation() == null) return false; if (other.getOperation() != null && other.getOperation().equals(this.getOperation()) == false) return false; if (other.getProperties() == null ^ this.getProperties() == null) return false; if (other.getProperties() != null && other.getProperties().equals(this.getProperties()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSavingsPlanOffering() == null) ? 0 : getSavingsPlanOffering().hashCode()); hashCode = prime * hashCode + ((getRate() == null) ? 0 : getRate().hashCode()); hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode()); hashCode = prime * hashCode + ((getProductType() == null) ? 0 : getProductType().hashCode()); hashCode = prime * hashCode + ((getServiceCode() == null) ? 0 : getServiceCode().hashCode()); hashCode = prime * hashCode + ((getUsageType() == null) ? 0 : getUsageType().hashCode()); hashCode = prime * hashCode + ((getOperation() == null) ? 0 : getOperation().hashCode()); hashCode = prime * hashCode + ((getProperties() == null) ? 0 : getProperties().hashCode()); return hashCode; } @Override public SavingsPlanOfferingRate clone() { try { return (SavingsPlanOfferingRate) 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.savingsplans.model.transform.SavingsPlanOfferingRateMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy