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

com.amazonaws.services.elasticmapreduce.model.VolumeSpecification Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2017-2022 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.elasticmapreduce.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume * attached to an EC2 instance in the cluster. *

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

* The volume type. Volume types supported are gp2, io1, and standard. *

*/ private String volumeType; /** *

* The number of I/O operations per second (IOPS) that the volume supports. *

*/ private Integer iops; /** *

* The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the * minimum value is 10. *

*/ private Integer sizeInGB; /** *

* The volume type. Volume types supported are gp2, io1, and standard. *

* * @param volumeType * The volume type. Volume types supported are gp2, io1, and standard. */ public void setVolumeType(String volumeType) { this.volumeType = volumeType; } /** *

* The volume type. Volume types supported are gp2, io1, and standard. *

* * @return The volume type. Volume types supported are gp2, io1, and standard. */ public String getVolumeType() { return this.volumeType; } /** *

* The volume type. Volume types supported are gp2, io1, and standard. *

* * @param volumeType * The volume type. Volume types supported are gp2, io1, and standard. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeSpecification withVolumeType(String volumeType) { setVolumeType(volumeType); return this; } /** *

* The number of I/O operations per second (IOPS) that the volume supports. *

* * @param iops * The number of I/O operations per second (IOPS) that the volume supports. */ public void setIops(Integer iops) { this.iops = iops; } /** *

* The number of I/O operations per second (IOPS) that the volume supports. *

* * @return The number of I/O operations per second (IOPS) that the volume supports. */ public Integer getIops() { return this.iops; } /** *

* The number of I/O operations per second (IOPS) that the volume supports. *

* * @param iops * The number of I/O operations per second (IOPS) that the volume supports. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeSpecification withIops(Integer iops) { setIops(iops); return this; } /** *

* The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the * minimum value is 10. *

* * @param sizeInGB * The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is * EBS-optimized, the minimum value is 10. */ public void setSizeInGB(Integer sizeInGB) { this.sizeInGB = sizeInGB; } /** *

* The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the * minimum value is 10. *

* * @return The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is * EBS-optimized, the minimum value is 10. */ public Integer getSizeInGB() { return this.sizeInGB; } /** *

* The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the * minimum value is 10. *

* * @param sizeInGB * The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is * EBS-optimized, the minimum value is 10. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeSpecification withSizeInGB(Integer sizeInGB) { setSizeInGB(sizeInGB); 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 (getVolumeType() != null) sb.append("VolumeType: ").append(getVolumeType()).append(","); if (getIops() != null) sb.append("Iops: ").append(getIops()).append(","); if (getSizeInGB() != null) sb.append("SizeInGB: ").append(getSizeInGB()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof VolumeSpecification == false) return false; VolumeSpecification other = (VolumeSpecification) obj; if (other.getVolumeType() == null ^ this.getVolumeType() == null) return false; if (other.getVolumeType() != null && other.getVolumeType().equals(this.getVolumeType()) == false) return false; if (other.getIops() == null ^ this.getIops() == null) return false; if (other.getIops() != null && other.getIops().equals(this.getIops()) == false) return false; if (other.getSizeInGB() == null ^ this.getSizeInGB() == null) return false; if (other.getSizeInGB() != null && other.getSizeInGB().equals(this.getSizeInGB()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode()); hashCode = prime * hashCode + ((getIops() == null) ? 0 : getIops().hashCode()); hashCode = prime * hashCode + ((getSizeInGB() == null) ? 0 : getSizeInGB().hashCode()); return hashCode; } @Override public VolumeSpecification clone() { try { return (VolumeSpecification) 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.elasticmapreduce.model.transform.VolumeSpecificationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy