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

com.amazonaws.services.batch.model.NodeOverrides 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;

/**
 * 

* An object that represents any node overrides to a job definition that's used in a SubmitJob API operation. *

* *

* This parameter isn't applicable to jobs that are running on Fargate resources. Don't provide it for these jobs. * Rather, use containerOverrides instead. *

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

* The number of nodes to use with a multi-node parallel job. This value overrides the number of nodes that are * specified in the job definition. To use this override, you must meet the following conditions: *

*
    *
  • *

    * There must be at least one node range in your job definition that has an open upper boundary, such as * : or n:. *

    *
  • *
  • *

    * The lower boundary of the node range that's specified in the job definition must be fewer than the number of * nodes specified in the override. *

    *
  • *
  • *

    * The main node index that's specified in the job definition must be fewer than the number of nodes specified in * the override. *

    *
  • *
*/ private Integer numNodes; /** *

* The node property overrides for the job. *

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

* The number of nodes to use with a multi-node parallel job. This value overrides the number of nodes that are * specified in the job definition. To use this override, you must meet the following conditions: *

*
    *
  • *

    * There must be at least one node range in your job definition that has an open upper boundary, such as * : or n:. *

    *
  • *
  • *

    * The lower boundary of the node range that's specified in the job definition must be fewer than the number of * nodes specified in the override. *

    *
  • *
  • *

    * The main node index that's specified in the job definition must be fewer than the number of nodes specified in * the override. *

    *
  • *
* * @param numNodes * The number of nodes to use with a multi-node parallel job. This value overrides the number of nodes that * are specified in the job definition. To use this override, you must meet the following conditions:

*
    *
  • *

    * There must be at least one node range in your job definition that has an open upper boundary, such as * : or n:. *

    *
  • *
  • *

    * The lower boundary of the node range that's specified in the job definition must be fewer than the number * of nodes specified in the override. *

    *
  • *
  • *

    * The main node index that's specified in the job definition must be fewer than the number of nodes * specified in the override. *

    *
  • */ public void setNumNodes(Integer numNodes) { this.numNodes = numNodes; } /** *

    * The number of nodes to use with a multi-node parallel job. This value overrides the number of nodes that are * specified in the job definition. To use this override, you must meet the following conditions: *

    *
      *
    • *

      * There must be at least one node range in your job definition that has an open upper boundary, such as * : or n:. *

      *
    • *
    • *

      * The lower boundary of the node range that's specified in the job definition must be fewer than the number of * nodes specified in the override. *

      *
    • *
    • *

      * The main node index that's specified in the job definition must be fewer than the number of nodes specified in * the override. *

      *
    • *
    * * @return The number of nodes to use with a multi-node parallel job. This value overrides the number of nodes that * are specified in the job definition. To use this override, you must meet the following conditions:

    *
      *
    • *

      * There must be at least one node range in your job definition that has an open upper boundary, such as * : or n:. *

      *
    • *
    • *

      * The lower boundary of the node range that's specified in the job definition must be fewer than the number * of nodes specified in the override. *

      *
    • *
    • *

      * The main node index that's specified in the job definition must be fewer than the number of nodes * specified in the override. *

      *
    • */ public Integer getNumNodes() { return this.numNodes; } /** *

      * The number of nodes to use with a multi-node parallel job. This value overrides the number of nodes that are * specified in the job definition. To use this override, you must meet the following conditions: *

      *
        *
      • *

        * There must be at least one node range in your job definition that has an open upper boundary, such as * : or n:. *

        *
      • *
      • *

        * The lower boundary of the node range that's specified in the job definition must be fewer than the number of * nodes specified in the override. *

        *
      • *
      • *

        * The main node index that's specified in the job definition must be fewer than the number of nodes specified in * the override. *

        *
      • *
      * * @param numNodes * The number of nodes to use with a multi-node parallel job. This value overrides the number of nodes that * are specified in the job definition. To use this override, you must meet the following conditions:

      *
        *
      • *

        * There must be at least one node range in your job definition that has an open upper boundary, such as * : or n:. *

        *
      • *
      • *

        * The lower boundary of the node range that's specified in the job definition must be fewer than the number * of nodes specified in the override. *

        *
      • *
      • *

        * The main node index that's specified in the job definition must be fewer than the number of nodes * specified in the override. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public NodeOverrides withNumNodes(Integer numNodes) { setNumNodes(numNodes); return this; } /** *

        * The node property overrides for the job. *

        * * @return The node property overrides for the job. */ public java.util.List getNodePropertyOverrides() { return nodePropertyOverrides; } /** *

        * The node property overrides for the job. *

        * * @param nodePropertyOverrides * The node property overrides for the job. */ public void setNodePropertyOverrides(java.util.Collection nodePropertyOverrides) { if (nodePropertyOverrides == null) { this.nodePropertyOverrides = null; return; } this.nodePropertyOverrides = new java.util.ArrayList(nodePropertyOverrides); } /** *

        * The node property overrides for the job. *

        *

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

        * * @param nodePropertyOverrides * The node property overrides for the job. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeOverrides withNodePropertyOverrides(NodePropertyOverride... nodePropertyOverrides) { if (this.nodePropertyOverrides == null) { setNodePropertyOverrides(new java.util.ArrayList(nodePropertyOverrides.length)); } for (NodePropertyOverride ele : nodePropertyOverrides) { this.nodePropertyOverrides.add(ele); } return this; } /** *

        * The node property overrides for the job. *

        * * @param nodePropertyOverrides * The node property overrides for the job. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeOverrides withNodePropertyOverrides(java.util.Collection nodePropertyOverrides) { setNodePropertyOverrides(nodePropertyOverrides); 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 (getNumNodes() != null) sb.append("NumNodes: ").append(getNumNodes()).append(","); if (getNodePropertyOverrides() != null) sb.append("NodePropertyOverrides: ").append(getNodePropertyOverrides()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof NodeOverrides == false) return false; NodeOverrides other = (NodeOverrides) obj; if (other.getNumNodes() == null ^ this.getNumNodes() == null) return false; if (other.getNumNodes() != null && other.getNumNodes().equals(this.getNumNodes()) == false) return false; if (other.getNodePropertyOverrides() == null ^ this.getNodePropertyOverrides() == null) return false; if (other.getNodePropertyOverrides() != null && other.getNodePropertyOverrides().equals(this.getNodePropertyOverrides()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNumNodes() == null) ? 0 : getNumNodes().hashCode()); hashCode = prime * hashCode + ((getNodePropertyOverrides() == null) ? 0 : getNodePropertyOverrides().hashCode()); return hashCode; } @Override public NodeOverrides clone() { try { return (NodeOverrides) 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.NodeOverridesMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy