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

com.amazonaws.services.sagemaker.model.ClusterNodeDetails 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;

/**
 * 

* Details of an instance (also called a node interchangeably) in a SageMaker HyperPod cluster. *

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

* The instance group name in which the instance is. *

*/ private String instanceGroupName; /** *

* The ID of the instance. *

*/ private String instanceId; /** *

* The status of the instance. *

*/ private ClusterInstanceStatusDetails instanceStatus; /** *

* The type of the instance. *

*/ private String instanceType; /** *

* The time when the instance is launched. *

*/ private java.util.Date launchTime; /** *

* The LifeCycle configuration applied to the instance. *

*/ private ClusterLifeCycleConfig lifeCycleConfig; /** *

* The number of threads per CPU core you specified under CreateCluster. *

*/ private Integer threadsPerCore; /** *

* The configurations of additional storage specified to the instance group where the instance (node) is launched. *

*/ private java.util.List instanceStorageConfigs; /** *

* The private primary IP address of the SageMaker HyperPod cluster node. *

*/ private String privatePrimaryIp; /** *

* The private DNS hostname of the SageMaker HyperPod cluster node. *

*/ private String privateDnsHostname; /** *

* The placement details of the SageMaker HyperPod cluster node. *

*/ private ClusterInstancePlacement placement; /** *

* The instance group name in which the instance is. *

* * @param instanceGroupName * The instance group name in which the instance is. */ public void setInstanceGroupName(String instanceGroupName) { this.instanceGroupName = instanceGroupName; } /** *

* The instance group name in which the instance is. *

* * @return The instance group name in which the instance is. */ public String getInstanceGroupName() { return this.instanceGroupName; } /** *

* The instance group name in which the instance is. *

* * @param instanceGroupName * The instance group name in which the instance is. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withInstanceGroupName(String instanceGroupName) { setInstanceGroupName(instanceGroupName); return this; } /** *

* The ID of the instance. *

* * @param instanceId * The ID of the instance. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** *

* The ID of the instance. *

* * @return The ID of the instance. */ public String getInstanceId() { return this.instanceId; } /** *

* The ID of the instance. *

* * @param instanceId * The ID of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** *

* The status of the instance. *

* * @param instanceStatus * The status of the instance. */ public void setInstanceStatus(ClusterInstanceStatusDetails instanceStatus) { this.instanceStatus = instanceStatus; } /** *

* The status of the instance. *

* * @return The status of the instance. */ public ClusterInstanceStatusDetails getInstanceStatus() { return this.instanceStatus; } /** *

* The status of the instance. *

* * @param instanceStatus * The status of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withInstanceStatus(ClusterInstanceStatusDetails instanceStatus) { setInstanceStatus(instanceStatus); return this; } /** *

* The type of the instance. *

* * @param instanceType * The type of the instance. * @see ClusterInstanceType */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* The type of the instance. *

* * @return The type of the instance. * @see ClusterInstanceType */ public String getInstanceType() { return this.instanceType; } /** *

* The type of the instance. *

* * @param instanceType * The type of the instance. * @return Returns a reference to this object so that method calls can be chained together. * @see ClusterInstanceType */ public ClusterNodeDetails withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *

* The type of the instance. *

