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

com.amazonaws.services.ec2.model.ReservedInstancesModification Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.765
Show newest version
/*
 * Copyright 2013-2018 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.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Describes a Reserved Instance modification. *

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

* A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more * information, see Ensuring * Idempotency. *

*/ private String clientToken; /** *

* The time when the modification request was created. *

*/ private java.util.Date createDate; /** *

* The time for the modification to become effective. *

*/ private java.util.Date effectiveDate; /** *

* Contains target configurations along with their corresponding new Reserved Instance IDs. *

*/ private com.amazonaws.internal.SdkInternalList modificationResults; /** *

* The IDs of one or more Reserved Instances. *

*/ private com.amazonaws.internal.SdkInternalList reservedInstancesIds; /** *

* A unique ID for the Reserved Instance modification. *

*/ private String reservedInstancesModificationId; /** *

* The status of the Reserved Instances modification request. *

*/ private String status; /** *

* The reason for the status. *

*/ private String statusMessage; /** *

* The time when the modification request was last updated. *

*/ private java.util.Date updateDate; /** *

* A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more * information, see Ensuring * Idempotency. *

* * @param clientToken * A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more * information, see Ensuring * Idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more * information, see Ensuring * Idempotency. *

* * @return A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more * information, see Ensuring * Idempotency. */ public String getClientToken() { return this.clientToken; } /** *

* A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more * information, see Ensuring * Idempotency. *

* * @param clientToken * A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more * information, see Ensuring * Idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* The time when the modification request was created. *

* * @param createDate * The time when the modification request was created. */ public void setCreateDate(java.util.Date createDate) { this.createDate = createDate; } /** *

* The time when the modification request was created. *

* * @return The time when the modification request was created. */ public java.util.Date getCreateDate() { return this.createDate; } /** *

* The time when the modification request was created. *

* * @param createDate * The time when the modification request was created. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withCreateDate(java.util.Date createDate) { setCreateDate(createDate); return this; } /** *

* The time for the modification to become effective. *

* * @param effectiveDate * The time for the modification to become effective. */ public void setEffectiveDate(java.util.Date effectiveDate) { this.effectiveDate = effectiveDate; } /** *

* The time for the modification to become effective. *

* * @return The time for the modification to become effective. */ public java.util.Date getEffectiveDate() { return this.effectiveDate; } /** *

* The time for the modification to become effective. *

* * @param effectiveDate * The time for the modification to become effective. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withEffectiveDate(java.util.Date effectiveDate) { setEffectiveDate(effectiveDate); return this; } /** *

* Contains target configurations along with their corresponding new Reserved Instance IDs. *

* * @return Contains target configurations along with their corresponding new Reserved Instance IDs. */ public java.util.List getModificationResults() { if (modificationResults == null) { modificationResults = new com.amazonaws.internal.SdkInternalList(); } return modificationResults; } /** *

* Contains target configurations along with their corresponding new Reserved Instance IDs. *

* * @param modificationResults * Contains target configurations along with their corresponding new Reserved Instance IDs. */ public void setModificationResults(java.util.Collection modificationResults) { if (modificationResults == null) { this.modificationResults = null; return; } this.modificationResults = new com.amazonaws.internal.SdkInternalList(modificationResults); } /** *

* Contains target configurations along with their corresponding new Reserved Instance IDs. *

*

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

* * @param modificationResults * Contains target configurations along with their corresponding new Reserved Instance IDs. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withModificationResults(ReservedInstancesModificationResult... modificationResults) { if (this.modificationResults == null) { setModificationResults(new com.amazonaws.internal.SdkInternalList(modificationResults.length)); } for (ReservedInstancesModificationResult ele : modificationResults) { this.modificationResults.add(ele); } return this; } /** *

* Contains target configurations along with their corresponding new Reserved Instance IDs. *

* * @param modificationResults * Contains target configurations along with their corresponding new Reserved Instance IDs. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withModificationResults(java.util.Collection modificationResults) { setModificationResults(modificationResults); return this; } /** *

* The IDs of one or more Reserved Instances. *

* * @return The IDs of one or more Reserved Instances. */ public java.util.List getReservedInstancesIds() { if (reservedInstancesIds == null) { reservedInstancesIds = new com.amazonaws.internal.SdkInternalList(); } return reservedInstancesIds; } /** *

* The IDs of one or more Reserved Instances. *

* * @param reservedInstancesIds * The IDs of one or more Reserved Instances. */ public void setReservedInstancesIds(java.util.Collection reservedInstancesIds) { if (reservedInstancesIds == null) { this.reservedInstancesIds = null; return; } this.reservedInstancesIds = new com.amazonaws.internal.SdkInternalList(reservedInstancesIds); } /** *

* The IDs of one or more Reserved Instances. *

*

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

* * @param reservedInstancesIds * The IDs of one or more Reserved Instances. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withReservedInstancesIds(ReservedInstancesId... reservedInstancesIds) { if (this.reservedInstancesIds == null) { setReservedInstancesIds(new com.amazonaws.internal.SdkInternalList(reservedInstancesIds.length)); } for (ReservedInstancesId ele : reservedInstancesIds) { this.reservedInstancesIds.add(ele); } return this; } /** *

* The IDs of one or more Reserved Instances. *

* * @param reservedInstancesIds * The IDs of one or more Reserved Instances. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withReservedInstancesIds(java.util.Collection reservedInstancesIds) { setReservedInstancesIds(reservedInstancesIds); return this; } /** *

* A unique ID for the Reserved Instance modification. *

* * @param reservedInstancesModificationId * A unique ID for the Reserved Instance modification. */ public void setReservedInstancesModificationId(String reservedInstancesModificationId) { this.reservedInstancesModificationId = reservedInstancesModificationId; } /** *

* A unique ID for the Reserved Instance modification. *

* * @return A unique ID for the Reserved Instance modification. */ public String getReservedInstancesModificationId() { return this.reservedInstancesModificationId; } /** *

* A unique ID for the Reserved Instance modification. *

* * @param reservedInstancesModificationId * A unique ID for the Reserved Instance modification. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withReservedInstancesModificationId(String reservedInstancesModificationId) { setReservedInstancesModificationId(reservedInstancesModificationId); return this; } /** *

* The status of the Reserved Instances modification request. *

* * @param status * The status of the Reserved Instances modification request. */ public void setStatus(String status) { this.status = status; } /** *

* The status of the Reserved Instances modification request. *

* * @return The status of the Reserved Instances modification request. */ public String getStatus() { return this.status; } /** *

* The status of the Reserved Instances modification request. *

* * @param status * The status of the Reserved Instances modification request. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withStatus(String status) { setStatus(status); return this; } /** *

* The reason for the status. *

* * @param statusMessage * The reason for the status. */ public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } /** *

* The reason for the status. *

* * @return The reason for the status. */ public String getStatusMessage() { return this.statusMessage; } /** *

* The reason for the status. *

* * @param statusMessage * The reason for the status. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withStatusMessage(String statusMessage) { setStatusMessage(statusMessage); return this; } /** *

* The time when the modification request was last updated. *

* * @param updateDate * The time when the modification request was last updated. */ public void setUpdateDate(java.util.Date updateDate) { this.updateDate = updateDate; } /** *

* The time when the modification request was last updated. *

* * @return The time when the modification request was last updated. */ public java.util.Date getUpdateDate() { return this.updateDate; } /** *

* The time when the modification request was last updated. *

* * @param updateDate * The time when the modification request was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstancesModification withUpdateDate(java.util.Date updateDate) { setUpdateDate(updateDate); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getCreateDate() != null) sb.append("CreateDate: ").append(getCreateDate()).append(","); if (getEffectiveDate() != null) sb.append("EffectiveDate: ").append(getEffectiveDate()).append(","); if (getModificationResults() != null) sb.append("ModificationResults: ").append(getModificationResults()).append(","); if (getReservedInstancesIds() != null) sb.append("ReservedInstancesIds: ").append(getReservedInstancesIds()).append(","); if (getReservedInstancesModificationId() != null) sb.append("ReservedInstancesModificationId: ").append(getReservedInstancesModificationId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusMessage() != null) sb.append("StatusMessage: ").append(getStatusMessage()).append(","); if (getUpdateDate() != null) sb.append("UpdateDate: ").append(getUpdateDate()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReservedInstancesModification == false) return false; ReservedInstancesModification other = (ReservedInstancesModification) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getCreateDate() == null ^ this.getCreateDate() == null) return false; if (other.getCreateDate() != null && other.getCreateDate().equals(this.getCreateDate()) == false) return false; if (other.getEffectiveDate() == null ^ this.getEffectiveDate() == null) return false; if (other.getEffectiveDate() != null && other.getEffectiveDate().equals(this.getEffectiveDate()) == false) return false; if (other.getModificationResults() == null ^ this.getModificationResults() == null) return false; if (other.getModificationResults() != null && other.getModificationResults().equals(this.getModificationResults()) == false) return false; if (other.getReservedInstancesIds() == null ^ this.getReservedInstancesIds() == null) return false; if (other.getReservedInstancesIds() != null && other.getReservedInstancesIds().equals(this.getReservedInstancesIds()) == false) return false; if (other.getReservedInstancesModificationId() == null ^ this.getReservedInstancesModificationId() == null) return false; if (other.getReservedInstancesModificationId() != null && other.getReservedInstancesModificationId().equals(this.getReservedInstancesModificationId()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getStatusMessage() == null ^ this.getStatusMessage() == null) return false; if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false) return false; if (other.getUpdateDate() == null ^ this.getUpdateDate() == null) return false; if (other.getUpdateDate() != null && other.getUpdateDate().equals(this.getUpdateDate()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); hashCode = prime * hashCode + ((getEffectiveDate() == null) ? 0 : getEffectiveDate().hashCode()); hashCode = prime * hashCode + ((getModificationResults() == null) ? 0 : getModificationResults().hashCode()); hashCode = prime * hashCode + ((getReservedInstancesIds() == null) ? 0 : getReservedInstancesIds().hashCode()); hashCode = prime * hashCode + ((getReservedInstancesModificationId() == null) ? 0 : getReservedInstancesModificationId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode()); return hashCode; } @Override public ReservedInstancesModification clone() { try { return (ReservedInstancesModification) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy