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

com.amazonaws.services.batch.model.NodeRangeProperty Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Batch module holds the client classes that are used for communicating with AWS Batch.

There is a newer version: 1.12.772
Show 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.batch.model;

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

/**
 * 

* This is an object that represents the properties of the node range for a multi-node parallel job. *

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

* The range of nodes, using node index values. A range of 0:3 indicates nodes with index values of * 0 through 3. If the starting range value is omitted (:n), then * 0 is used to start the range. If the ending range value is omitted (n:), then the * highest possible node index is used to end the range. Your accumulative node ranges must account for all nodes ( * 0:n). You can nest node ranges (for example, 0:10 and 4:5). In this case, * the 4:5 range properties override the 0:10 properties. *

*/ private String targetNodes; /** *

* The container details for the node range. *

*/ private ContainerProperties container; /** *

* The instance types of the underlying host infrastructure of a multi-node parallel job. *

* *

* This parameter isn't applicable to jobs that are running on Fargate resources. *

*

* In addition, this list object is currently limited to one element. *

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

* This is an object that represents the properties of the node range for a multi-node parallel job. *

*/ private EcsProperties ecsProperties; /** *

* This is an object that represents the properties of the node range for a multi-node parallel job. *

*/ private EksProperties eksProperties; /** *

* The range of nodes, using node index values. A range of 0:3 indicates nodes with index values of * 0 through 3. If the starting range value is omitted (:n), then * 0 is used to start the range. If the ending range value is omitted (n:), then the * highest possible node index is used to end the range. Your accumulative node ranges must account for all nodes ( * 0:n). You can nest node ranges (for example, 0:10 and 4:5). In this case, * the 4:5 range properties override the 0:10 properties. *

* * @param targetNodes * The range of nodes, using node index values. A range of 0:3 indicates nodes with index values * of 0 through 3. If the starting range value is omitted (:n), then * 0 is used to start the range. If the ending range value is omitted (n:), then * the highest possible node index is used to end the range. Your accumulative node ranges must account for * all nodes (0:n). You can nest node ranges (for example, 0:10 and * 4:5). In this case, the 4:5 range properties override the 0:10 * properties. */ public void setTargetNodes(String targetNodes) { this.targetNodes = targetNodes; } /** *

* The range of nodes, using node index values. A range of 0:3 indicates nodes with index values of * 0 through 3. If the starting range value is omitted (:n), then * 0 is used to start the range. If the ending range value is omitted (n:), then the * highest possible node index is used to end the range. Your accumulative node ranges must account for all nodes ( * 0:n). You can nest node ranges (for example, 0:10 and 4:5). In this case, * the 4:5 range properties override the 0:10 properties. *

* * @return The range of nodes, using node index values. A range of 0:3 indicates nodes with index * values of 0 through 3. If the starting range value is omitted (:n * ), then 0 is used to start the range. If the ending range value is omitted (n: * ), then the highest possible node index is used to end the range. Your accumulative node ranges must * account for all nodes (0:n). You can nest node ranges (for example, 0:10 and * 4:5). In this case, the 4:5 range properties override the 0:10 * properties. */ public String getTargetNodes() { return this.targetNodes; } /** *

* The range of nodes, using node index values. A range of 0:3 indicates nodes with index values of * 0 through 3. If the starting range value is omitted (:n), then * 0 is used to start the range. If the ending range value is omitted (n:), then the * highest possible node index is used to end the range. Your accumulative node ranges must account for all nodes ( * 0:n). You can nest node ranges (for example, 0:10 and 4:5). In this case, * the 4:5 range properties override the 0:10 properties. *

* * @param targetNodes * The range of nodes, using node index values. A range of 0:3 indicates nodes with index values * of 0 through 3. If the starting range value is omitted (:n), then * 0 is used to start the range. If the ending range value is omitted (n:), then * the highest possible node index is used to end the range. Your accumulative node ranges must account for * all nodes (0:n). You can nest node ranges (for example, 0:10 and * 4:5). In this case, the 4:5 range properties override the 0:10 * properties. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeRangeProperty withTargetNodes(String targetNodes) { setTargetNodes(targetNodes); return this; } /** *

* The container details for the node range. *

* * @param container * The container details for the node range. */ public void setContainer(ContainerProperties container) { this.container = container; } /** *

* The container details for the node range. *

* * @return The container details for the node range. */ public ContainerProperties getContainer() { return this.container; } /** *

* The container details for the node range. *

* * @param container * The container details for the node range. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeRangeProperty withContainer(ContainerProperties container) { setContainer(container); return this; } /** *

* The instance types of the underlying host infrastructure of a multi-node parallel job. *

* *

* This parameter isn't applicable to jobs that are running on Fargate resources. *

*

* In addition, this list object is currently limited to one element. *

*
* * @return The instance types of the underlying host infrastructure of a multi-node parallel job.

*

* This parameter isn't applicable to jobs that are running on Fargate resources. *

*

* In addition, this list object is currently limited to one element. *

*/ public java.util.List getInstanceTypes() { return instanceTypes; } /** *

* The instance types of the underlying host infrastructure of a multi-node parallel job. *

* *

* This parameter isn't applicable to jobs that are running on Fargate resources. *

*

* In addition, this list object is currently limited to one element. *

*
* * @param instanceTypes * The instance types of the underlying host infrastructure of a multi-node parallel job.

*

* This parameter isn't applicable to jobs that are running on Fargate resources. *

*

* In addition, this list object is currently limited to one element. *

*/ public void setInstanceTypes(java.util.Collection instanceTypes) { if (instanceTypes == null) { this.instanceTypes = null; return; } this.instanceTypes = new java.util.ArrayList(instanceTypes); } /** *

* The instance types of the underlying host infrastructure of a multi-node parallel job. *

* *

* This parameter isn't applicable to jobs that are running on Fargate resources. *

*

* In addition, this list object is currently limited to one element. *

*
*

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

* * @param instanceTypes * The instance types of the underlying host infrastructure of a multi-node parallel job.

*

* This parameter isn't applicable to jobs that are running on Fargate resources. *

*

* In addition, this list object is currently limited to one element. *

* @return Returns a reference to this object so that method calls can be chained together. */ public NodeRangeProperty withInstanceTypes(String... instanceTypes) { if (this.instanceTypes == null) { setInstanceTypes(new java.util.ArrayList(instanceTypes.length)); } for (String ele : instanceTypes) { this.instanceTypes.add(ele); } return this; } /** *

* The instance types of the underlying host infrastructure of a multi-node parallel job. *

* *

* This parameter isn't applicable to jobs that are running on Fargate resources. *

*

* In addition, this list object is currently limited to one element. *

*
* * @param instanceTypes * The instance types of the underlying host infrastructure of a multi-node parallel job.

*

* This parameter isn't applicable to jobs that are running on Fargate resources. *

*

* In addition, this list object is currently limited to one element. *

* @return Returns a reference to this object so that method calls can be chained together. */ public NodeRangeProperty withInstanceTypes(java.util.Collection instanceTypes) { setInstanceTypes(instanceTypes); return this; } /** *

* This is an object that represents the properties of the node range for a multi-node parallel job. *

* * @param ecsProperties * This is an object that represents the properties of the node range for a multi-node parallel job. */ public void setEcsProperties(EcsProperties ecsProperties) { this.ecsProperties = ecsProperties; } /** *

* This is an object that represents the properties of the node range for a multi-node parallel job. *

* * @return This is an object that represents the properties of the node range for a multi-node parallel job. */ public EcsProperties getEcsProperties() { return this.ecsProperties; } /** *

* This is an object that represents the properties of the node range for a multi-node parallel job. *

* * @param ecsProperties * This is an object that represents the properties of the node range for a multi-node parallel job. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeRangeProperty withEcsProperties(EcsProperties ecsProperties) { setEcsProperties(ecsProperties); return this; } /** *

* This is an object that represents the properties of the node range for a multi-node parallel job. *

* * @param eksProperties * This is an object that represents the properties of the node range for a multi-node parallel job. */ public void setEksProperties(EksProperties eksProperties) { this.eksProperties = eksProperties; } /** *

* This is an object that represents the properties of the node range for a multi-node parallel job. *

* * @return This is an object that represents the properties of the node range for a multi-node parallel job. */ public EksProperties getEksProperties() { return this.eksProperties; } /** *

* This is an object that represents the properties of the node range for a multi-node parallel job. *

* * @param eksProperties * This is an object that represents the properties of the node range for a multi-node parallel job. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeRangeProperty withEksProperties(EksProperties eksProperties) { setEksProperties(eksProperties); 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 (getTargetNodes() != null) sb.append("TargetNodes: ").append(getTargetNodes()).append(","); if (getContainer() != null) sb.append("Container: ").append(getContainer()).append(","); if (getInstanceTypes() != null) sb.append("InstanceTypes: ").append(getInstanceTypes()).append(","); if (getEcsProperties() != null) sb.append("EcsProperties: ").append(getEcsProperties()).append(","); if (getEksProperties() != null) sb.append("EksProperties: ").append(getEksProperties()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof NodeRangeProperty == false) return false; NodeRangeProperty other = (NodeRangeProperty) obj; if (other.getTargetNodes() == null ^ this.getTargetNodes() == null) return false; if (other.getTargetNodes() != null && other.getTargetNodes().equals(this.getTargetNodes()) == false) return false; if (other.getContainer() == null ^ this.getContainer() == null) return false; if (other.getContainer() != null && other.getContainer().equals(this.getContainer()) == false) return false; if (other.getInstanceTypes() == null ^ this.getInstanceTypes() == null) return false; if (other.getInstanceTypes() != null && other.getInstanceTypes().equals(this.getInstanceTypes()) == false) return false; if (other.getEcsProperties() == null ^ this.getEcsProperties() == null) return false; if (other.getEcsProperties() != null && other.getEcsProperties().equals(this.getEcsProperties()) == false) return false; if (other.getEksProperties() == null ^ this.getEksProperties() == null) return false; if (other.getEksProperties() != null && other.getEksProperties().equals(this.getEksProperties()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTargetNodes() == null) ? 0 : getTargetNodes().hashCode()); hashCode = prime * hashCode + ((getContainer() == null) ? 0 : getContainer().hashCode()); hashCode = prime * hashCode + ((getInstanceTypes() == null) ? 0 : getInstanceTypes().hashCode()); hashCode = prime * hashCode + ((getEcsProperties() == null) ? 0 : getEcsProperties().hashCode()); hashCode = prime * hashCode + ((getEksProperties() == null) ? 0 : getEksProperties().hashCode()); return hashCode; } @Override public NodeRangeProperty clone() { try { return (NodeRangeProperty) 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.batch.model.transform.NodeRangePropertyMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy