com.amazonaws.services.ec2.model.ElasticGpus Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* Copyright 2016-2021 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 an Elastic Graphics accelerator.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ElasticGpus implements Serializable, Cloneable {
/**
*
* The ID of the Elastic Graphics accelerator.
*
*/
private String elasticGpuId;
/**
*
* The Availability Zone in the which the Elastic Graphics accelerator resides.
*
*/
private String availabilityZone;
/**
*
* The type of Elastic Graphics accelerator.
*
*/
private String elasticGpuType;
/**
*
* The status of the Elastic Graphics accelerator.
*
*/
private ElasticGpuHealth elasticGpuHealth;
/**
*
* The state of the Elastic Graphics accelerator.
*
*/
private String elasticGpuState;
/**
*
* The ID of the instance to which the Elastic Graphics accelerator is attached.
*
*/
private String instanceId;
/**
*
* The tags assigned to the Elastic Graphics accelerator.
*
*/
private com.amazonaws.internal.SdkInternalList tags;
/**
*
* The ID of the Elastic Graphics accelerator.
*
*
* @param elasticGpuId
* The ID of the Elastic Graphics accelerator.
*/
public void setElasticGpuId(String elasticGpuId) {
this.elasticGpuId = elasticGpuId;
}
/**
*
* The ID of the Elastic Graphics accelerator.
*
*
* @return The ID of the Elastic Graphics accelerator.
*/
public String getElasticGpuId() {
return this.elasticGpuId;
}
/**
*
* The ID of the Elastic Graphics accelerator.
*
*
* @param elasticGpuId
* The ID of the Elastic Graphics accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticGpus withElasticGpuId(String elasticGpuId) {
setElasticGpuId(elasticGpuId);
return this;
}
/**
*
* The Availability Zone in the which the Elastic Graphics accelerator resides.
*
*
* @param availabilityZone
* The Availability Zone in the which the Elastic Graphics accelerator resides.
*/
public void setAvailabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
}
/**
*
* The Availability Zone in the which the Elastic Graphics accelerator resides.
*
*
* @return The Availability Zone in the which the Elastic Graphics accelerator resides.
*/
public String getAvailabilityZone() {
return this.availabilityZone;
}
/**
*
* The Availability Zone in the which the Elastic Graphics accelerator resides.
*
*
* @param availabilityZone
* The Availability Zone in the which the Elastic Graphics accelerator resides.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticGpus withAvailabilityZone(String availabilityZone) {
setAvailabilityZone(availabilityZone);
return this;
}
/**
*
* The type of Elastic Graphics accelerator.
*
*
* @param elasticGpuType
* The type of Elastic Graphics accelerator.
*/
public void setElasticGpuType(String elasticGpuType) {
this.elasticGpuType = elasticGpuType;
}
/**
*
* The type of Elastic Graphics accelerator.
*
*
* @return The type of Elastic Graphics accelerator.
*/
public String getElasticGpuType() {
return this.elasticGpuType;
}
/**
*
* The type of Elastic Graphics accelerator.
*
*
* @param elasticGpuType
* The type of Elastic Graphics accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticGpus withElasticGpuType(String elasticGpuType) {
setElasticGpuType(elasticGpuType);
return this;
}
/**
*
* The status of the Elastic Graphics accelerator.
*
*
* @param elasticGpuHealth
* The status of the Elastic Graphics accelerator.
*/
public void setElasticGpuHealth(ElasticGpuHealth elasticGpuHealth) {
this.elasticGpuHealth = elasticGpuHealth;
}
/**
*
* The status of the Elastic Graphics accelerator.
*
*
* @return The status of the Elastic Graphics accelerator.
*/
public ElasticGpuHealth getElasticGpuHealth() {
return this.elasticGpuHealth;
}
/**
*
* The status of the Elastic Graphics accelerator.
*
*
* @param elasticGpuHealth
* The status of the Elastic Graphics accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticGpus withElasticGpuHealth(ElasticGpuHealth elasticGpuHealth) {
setElasticGpuHealth(elasticGpuHealth);
return this;
}
/**
*
* The state of the Elastic Graphics accelerator.
*
*
* @param elasticGpuState
* The state of the Elastic Graphics accelerator.
* @see ElasticGpuState
*/
public void setElasticGpuState(String elasticGpuState) {
this.elasticGpuState = elasticGpuState;
}
/**
*
* The state of the Elastic Graphics accelerator.
*
*
* @return The state of the Elastic Graphics accelerator.
* @see ElasticGpuState
*/
public String getElasticGpuState() {
return this.elasticGpuState;
}
/**
*
* The state of the Elastic Graphics accelerator.
*
*
* @param elasticGpuState
* The state of the Elastic Graphics accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ElasticGpuState
*/
public ElasticGpus withElasticGpuState(String elasticGpuState) {
setElasticGpuState(elasticGpuState);
return this;
}
/**
*
* The state of the Elastic Graphics accelerator.
*
*
* @param elasticGpuState
* The state of the Elastic Graphics accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ElasticGpuState
*/
public ElasticGpus withElasticGpuState(ElasticGpuState elasticGpuState) {
this.elasticGpuState = elasticGpuState.toString();
return this;
}
/**
*
* The ID of the instance to which the Elastic Graphics accelerator is attached.
*
*
* @param instanceId
* The ID of the instance to which the Elastic Graphics accelerator is attached.
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
/**
*
* The ID of the instance to which the Elastic Graphics accelerator is attached.
*
*
* @return The ID of the instance to which the Elastic Graphics accelerator is attached.
*/
public String getInstanceId() {
return this.instanceId;
}
/**
*
* The ID of the instance to which the Elastic Graphics accelerator is attached.
*
*
* @param instanceId
* The ID of the instance to which the Elastic Graphics accelerator is attached.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticGpus withInstanceId(String instanceId) {
setInstanceId(instanceId);
return this;
}
/**
*
* The tags assigned to the Elastic Graphics accelerator.
*
*
* @return The tags assigned to the Elastic Graphics accelerator.
*/
public java.util.List getTags() {
if (tags == null) {
tags = new com.amazonaws.internal.SdkInternalList();
}
return tags;
}
/**
*
* The tags assigned to the Elastic Graphics accelerator.
*
*
* @param tags
* The tags assigned to the Elastic Graphics accelerator.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new com.amazonaws.internal.SdkInternalList(tags);
}
/**
*
* The tags assigned to the Elastic Graphics accelerator.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* The tags assigned to the Elastic Graphics accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticGpus withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* The tags assigned to the Elastic Graphics accelerator.
*
*
* @param tags
* The tags assigned to the Elastic Graphics accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticGpus withTags(java.util.Collection tags) {
setTags(tags);
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 (getElasticGpuId() != null)
sb.append("ElasticGpuId: ").append(getElasticGpuId()).append(",");
if (getAvailabilityZone() != null)
sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(",");
if (getElasticGpuType() != null)
sb.append("ElasticGpuType: ").append(getElasticGpuType()).append(",");
if (getElasticGpuHealth() != null)
sb.append("ElasticGpuHealth: ").append(getElasticGpuHealth()).append(",");
if (getElasticGpuState() != null)
sb.append("ElasticGpuState: ").append(getElasticGpuState()).append(",");
if (getInstanceId() != null)
sb.append("InstanceId: ").append(getInstanceId()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ElasticGpus == false)
return false;
ElasticGpus other = (ElasticGpus) obj;
if (other.getElasticGpuId() == null ^ this.getElasticGpuId() == null)
return false;
if (other.getElasticGpuId() != null && other.getElasticGpuId().equals(this.getElasticGpuId()) == false)
return false;
if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null)
return false;
if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false)
return false;
if (other.getElasticGpuType() == null ^ this.getElasticGpuType() == null)
return false;
if (other.getElasticGpuType() != null && other.getElasticGpuType().equals(this.getElasticGpuType()) == false)
return false;
if (other.getElasticGpuHealth() == null ^ this.getElasticGpuHealth() == null)
return false;
if (other.getElasticGpuHealth() != null && other.getElasticGpuHealth().equals(this.getElasticGpuHealth()) == false)
return false;
if (other.getElasticGpuState() == null ^ this.getElasticGpuState() == null)
return false;
if (other.getElasticGpuState() != null && other.getElasticGpuState().equals(this.getElasticGpuState()) == false)
return false;
if (other.getInstanceId() == null ^ this.getInstanceId() == null)
return false;
if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getElasticGpuId() == null) ? 0 : getElasticGpuId().hashCode());
hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode());
hashCode = prime * hashCode + ((getElasticGpuType() == null) ? 0 : getElasticGpuType().hashCode());
hashCode = prime * hashCode + ((getElasticGpuHealth() == null) ? 0 : getElasticGpuHealth().hashCode());
hashCode = prime * hashCode + ((getElasticGpuState() == null) ? 0 : getElasticGpuState().hashCode());
hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public ElasticGpus clone() {
try {
return (ElasticGpus) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}