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

com.amazonaws.services.ec2.model.HostProperties 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 2012-2017 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 properties of a Dedicated Host. *

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

* The number of cores on the Dedicated Host. *

*/ private Integer cores; /** *

* The instance type size that the Dedicated Host supports (for example, m3.medium). *

*/ private String instanceType; /** *

* The number of sockets on the Dedicated Host. *

*/ private Integer sockets; /** *

* The number of vCPUs on the Dedicated Host. *

*/ private Integer totalVCpus; /** *

* The number of cores on the Dedicated Host. *

* * @param cores * The number of cores on the Dedicated Host. */ public void setCores(Integer cores) { this.cores = cores; } /** *

* The number of cores on the Dedicated Host. *

* * @return The number of cores on the Dedicated Host. */ public Integer getCores() { return this.cores; } /** *

* The number of cores on the Dedicated Host. *

* * @param cores * The number of cores on the Dedicated Host. * @return Returns a reference to this object so that method calls can be chained together. */ public HostProperties withCores(Integer cores) { setCores(cores); return this; } /** *

* The instance type size that the Dedicated Host supports (for example, m3.medium). *

* * @param instanceType * The instance type size that the Dedicated Host supports (for example, m3.medium). */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* The instance type size that the Dedicated Host supports (for example, m3.medium). *

* * @return The instance type size that the Dedicated Host supports (for example, m3.medium). */ public String getInstanceType() { return this.instanceType; } /** *

* The instance type size that the Dedicated Host supports (for example, m3.medium). *

* * @param instanceType * The instance type size that the Dedicated Host supports (for example, m3.medium). * @return Returns a reference to this object so that method calls can be chained together. */ public HostProperties withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *

* The number of sockets on the Dedicated Host. *

* * @param sockets * The number of sockets on the Dedicated Host. */ public void setSockets(Integer sockets) { this.sockets = sockets; } /** *

* The number of sockets on the Dedicated Host. *

* * @return The number of sockets on the Dedicated Host. */ public Integer getSockets() { return this.sockets; } /** *

* The number of sockets on the Dedicated Host. *

* * @param sockets * The number of sockets on the Dedicated Host. * @return Returns a reference to this object so that method calls can be chained together. */ public HostProperties withSockets(Integer sockets) { setSockets(sockets); return this; } /** *

* The number of vCPUs on the Dedicated Host. *

* * @param totalVCpus * The number of vCPUs on the Dedicated Host. */ public void setTotalVCpus(Integer totalVCpus) { this.totalVCpus = totalVCpus; } /** *

* The number of vCPUs on the Dedicated Host. *

* * @return The number of vCPUs on the Dedicated Host. */ public Integer getTotalVCpus() { return this.totalVCpus; } /** *

* The number of vCPUs on the Dedicated Host. *

* * @param totalVCpus * The number of vCPUs on the Dedicated Host. * @return Returns a reference to this object so that method calls can be chained together. */ public HostProperties withTotalVCpus(Integer totalVCpus) { setTotalVCpus(totalVCpus); 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 (getCores() != null) sb.append("Cores: ").append(getCores()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getSockets() != null) sb.append("Sockets: ").append(getSockets()).append(","); if (getTotalVCpus() != null) sb.append("TotalVCpus: ").append(getTotalVCpus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof HostProperties == false) return false; HostProperties other = (HostProperties) obj; if (other.getCores() == null ^ this.getCores() == null) return false; if (other.getCores() != null && other.getCores().equals(this.getCores()) == false) return false; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getSockets() == null ^ this.getSockets() == null) return false; if (other.getSockets() != null && other.getSockets().equals(this.getSockets()) == false) return false; if (other.getTotalVCpus() == null ^ this.getTotalVCpus() == null) return false; if (other.getTotalVCpus() != null && other.getTotalVCpus().equals(this.getTotalVCpus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCores() == null) ? 0 : getCores().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getSockets() == null) ? 0 : getSockets().hashCode()); hashCode = prime * hashCode + ((getTotalVCpus() == null) ? 0 : getTotalVCpus().hashCode()); return hashCode; } @Override public HostProperties clone() { try { return (HostProperties) 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