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

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

/**
 * 

* Details about the reservations that Amazon Web Services recommends that you purchase. *

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

* The Amazon EC2 reservations that Amazon Web Services recommends that you purchase. *

*/ private EC2InstanceDetails eC2InstanceDetails; /** *

* The Amazon RDS reservations that Amazon Web Services recommends that you purchase. *

*/ private RDSInstanceDetails rDSInstanceDetails; /** *

* The Amazon Redshift reservations that Amazon Web Services recommends that you purchase. *

*/ private RedshiftInstanceDetails redshiftInstanceDetails; /** *

* The ElastiCache reservations that Amazon Web Services recommends that you purchase. *

*/ private ElastiCacheInstanceDetails elastiCacheInstanceDetails; /** *

* The Amazon OpenSearch Service reservations that Amazon Web Services recommends that you purchase. *

*/ private ESInstanceDetails eSInstanceDetails; /** *

* The MemoryDB reservations that Amazon Web Services recommends that you purchase. *

*/ private MemoryDBInstanceDetails memoryDBInstanceDetails; /** *

* The Amazon EC2 reservations that Amazon Web Services recommends that you purchase. *

* * @param eC2InstanceDetails * The Amazon EC2 reservations that Amazon Web Services recommends that you purchase. */ public void setEC2InstanceDetails(EC2InstanceDetails eC2InstanceDetails) { this.eC2InstanceDetails = eC2InstanceDetails; } /** *

* The Amazon EC2 reservations that Amazon Web Services recommends that you purchase. *

* * @return The Amazon EC2 reservations that Amazon Web Services recommends that you purchase. */ public EC2InstanceDetails getEC2InstanceDetails() { return this.eC2InstanceDetails; } /** *

* The Amazon EC2 reservations that Amazon Web Services recommends that you purchase. *

* * @param eC2InstanceDetails * The Amazon EC2 reservations that Amazon Web Services recommends that you purchase. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withEC2InstanceDetails(EC2InstanceDetails eC2InstanceDetails) { setEC2InstanceDetails(eC2InstanceDetails); return this; } /** *

* The Amazon RDS reservations that Amazon Web Services recommends that you purchase. *

* * @param rDSInstanceDetails * The Amazon RDS reservations that Amazon Web Services recommends that you purchase. */ public void setRDSInstanceDetails(RDSInstanceDetails rDSInstanceDetails) { this.rDSInstanceDetails = rDSInstanceDetails; } /** *

* The Amazon RDS reservations that Amazon Web Services recommends that you purchase. *

* * @return The Amazon RDS reservations that Amazon Web Services recommends that you purchase. */ public RDSInstanceDetails getRDSInstanceDetails() { return this.rDSInstanceDetails; } /** *

* The Amazon RDS reservations that Amazon Web Services recommends that you purchase. *

* * @param rDSInstanceDetails * The Amazon RDS reservations that Amazon Web Services recommends that you purchase. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withRDSInstanceDetails(RDSInstanceDetails rDSInstanceDetails) { setRDSInstanceDetails(rDSInstanceDetails); return this; } /** *

* The Amazon Redshift reservations that Amazon Web Services recommends that you purchase. *

* * @param redshiftInstanceDetails * The Amazon Redshift reservations that Amazon Web Services recommends that you purchase. */ public void setRedshiftInstanceDetails(RedshiftInstanceDetails redshiftInstanceDetails) { this.redshiftInstanceDetails = redshiftInstanceDetails; } /** *

* The Amazon Redshift reservations that Amazon Web Services recommends that you purchase. *

* * @return The Amazon Redshift reservations that Amazon Web Services recommends that you purchase. */ public RedshiftInstanceDetails getRedshiftInstanceDetails() { return this.redshiftInstanceDetails; } /** *

* The Amazon Redshift reservations that Amazon Web Services recommends that you purchase. *

* * @param redshiftInstanceDetails * The Amazon Redshift reservations that Amazon Web Services recommends that you purchase. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withRedshiftInstanceDetails(RedshiftInstanceDetails redshiftInstanceDetails) { setRedshiftInstanceDetails(redshiftInstanceDetails); return this; } /** *

* The ElastiCache reservations that Amazon Web Services recommends that you purchase. *

* * @param elastiCacheInstanceDetails * The ElastiCache reservations that Amazon Web Services recommends that you purchase. */ public void setElastiCacheInstanceDetails(ElastiCacheInstanceDetails elastiCacheInstanceDetails) { this.elastiCacheInstanceDetails = elastiCacheInstanceDetails; } /** *

* The ElastiCache reservations that Amazon Web Services recommends that you purchase. *

* * @return The ElastiCache reservations that Amazon Web Services recommends that you purchase. */ public ElastiCacheInstanceDetails getElastiCacheInstanceDetails() { return this.elastiCacheInstanceDetails; } /** *

* The ElastiCache reservations that Amazon Web Services recommends that you purchase. *

* * @param elastiCacheInstanceDetails * The ElastiCache reservations that Amazon Web Services recommends that you purchase. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withElastiCacheInstanceDetails(ElastiCacheInstanceDetails elastiCacheInstanceDetails) { setElastiCacheInstanceDetails(elastiCacheInstanceDetails); return this; } /** *

* The Amazon OpenSearch Service reservations that Amazon Web Services recommends that you purchase. *

* * @param eSInstanceDetails * The Amazon OpenSearch Service reservations that Amazon Web Services recommends that you purchase. */ public void setESInstanceDetails(ESInstanceDetails eSInstanceDetails) { this.eSInstanceDetails = eSInstanceDetails; } /** *

* The Amazon OpenSearch Service reservations that Amazon Web Services recommends that you purchase. *

* * @return The Amazon OpenSearch Service reservations that Amazon Web Services recommends that you purchase. */ public ESInstanceDetails getESInstanceDetails() { return this.eSInstanceDetails; } /** *

* The Amazon OpenSearch Service reservations that Amazon Web Services recommends that you purchase. *

* * @param eSInstanceDetails * The Amazon OpenSearch Service reservations that Amazon Web Services recommends that you purchase. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withESInstanceDetails(ESInstanceDetails eSInstanceDetails) { setESInstanceDetails(eSInstanceDetails); return this; } /** *

* The MemoryDB reservations that Amazon Web Services recommends that you purchase. *

* * @param memoryDBInstanceDetails * The MemoryDB reservations that Amazon Web Services recommends that you purchase. */ public void setMemoryDBInstanceDetails(MemoryDBInstanceDetails memoryDBInstanceDetails) { this.memoryDBInstanceDetails = memoryDBInstanceDetails; } /** *

* The MemoryDB reservations that Amazon Web Services recommends that you purchase. *

* * @return The MemoryDB reservations that Amazon Web Services recommends that you purchase. */ public MemoryDBInstanceDetails getMemoryDBInstanceDetails() { return this.memoryDBInstanceDetails; } /** *

* The MemoryDB reservations that Amazon Web Services recommends that you purchase. *

* * @param memoryDBInstanceDetails * The MemoryDB reservations that Amazon Web Services recommends that you purchase. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withMemoryDBInstanceDetails(MemoryDBInstanceDetails memoryDBInstanceDetails) { setMemoryDBInstanceDetails(memoryDBInstanceDetails); 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 (getEC2InstanceDetails() != null) sb.append("EC2InstanceDetails: ").append(getEC2InstanceDetails()).append(","); if (getRDSInstanceDetails() != null) sb.append("RDSInstanceDetails: ").append(getRDSInstanceDetails()).append(","); if (getRedshiftInstanceDetails() != null) sb.append("RedshiftInstanceDetails: ").append(getRedshiftInstanceDetails()).append(","); if (getElastiCacheInstanceDetails() != null) sb.append("ElastiCacheInstanceDetails: ").append(getElastiCacheInstanceDetails()).append(","); if (getESInstanceDetails() != null) sb.append("ESInstanceDetails: ").append(getESInstanceDetails()).append(","); if (getMemoryDBInstanceDetails() != null) sb.append("MemoryDBInstanceDetails: ").append(getMemoryDBInstanceDetails()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InstanceDetails == false) return false; InstanceDetails other = (InstanceDetails) obj; if (other.getEC2InstanceDetails() == null ^ this.getEC2InstanceDetails() == null) return false; if (other.getEC2InstanceDetails() != null && other.getEC2InstanceDetails().equals(this.getEC2InstanceDetails()) == false) return false; if (other.getRDSInstanceDetails() == null ^ this.getRDSInstanceDetails() == null) return false; if (other.getRDSInstanceDetails() != null && other.getRDSInstanceDetails().equals(this.getRDSInstanceDetails()) == false) return false; if (other.getRedshiftInstanceDetails() == null ^ this.getRedshiftInstanceDetails() == null) return false; if (other.getRedshiftInstanceDetails() != null && other.getRedshiftInstanceDetails().equals(this.getRedshiftInstanceDetails()) == false) return false; if (other.getElastiCacheInstanceDetails() == null ^ this.getElastiCacheInstanceDetails() == null) return false; if (other.getElastiCacheInstanceDetails() != null && other.getElastiCacheInstanceDetails().equals(this.getElastiCacheInstanceDetails()) == false) return false; if (other.getESInstanceDetails() == null ^ this.getESInstanceDetails() == null) return false; if (other.getESInstanceDetails() != null && other.getESInstanceDetails().equals(this.getESInstanceDetails()) == false) return false; if (other.getMemoryDBInstanceDetails() == null ^ this.getMemoryDBInstanceDetails() == null) return false; if (other.getMemoryDBInstanceDetails() != null && other.getMemoryDBInstanceDetails().equals(this.getMemoryDBInstanceDetails()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEC2InstanceDetails() == null) ? 0 : getEC2InstanceDetails().hashCode()); hashCode = prime * hashCode + ((getRDSInstanceDetails() == null) ? 0 : getRDSInstanceDetails().hashCode()); hashCode = prime * hashCode + ((getRedshiftInstanceDetails() == null) ? 0 : getRedshiftInstanceDetails().hashCode()); hashCode = prime * hashCode + ((getElastiCacheInstanceDetails() == null) ? 0 : getElastiCacheInstanceDetails().hashCode()); hashCode = prime * hashCode + ((getESInstanceDetails() == null) ? 0 : getESInstanceDetails().hashCode()); hashCode = prime * hashCode + ((getMemoryDBInstanceDetails() == null) ? 0 : getMemoryDBInstanceDetails().hashCode()); return hashCode; } @Override public InstanceDetails clone() { try { return (InstanceDetails) 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.InstanceDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy