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

com.amazonaws.services.ec2.model.ProcessorInfo 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

The newest version!
/*
 * Copyright 2019-2024 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 the processor used by the instance type. *

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

* The architectures supported by the instance type. *

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

* The speed of the processor, in GHz. *

*/ private Double sustainedClockSpeedInGhz; /** *

* Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp, AMD * SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. *

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

* The manufacturer of the processor. *

*/ private String manufacturer; /** *

* The architectures supported by the instance type. *

* * @return The architectures supported by the instance type. * @see ArchitectureType */ public java.util.List getSupportedArchitectures() { if (supportedArchitectures == null) { supportedArchitectures = new com.amazonaws.internal.SdkInternalList(); } return supportedArchitectures; } /** *

* The architectures supported by the instance type. *

* * @param supportedArchitectures * The architectures supported by the instance type. * @see ArchitectureType */ public void setSupportedArchitectures(java.util.Collection supportedArchitectures) { if (supportedArchitectures == null) { this.supportedArchitectures = null; return; } this.supportedArchitectures = new com.amazonaws.internal.SdkInternalList(supportedArchitectures); } /** *

* The architectures supported by the instance type. *

*

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

* * @param supportedArchitectures * The architectures supported by the instance type. * @return Returns a reference to this object so that method calls can be chained together. * @see ArchitectureType */ public ProcessorInfo withSupportedArchitectures(String... supportedArchitectures) { if (this.supportedArchitectures == null) { setSupportedArchitectures(new com.amazonaws.internal.SdkInternalList(supportedArchitectures.length)); } for (String ele : supportedArchitectures) { this.supportedArchitectures.add(ele); } return this; } /** *

* The architectures supported by the instance type. *

* * @param supportedArchitectures * The architectures supported by the instance type. * @return Returns a reference to this object so that method calls can be chained together. * @see ArchitectureType */ public ProcessorInfo withSupportedArchitectures(java.util.Collection supportedArchitectures) { setSupportedArchitectures(supportedArchitectures); return this; } /** *

* The architectures supported by the instance type. *

* * @param supportedArchitectures * The architectures supported by the instance type. * @return Returns a reference to this object so that method calls can be chained together. * @see ArchitectureType */ public ProcessorInfo withSupportedArchitectures(ArchitectureType... supportedArchitectures) { com.amazonaws.internal.SdkInternalList supportedArchitecturesCopy = new com.amazonaws.internal.SdkInternalList( supportedArchitectures.length); for (ArchitectureType value : supportedArchitectures) { supportedArchitecturesCopy.add(value.toString()); } if (getSupportedArchitectures() == null) { setSupportedArchitectures(supportedArchitecturesCopy); } else { getSupportedArchitectures().addAll(supportedArchitecturesCopy); } return this; } /** *

* The speed of the processor, in GHz. *

* * @param sustainedClockSpeedInGhz * The speed of the processor, in GHz. */ public void setSustainedClockSpeedInGhz(Double sustainedClockSpeedInGhz) { this.sustainedClockSpeedInGhz = sustainedClockSpeedInGhz; } /** *

* The speed of the processor, in GHz. *

* * @return The speed of the processor, in GHz. */ public Double getSustainedClockSpeedInGhz() { return this.sustainedClockSpeedInGhz; } /** *

* The speed of the processor, in GHz. *

* * @param sustainedClockSpeedInGhz * The speed of the processor, in GHz. * @return Returns a reference to this object so that method calls can be chained together. */ public ProcessorInfo withSustainedClockSpeedInGhz(Double sustainedClockSpeedInGhz) { setSustainedClockSpeedInGhz(sustainedClockSpeedInGhz); return this; } /** *

* Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp, AMD * SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. *

* * @return Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp * , AMD SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. * @see SupportedAdditionalProcessorFeature */ public java.util.List getSupportedFeatures() { if (supportedFeatures == null) { supportedFeatures = new com.amazonaws.internal.SdkInternalList(); } return supportedFeatures; } /** *

* Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp, AMD * SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. *

* * @param supportedFeatures * Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp, * AMD SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. * @see SupportedAdditionalProcessorFeature */ public void setSupportedFeatures(java.util.Collection supportedFeatures) { if (supportedFeatures == null) { this.supportedFeatures = null; return; } this.supportedFeatures = new com.amazonaws.internal.SdkInternalList(supportedFeatures); } /** *

* Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp, AMD * SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. *

*

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

* * @param supportedFeatures * Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp, * AMD SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. * @return Returns a reference to this object so that method calls can be chained together. * @see SupportedAdditionalProcessorFeature */ public ProcessorInfo withSupportedFeatures(String... supportedFeatures) { if (this.supportedFeatures == null) { setSupportedFeatures(new com.amazonaws.internal.SdkInternalList(supportedFeatures.length)); } for (String ele : supportedFeatures) { this.supportedFeatures.add(ele); } return this; } /** *

* Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp, AMD * SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. *

* * @param supportedFeatures * Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp, * AMD SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. * @return Returns a reference to this object so that method calls can be chained together. * @see SupportedAdditionalProcessorFeature */ public ProcessorInfo withSupportedFeatures(java.util.Collection supportedFeatures) { setSupportedFeatures(supportedFeatures); return this; } /** *

* Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp, AMD * SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. *

* * @param supportedFeatures * Indicates whether the instance type supports AMD SEV-SNP. If the request returns amd-sev-snp, * AMD SEV-SNP is supported. Otherwise, it is not supported. For more information, see AMD SEV-SNP. * @return Returns a reference to this object so that method calls can be chained together. * @see SupportedAdditionalProcessorFeature */ public ProcessorInfo withSupportedFeatures(SupportedAdditionalProcessorFeature... supportedFeatures) { com.amazonaws.internal.SdkInternalList supportedFeaturesCopy = new com.amazonaws.internal.SdkInternalList(supportedFeatures.length); for (SupportedAdditionalProcessorFeature value : supportedFeatures) { supportedFeaturesCopy.add(value.toString()); } if (getSupportedFeatures() == null) { setSupportedFeatures(supportedFeaturesCopy); } else { getSupportedFeatures().addAll(supportedFeaturesCopy); } return this; } /** *

* The manufacturer of the processor. *

* * @param manufacturer * The manufacturer of the processor. */ public void setManufacturer(String manufacturer) { this.manufacturer = manufacturer; } /** *

* The manufacturer of the processor. *

* * @return The manufacturer of the processor. */ public String getManufacturer() { return this.manufacturer; } /** *

* The manufacturer of the processor. *

* * @param manufacturer * The manufacturer of the processor. * @return Returns a reference to this object so that method calls can be chained together. */ public ProcessorInfo withManufacturer(String manufacturer) { setManufacturer(manufacturer); 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 (getSupportedArchitectures() != null) sb.append("SupportedArchitectures: ").append(getSupportedArchitectures()).append(","); if (getSustainedClockSpeedInGhz() != null) sb.append("SustainedClockSpeedInGhz: ").append(getSustainedClockSpeedInGhz()).append(","); if (getSupportedFeatures() != null) sb.append("SupportedFeatures: ").append(getSupportedFeatures()).append(","); if (getManufacturer() != null) sb.append("Manufacturer: ").append(getManufacturer()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProcessorInfo == false) return false; ProcessorInfo other = (ProcessorInfo) obj; if (other.getSupportedArchitectures() == null ^ this.getSupportedArchitectures() == null) return false; if (other.getSupportedArchitectures() != null && other.getSupportedArchitectures().equals(this.getSupportedArchitectures()) == false) return false; if (other.getSustainedClockSpeedInGhz() == null ^ this.getSustainedClockSpeedInGhz() == null) return false; if (other.getSustainedClockSpeedInGhz() != null && other.getSustainedClockSpeedInGhz().equals(this.getSustainedClockSpeedInGhz()) == false) return false; if (other.getSupportedFeatures() == null ^ this.getSupportedFeatures() == null) return false; if (other.getSupportedFeatures() != null && other.getSupportedFeatures().equals(this.getSupportedFeatures()) == false) return false; if (other.getManufacturer() == null ^ this.getManufacturer() == null) return false; if (other.getManufacturer() != null && other.getManufacturer().equals(this.getManufacturer()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSupportedArchitectures() == null) ? 0 : getSupportedArchitectures().hashCode()); hashCode = prime * hashCode + ((getSustainedClockSpeedInGhz() == null) ? 0 : getSustainedClockSpeedInGhz().hashCode()); hashCode = prime * hashCode + ((getSupportedFeatures() == null) ? 0 : getSupportedFeatures().hashCode()); hashCode = prime * hashCode + ((getManufacturer() == null) ? 0 : getManufacturer().hashCode()); return hashCode; } @Override public ProcessorInfo clone() { try { return (ProcessorInfo) 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