com.amazonaws.services.sagemaker.model.ClusterInstanceStorageConfig Maven / Gradle / Ivy
/*
* 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.sagemaker.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Defines the configuration for attaching additional storage to the instances in the SageMaker HyperPod cluster
* instance group. To learn more, see SageMaker HyperPod release notes: June 20, 2024.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ClusterInstanceStorageConfig implements Serializable, Cloneable, StructuredPojo {
/**
*
* Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in
* the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the
* SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker
.
*
*/
private ClusterEbsVolumeConfig ebsVolumeConfig;
/**
*
* Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in
* the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the
* SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker
.
*
*
* @param ebsVolumeConfig
* Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the
* instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each
* instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker
.
*/
public void setEbsVolumeConfig(ClusterEbsVolumeConfig ebsVolumeConfig) {
this.ebsVolumeConfig = ebsVolumeConfig;
}
/**
*
* Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in
* the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the
* SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker
.
*
*
* @return Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the
* instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each
* instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker
.
*/
public ClusterEbsVolumeConfig getEbsVolumeConfig() {
return this.ebsVolumeConfig;
}
/**
*
* Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in
* the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the
* SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker
.
*
*
* @param ebsVolumeConfig
* Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the
* instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each
* instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterInstanceStorageConfig withEbsVolumeConfig(ClusterEbsVolumeConfig ebsVolumeConfig) {
setEbsVolumeConfig(ebsVolumeConfig);
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 (getEbsVolumeConfig() != null)
sb.append("EbsVolumeConfig: ").append(getEbsVolumeConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ClusterInstanceStorageConfig == false)
return false;
ClusterInstanceStorageConfig other = (ClusterInstanceStorageConfig) obj;
if (other.getEbsVolumeConfig() == null ^ this.getEbsVolumeConfig() == null)
return false;
if (other.getEbsVolumeConfig() != null && other.getEbsVolumeConfig().equals(this.getEbsVolumeConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEbsVolumeConfig() == null) ? 0 : getEbsVolumeConfig().hashCode());
return hashCode;
}
@Override
public ClusterInstanceStorageConfig clone() {
try {
return (ClusterInstanceStorageConfig) 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.sagemaker.model.transform.ClusterInstanceStorageConfigMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}