* * @param instanceType * The type of the instance. * @return Returns a reference to this object so that method calls can be chained together. * @see ClusterInstanceType */ public ClusterNodeDetails withInstanceType(ClusterInstanceType instanceType) { this.instanceType = instanceType.toString(); return this; } /** *

* The time when the instance is launched. *

* * @param launchTime * The time when the instance is launched. */ public void setLaunchTime(java.util.Date launchTime) { this.launchTime = launchTime; } /** *

* The time when the instance is launched. *

* * @return The time when the instance is launched. */ public java.util.Date getLaunchTime() { return this.launchTime; } /** *

* The time when the instance is launched. *

* * @param launchTime * The time when the instance is launched. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withLaunchTime(java.util.Date launchTime) { setLaunchTime(launchTime); return this; } /** *

* The LifeCycle configuration applied to the instance. *

* * @param lifeCycleConfig * The LifeCycle configuration applied to the instance. */ public void setLifeCycleConfig(ClusterLifeCycleConfig lifeCycleConfig) { this.lifeCycleConfig = lifeCycleConfig; } /** *

* The LifeCycle configuration applied to the instance. *

* * @return The LifeCycle configuration applied to the instance. */ public ClusterLifeCycleConfig getLifeCycleConfig() { return this.lifeCycleConfig; } /** *

* The LifeCycle configuration applied to the instance. *

* * @param lifeCycleConfig * The LifeCycle configuration applied to the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withLifeCycleConfig(ClusterLifeCycleConfig lifeCycleConfig) { setLifeCycleConfig(lifeCycleConfig); return this; } /** *

* The number of threads per CPU core you specified under CreateCluster. *

* * @param threadsPerCore * The number of threads per CPU core you specified under CreateCluster. */ public void setThreadsPerCore(Integer threadsPerCore) { this.threadsPerCore = threadsPerCore; } /** *

* The number of threads per CPU core you specified under CreateCluster. *

* * @return The number of threads per CPU core you specified under CreateCluster. */ public Integer getThreadsPerCore() { return this.threadsPerCore; } /** *

* The number of threads per CPU core you specified under CreateCluster. *

* * @param threadsPerCore * The number of threads per CPU core you specified under CreateCluster. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withThreadsPerCore(Integer threadsPerCore) { setThreadsPerCore(threadsPerCore); return this; } /** *

* The configurations of additional storage specified to the instance group where the instance (node) is launched. *

* * @return The configurations of additional storage specified to the instance group where the instance (node) is * launched. */ public java.util.List getInstanceStorageConfigs() { return instanceStorageConfigs; } /** *

* The configurations of additional storage specified to the instance group where the instance (node) is launched. *

* * @param instanceStorageConfigs * The configurations of additional storage specified to the instance group where the instance (node) is * launched. */ public void setInstanceStorageConfigs(java.util.Collection instanceStorageConfigs) { if (instanceStorageConfigs == null) { this.instanceStorageConfigs = null; return; } this.instanceStorageConfigs = new java.util.ArrayList(instanceStorageConfigs); } /** *

* The configurations of additional storage specified to the instance group where the instance (node) is launched. *

*

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

* * @param instanceStorageConfigs * The configurations of additional storage specified to the instance group where the instance (node) is * launched. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withInstanceStorageConfigs(ClusterInstanceStorageConfig... instanceStorageConfigs) { if (this.instanceStorageConfigs == null) { setInstanceStorageConfigs(new java.util.ArrayList(instanceStorageConfigs.length)); } for (ClusterInstanceStorageConfig ele : instanceStorageConfigs) { this.instanceStorageConfigs.add(ele); } return this; } /** *

* The configurations of additional storage specified to the instance group where the instance (node) is launched. *

* * @param instanceStorageConfigs * The configurations of additional storage specified to the instance group where the instance (node) is * launched. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withInstanceStorageConfigs(java.util.Collection instanceStorageConfigs) { setInstanceStorageConfigs(instanceStorageConfigs); return this; } /** *

* The private primary IP address of the SageMaker HyperPod cluster node. *

* * @param privatePrimaryIp * The private primary IP address of the SageMaker HyperPod cluster node. */ public void setPrivatePrimaryIp(String privatePrimaryIp) { this.privatePrimaryIp = privatePrimaryIp; } /** *

* The private primary IP address of the SageMaker HyperPod cluster node. *

* * @return The private primary IP address of the SageMaker HyperPod cluster node. */ public String getPrivatePrimaryIp() { return this.privatePrimaryIp; } /** *

* The private primary IP address of the SageMaker HyperPod cluster node. *

* * @param privatePrimaryIp * The private primary IP address of the SageMaker HyperPod cluster node. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withPrivatePrimaryIp(String privatePrimaryIp) { setPrivatePrimaryIp(privatePrimaryIp); return this; } /** *

* The private DNS hostname of the SageMaker HyperPod cluster node. *

* * @param privateDnsHostname * The private DNS hostname of the SageMaker HyperPod cluster node. */ public void setPrivateDnsHostname(String privateDnsHostname) { this.privateDnsHostname = privateDnsHostname; } /** *

* The private DNS hostname of the SageMaker HyperPod cluster node. *

* * @return The private DNS hostname of the SageMaker HyperPod cluster node. */ public String getPrivateDnsHostname() { return this.privateDnsHostname; } /** *

* The private DNS hostname of the SageMaker HyperPod cluster node. *

* * @param privateDnsHostname * The private DNS hostname of the SageMaker HyperPod cluster node. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withPrivateDnsHostname(String privateDnsHostname) { setPrivateDnsHostname(privateDnsHostname); return this; } /** *

* The placement details of the SageMaker HyperPod cluster node. *

* * @param placement * The placement details of the SageMaker HyperPod cluster node. */ public void setPlacement(ClusterInstancePlacement placement) { this.placement = placement; } /** *

* The placement details of the SageMaker HyperPod cluster node. *

* * @return The placement details of the SageMaker HyperPod cluster node. */ public ClusterInstancePlacement getPlacement() { return this.placement; } /** *

* The placement details of the SageMaker HyperPod cluster node. *

* * @param placement * The placement details of the SageMaker HyperPod cluster node. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterNodeDetails withPlacement(ClusterInstancePlacement placement) { setPlacement(placement); 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 (getInstanceGroupName() != null) sb.append("InstanceGroupName: ").append(getInstanceGroupName()).append(","); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()).append(","); if (getInstanceStatus() != null) sb.append("InstanceStatus: ").append(getInstanceStatus()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getLaunchTime() != null) sb.append("LaunchTime: ").append(getLaunchTime()).append(","); if (getLifeCycleConfig() != null) sb.append("LifeCycleConfig: ").append(getLifeCycleConfig()).append(","); if (getThreadsPerCore() != null) sb.append("ThreadsPerCore: ").append(getThreadsPerCore()).append(","); if (getInstanceStorageConfigs() != null) sb.append("InstanceStorageConfigs: ").append(getInstanceStorageConfigs()).append(","); if (getPrivatePrimaryIp() != null) sb.append("PrivatePrimaryIp: ").append(getPrivatePrimaryIp()).append(","); if (getPrivateDnsHostname() != null) sb.append("PrivateDnsHostname: ").append(getPrivateDnsHostname()).append(","); if (getPlacement() != null) sb.append("Placement: ").append(getPlacement()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ClusterNodeDetails == false) return false; ClusterNodeDetails other = (ClusterNodeDetails) obj; if (other.getInstanceGroupName() == null ^ this.getInstanceGroupName() == null) return false; if (other.getInstanceGroupName() != null && other.getInstanceGroupName().equals(this.getInstanceGroupName()) == 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.getInstanceStatus() == null ^ this.getInstanceStatus() == null) return false; if (other.getInstanceStatus() != null && other.getInstanceStatus().equals(this.getInstanceStatus()) == 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.getLaunchTime() == null ^ this.getLaunchTime() == null) return false; if (other.getLaunchTime() != null && other.getLaunchTime().equals(this.getLaunchTime()) == false) return false; if (other.getLifeCycleConfig() == null ^ this.getLifeCycleConfig() == null) return false; if (other.getLifeCycleConfig() != null && other.getLifeCycleConfig().equals(this.getLifeCycleConfig()) == false) return false; if (other.getThreadsPerCore() == null ^ this.getThreadsPerCore() == null) return false; if (other.getThreadsPerCore() != null && other.getThreadsPerCore().equals(this.getThreadsPerCore()) == false) return false; if (other.getInstanceStorageConfigs() == null ^ this.getInstanceStorageConfigs() == null) return false; if (other.getInstanceStorageConfigs() != null && other.getInstanceStorageConfigs().equals(this.getInstanceStorageConfigs()) == false) return false; if (other.getPrivatePrimaryIp() == null ^ this.getPrivatePrimaryIp() == null) return false; if (other.getPrivatePrimaryIp() != null && other.getPrivatePrimaryIp().equals(this.getPrivatePrimaryIp()) == false) return false; if (other.getPrivateDnsHostname() == null ^ this.getPrivateDnsHostname() == null) return false; if (other.getPrivateDnsHostname() != null && other.getPrivateDnsHostname().equals(this.getPrivateDnsHostname()) == false) return false; if (other.getPlacement() == null ^ this.getPlacement() == null) return false; if (other.getPlacement() != null && other.getPlacement().equals(this.getPlacement()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInstanceGroupName() == null) ? 0 : getInstanceGroupName().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getInstanceStatus() == null) ? 0 : getInstanceStatus().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getLaunchTime() == null) ? 0 : getLaunchTime().hashCode()); hashCode = prime * hashCode + ((getLifeCycleConfig() == null) ? 0 : getLifeCycleConfig().hashCode()); hashCode = prime * hashCode + ((getThreadsPerCore() == null) ? 0 : getThreadsPerCore().hashCode()); hashCode = prime * hashCode + ((getInstanceStorageConfigs() == null) ? 0 : getInstanceStorageConfigs().hashCode()); hashCode = prime * hashCode + ((getPrivatePrimaryIp() == null) ? 0 : getPrivatePrimaryIp().hashCode()); hashCode = prime * hashCode + ((getPrivateDnsHostname() == null) ? 0 : getPrivateDnsHostname().hashCode()); hashCode = prime * hashCode + ((getPlacement() == null) ? 0 : getPlacement().hashCode()); return hashCode; } @Override public ClusterNodeDetails clone() { try { return (ClusterNodeDetails) 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.ClusterNodeDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy