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

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

/*
 * Copyright 2012-2017 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;

/**
 * 

* Container properties are used in job definitions to describe the container that is launched as part of a job. *

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

* The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker * Hub registry are available by default. Other repositories are specified with * repository-url/image:tag . Up to 255 letters (uppercase and lowercase), * numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter * maps to Image in the Create a * container section of the Docker Remote API and the * IMAGE parameter of docker run. *

*
    *
  • *

    * Images in Amazon ECR repositories use the full registry and repository URI (for example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>). *

    *
  • *
  • *

    * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

    *
  • *
  • *

    * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

    *
  • *
  • *

    * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

    *
  • *
*/ private String image; /** *

* The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Create a * container section of the Docker Remote API and the * --cpu-shares option to docker run. Each * vCPU is equivalent to 1,024 CPU shares. *

*/ private Integer vcpus; /** *

* The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the memory * specified here, the container is killed. This parameter maps to Memory in the Create a * container section of the Docker Remote API and the * --memory option to docker run. *

*/ private Integer memory; /** *

* The command that is passed to the container. This parameter maps to Cmd in the Create a * container section of the Docker Remote API and the * COMMAND parameter to docker run. For * more information, see https://docs.docker.com/engine * /reference/builder/#cmd. *

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

* The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions. *

*/ private String jobRoleArn; /** *

* A list of data volumes used in a job. *

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

* The environment variables to pass to a container. This parameter maps to Env in the Create a * container section of the Docker Remote API and the * --env option to docker run. *

* *

* We do not recommend using plain text environment variables for sensitive information, such as credential data. *

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

* The mount points for data volumes in your container. This parameter maps to Volumes in the Create a * container section of the Docker Remote API and the * --volume option to docker run. *

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

* When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a * container section of the Docker Remote API and the * --read-only option to docker run. *

*/ private Boolean readonlyRootFilesystem; /** *

* When this parameter is true, the container is given elevated privileges on the host container instance (similar * to the root user). This parameter maps to Privileged in the Create a * container section of the Docker Remote API and the * --privileged option to docker run. *

*/ private Boolean privileged; /** *

* A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a * container section of the Docker Remote API and the * --ulimit option to docker run. *

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

* The user name to use inside the container. This parameter maps to User in the Create a * container section of the Docker Remote API and the * --user option to docker run. *

*/ private String user; /** *

* The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker * Hub registry are available by default. Other repositories are specified with * repository-url/image:tag . Up to 255 letters (uppercase and lowercase), * numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter * maps to Image in the Create a * container section of the Docker Remote API and the * IMAGE parameter of docker run. *

*
    *
  • *

    * Images in Amazon ECR repositories use the full registry and repository URI (for example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>). *

    *
  • *
  • *

    * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

    *
  • *
  • *

    * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

    *
  • *
  • *

    * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

    *
  • *
* * @param image * The image used to start a container. This string is passed directly to the Docker daemon. Images in the * Docker Hub registry are available by default. Other repositories are specified with * repository-url/image:tag . Up to 255 letters (uppercase and lowercase), * numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This * parameter maps to Image in the Create a * container section of the Docker Remote API and the * IMAGE parameter of docker * run.

*
    *
  • *

    * Images in Amazon ECR repositories use the full registry and repository URI (for example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>). *

    *
  • *
  • *

    * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

    *
  • *
  • *

    * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

    *
  • *
  • *

    * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

    *
  • */ public void setImage(String image) { this.image = image; } /** *

    * The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker * Hub registry are available by default. Other repositories are specified with * repository-url/image:tag . Up to 255 letters (uppercase and lowercase), * numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter * maps to Image in the Create a * container section of the Docker Remote API and the * IMAGE parameter of docker run. *

    *
      *
    • *

      * Images in Amazon ECR repositories use the full registry and repository URI (for example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>). *

      *
    • *
    • *

      * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

      *
    • *
    • *

      * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

      *
    • *
    • *

      * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

      *
    • *
    * * @return The image used to start a container. This string is passed directly to the Docker daemon. Images in the * Docker Hub registry are available by default. Other repositories are specified with * repository-url/image:tag . Up to 255 letters (uppercase and * lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are * allowed. This parameter maps to Image in the Create a * container section of the Docker Remote API and * the IMAGE parameter of docker * run.

    *
      *
    • *

      * Images in Amazon ECR repositories use the full registry and repository URI (for example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>). *

      *
    • *
    • *

      * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

      *
    • *
    • *

      * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

      *
    • *
    • *

      * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

      *
    • */ public String getImage() { return this.image; } /** *

      * The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker * Hub registry are available by default. Other repositories are specified with * repository-url/image:tag . Up to 255 letters (uppercase and lowercase), * numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter * maps to Image in the Create a * container section of the Docker Remote API and the * IMAGE parameter of docker run. *

      *
        *
      • *

        * Images in Amazon ECR repositories use the full registry and repository URI (for example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>). *

        *
      • *
      • *

        * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

        *
      • *
      • *

        * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

        *
      • *
      • *

        * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

        *
      • *
      * * @param image * The image used to start a container. This string is passed directly to the Docker daemon. Images in the * Docker Hub registry are available by default. Other repositories are specified with * repository-url/image:tag . Up to 255 letters (uppercase and lowercase), * numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This * parameter maps to Image in the Create a * container section of the Docker Remote API and the * IMAGE parameter of docker * run.

      *
        *
      • *

        * Images in Amazon ECR repositories use the full registry and repository URI (for example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>). *

        *
      • *
      • *

        * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

        *
      • *
      • *

        * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

        *
      • *
      • *

        * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withImage(String image) { setImage(image); return this; } /** *

        * The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Create a * container section of the Docker Remote API and the * --cpu-shares option to docker run. Each * vCPU is equivalent to 1,024 CPU shares. *

        * * @param vcpus * The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Create a * container section of the Docker Remote API and the * --cpu-shares option to docker * run. Each vCPU is equivalent to 1,024 CPU shares. */ public void setVcpus(Integer vcpus) { this.vcpus = vcpus; } /** *

        * The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Create a * container section of the Docker Remote API and the * --cpu-shares option to docker run. Each * vCPU is equivalent to 1,024 CPU shares. *

        * * @return The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Create a * container section of the Docker Remote API and * the --cpu-shares option to docker * run. Each vCPU is equivalent to 1,024 CPU shares. */ public Integer getVcpus() { return this.vcpus; } /** *

        * The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Create a * container section of the Docker Remote API and the * --cpu-shares option to docker run. Each * vCPU is equivalent to 1,024 CPU shares. *

        * * @param vcpus * The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Create a * container section of the Docker Remote API and the * --cpu-shares option to docker * run. Each vCPU is equivalent to 1,024 CPU shares. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withVcpus(Integer vcpus) { setVcpus(vcpus); return this; } /** *

        * The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the memory * specified here, the container is killed. This parameter maps to Memory in the Create a * container section of the Docker Remote API and the * --memory option to docker run. *

        * * @param memory * The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the * memory specified here, the container is killed. This parameter maps to Memory in the Create a * container section of the Docker Remote API and the * --memory option to docker run. */ public void setMemory(Integer memory) { this.memory = memory; } /** *

        * The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the memory * specified here, the container is killed. This parameter maps to Memory in the Create a * container section of the Docker Remote API and the * --memory option to docker run. *

        * * @return The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the * memory specified here, the container is killed. This parameter maps to Memory in the Create a * container section of the Docker Remote API and * the --memory option to docker * run. */ public Integer getMemory() { return this.memory; } /** *

        * The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the memory * specified here, the container is killed. This parameter maps to Memory in the Create a * container section of the Docker Remote API and the * --memory option to docker run. *

        * * @param memory * The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the * memory specified here, the container is killed. This parameter maps to Memory in the Create a * container section of the Docker Remote API and the * --memory option to docker run. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withMemory(Integer memory) { setMemory(memory); return this; } /** *

        * The command that is passed to the container. This parameter maps to Cmd in the Create a * container section of the Docker Remote API and the * COMMAND parameter to docker run. For * more information, see https://docs.docker.com/engine * /reference/builder/#cmd. *

        * * @return The command that is passed to the container. This parameter maps to Cmd in the Create a * container section of the Docker Remote API and * the COMMAND parameter to docker * run. For more information, see https:/ * /docs.docker.com/engine/reference/builder/#cmd. */ public java.util.List getCommand() { return command; } /** *

        * The command that is passed to the container. This parameter maps to Cmd in the Create a * container section of the Docker Remote API and the * COMMAND parameter to docker run. For * more information, see https://docs.docker.com/engine * /reference/builder/#cmd. *

        * * @param command * The command that is passed to the container. This parameter maps to Cmd in the Create a * container section of the Docker Remote API and the * COMMAND parameter to docker run. * For more information, see https://docs.docker * .com/engine/reference/builder/#cmd. */ public void setCommand(java.util.Collection command) { if (command == null) { this.command = null; return; } this.command = new java.util.ArrayList(command); } /** *

        * The command that is passed to the container. This parameter maps to Cmd in the Create a * container section of the Docker Remote API and the * COMMAND parameter to docker run. For * more information, see https://docs.docker.com/engine * /reference/builder/#cmd. *

        *

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

        * * @param command * The command that is passed to the container. This parameter maps to Cmd in the Create a * container section of the Docker Remote API and the * COMMAND parameter to docker run. * For more information, see https://docs.docker * .com/engine/reference/builder/#cmd. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withCommand(String... command) { if (this.command == null) { setCommand(new java.util.ArrayList(command.length)); } for (String ele : command) { this.command.add(ele); } return this; } /** *

        * The command that is passed to the container. This parameter maps to Cmd in the Create a * container section of the Docker Remote API and the * COMMAND parameter to docker run. For * more information, see https://docs.docker.com/engine * /reference/builder/#cmd. *

        * * @param command * The command that is passed to the container. This parameter maps to Cmd in the Create a * container section of the Docker Remote API and the * COMMAND parameter to docker run. * For more information, see https://docs.docker * .com/engine/reference/builder/#cmd. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withCommand(java.util.Collection command) { setCommand(command); return this; } /** *

        * The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions. *

        * * @param jobRoleArn * The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions. */ public void setJobRoleArn(String jobRoleArn) { this.jobRoleArn = jobRoleArn; } /** *

        * The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions. *

        * * @return The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions. */ public String getJobRoleArn() { return this.jobRoleArn; } /** *

        * The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions. *

        * * @param jobRoleArn * The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withJobRoleArn(String jobRoleArn) { setJobRoleArn(jobRoleArn); return this; } /** *

        * A list of data volumes used in a job. *

        * * @return A list of data volumes used in a job. */ public java.util.List getVolumes() { return volumes; } /** *

        * A list of data volumes used in a job. *

        * * @param volumes * A list of data volumes used in a job. */ public void setVolumes(java.util.Collection volumes) { if (volumes == null) { this.volumes = null; return; } this.volumes = new java.util.ArrayList(volumes); } /** *

        * A list of data volumes used in a job. *

        *

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

        * * @param volumes * A list of data volumes used in a job. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withVolumes(Volume... volumes) { if (this.volumes == null) { setVolumes(new java.util.ArrayList(volumes.length)); } for (Volume ele : volumes) { this.volumes.add(ele); } return this; } /** *

        * A list of data volumes used in a job. *

        * * @param volumes * A list of data volumes used in a job. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withVolumes(java.util.Collection volumes) { setVolumes(volumes); return this; } /** *

        * The environment variables to pass to a container. This parameter maps to Env in the Create a * container section of the Docker Remote API and the * --env option to docker run. *

        * *

        * We do not recommend using plain text environment variables for sensitive information, such as credential data. *

        *
        * * @return The environment variables to pass to a container. This parameter maps to Env in the Create a * container section of the Docker Remote API and * the --env option to docker * run.

        *

        * We do not recommend using plain text environment variables for sensitive information, such as credential * data. *

        */ public java.util.List getEnvironment() { return environment; } /** *

        * The environment variables to pass to a container. This parameter maps to Env in the Create a * container section of the Docker Remote API and the * --env option to docker run. *

        * *

        * We do not recommend using plain text environment variables for sensitive information, such as credential data. *

        *
        * * @param environment * The environment variables to pass to a container. This parameter maps to Env in the Create a * container section of the Docker Remote API and the * --env option to docker run.

        * *

        * We do not recommend using plain text environment variables for sensitive information, such as credential * data. *

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

        * The environment variables to pass to a container. This parameter maps to Env in the Create a * container section of the Docker Remote API and the * --env option to docker run. *

        * *

        * We do not recommend using plain text environment variables for sensitive information, such as credential data. *

        *
        *

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

        * * @param environment * The environment variables to pass to a container. This parameter maps to Env in the Create a * container section of the Docker Remote API and the * --env option to docker run.

        * *

        * We do not recommend using plain text environment variables for sensitive information, such as credential * data. *

        * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withEnvironment(KeyValuePair... environment) { if (this.environment == null) { setEnvironment(new java.util.ArrayList(environment.length)); } for (KeyValuePair ele : environment) { this.environment.add(ele); } return this; } /** *

        * The environment variables to pass to a container. This parameter maps to Env in the Create a * container section of the Docker Remote API and the * --env option to docker run. *

        * *

        * We do not recommend using plain text environment variables for sensitive information, such as credential data. *

        *
        * * @param environment * The environment variables to pass to a container. This parameter maps to Env in the Create a * container section of the Docker Remote API and the * --env option to docker run.

        * *

        * We do not recommend using plain text environment variables for sensitive information, such as credential * data. *

        * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withEnvironment(java.util.Collection environment) { setEnvironment(environment); return this; } /** *

        * The mount points for data volumes in your container. This parameter maps to Volumes in the Create a * container section of the Docker Remote API and the * --volume option to docker run. *

        * * @return The mount points for data volumes in your container. This parameter maps to Volumes in the * Create * a container section of the Docker Remote API and * the --volume option to docker * run. */ public java.util.List getMountPoints() { return mountPoints; } /** *

        * The mount points for data volumes in your container. This parameter maps to Volumes in the Create a * container section of the Docker Remote API and the * --volume option to docker run. *

        * * @param mountPoints * The mount points for data volumes in your container. This parameter maps to Volumes in the Create a * container section of the Docker Remote API and the * --volume option to docker run. */ public void setMountPoints(java.util.Collection mountPoints) { if (mountPoints == null) { this.mountPoints = null; return; } this.mountPoints = new java.util.ArrayList(mountPoints); } /** *

        * The mount points for data volumes in your container. This parameter maps to Volumes in the Create a * container section of the Docker Remote API and the * --volume option to docker run. *

        *

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

        * * @param mountPoints * The mount points for data volumes in your container. This parameter maps to Volumes in the Create a * container section of the Docker Remote API and the * --volume option to docker run. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withMountPoints(MountPoint... mountPoints) { if (this.mountPoints == null) { setMountPoints(new java.util.ArrayList(mountPoints.length)); } for (MountPoint ele : mountPoints) { this.mountPoints.add(ele); } return this; } /** *

        * The mount points for data volumes in your container. This parameter maps to Volumes in the Create a * container section of the Docker Remote API and the * --volume option to docker run. *

        * * @param mountPoints * The mount points for data volumes in your container. This parameter maps to Volumes in the Create a * container section of the Docker Remote API and the * --volume option to docker run. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withMountPoints(java.util.Collection mountPoints) { setMountPoints(mountPoints); return this; } /** *

        * When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a * container section of the Docker Remote API and the * --read-only option to docker run. *

        * * @param readonlyRootFilesystem * When this parameter is true, the container is given read-only access to its root file system. This * parameter maps to ReadonlyRootfs in the Create a * container section of the Docker Remote API and the * --read-only option to docker run. */ public void setReadonlyRootFilesystem(Boolean readonlyRootFilesystem) { this.readonlyRootFilesystem = readonlyRootFilesystem; } /** *

        * When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a * container section of the Docker Remote API and the * --read-only option to docker run. *

        * * @return When this parameter is true, the container is given read-only access to its root file system. This * parameter maps to ReadonlyRootfs in the Create a * container section of the Docker Remote API and * the --read-only option to docker run. */ public Boolean getReadonlyRootFilesystem() { return this.readonlyRootFilesystem; } /** *

        * When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a * container section of the Docker Remote API and the * --read-only option to docker run. *

        * * @param readonlyRootFilesystem * When this parameter is true, the container is given read-only access to its root file system. This * parameter maps to ReadonlyRootfs in the Create a * container section of the Docker Remote API and the * --read-only option to docker run. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withReadonlyRootFilesystem(Boolean readonlyRootFilesystem) { setReadonlyRootFilesystem(readonlyRootFilesystem); return this; } /** *

        * When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a * container section of the Docker Remote API and the * --read-only option to docker run. *

        * * @return When this parameter is true, the container is given read-only access to its root file system. This * parameter maps to ReadonlyRootfs in the Create a * container section of the Docker Remote API and * the --read-only option to docker run. */ public Boolean isReadonlyRootFilesystem() { return this.readonlyRootFilesystem; } /** *

        * When this parameter is true, the container is given elevated privileges on the host container instance (similar * to the root user). This parameter maps to Privileged in the Create a * container section of the Docker Remote API and the * --privileged option to docker run. *

        * * @param privileged * When this parameter is true, the container is given elevated privileges on the host container instance * (similar to the root user). This parameter maps to Privileged in the Create a * container section of the Docker Remote API and the * --privileged option to docker * run. */ public void setPrivileged(Boolean privileged) { this.privileged = privileged; } /** *

        * When this parameter is true, the container is given elevated privileges on the host container instance (similar * to the root user). This parameter maps to Privileged in the Create a * container section of the Docker Remote API and the * --privileged option to docker run. *

        * * @return When this parameter is true, the container is given elevated privileges on the host container instance * (similar to the root user). This parameter maps to Privileged in the Create a * container section of the Docker Remote API and * the --privileged option to docker * run. */ public Boolean getPrivileged() { return this.privileged; } /** *

        * When this parameter is true, the container is given elevated privileges on the host container instance (similar * to the root user). This parameter maps to Privileged in the Create a * container section of the Docker Remote API and the * --privileged option to docker run. *

        * * @param privileged * When this parameter is true, the container is given elevated privileges on the host container instance * (similar to the root user). This parameter maps to Privileged in the Create a * container section of the Docker Remote API and the * --privileged option to docker * run. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withPrivileged(Boolean privileged) { setPrivileged(privileged); return this; } /** *

        * When this parameter is true, the container is given elevated privileges on the host container instance (similar * to the root user). This parameter maps to Privileged in the Create a * container section of the Docker Remote API and the * --privileged option to docker run. *

        * * @return When this parameter is true, the container is given elevated privileges on the host container instance * (similar to the root user). This parameter maps to Privileged in the Create a * container section of the Docker Remote API and * the --privileged option to docker * run. */ public Boolean isPrivileged() { return this.privileged; } /** *

        * A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a * container section of the Docker Remote API and the * --ulimit option to docker run. *

        * * @return A list of ulimits to set in the container. This parameter maps to Ulimits in * the Create a * container section of the Docker Remote API and * the --ulimit option to docker * run. */ public java.util.List getUlimits() { return ulimits; } /** *

        * A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a * container section of the Docker Remote API and the * --ulimit option to docker run. *

        * * @param ulimits * A list of ulimits to set in the container. This parameter maps to Ulimits in the * Create * a container section of the Docker Remote API and the * --ulimit option to docker run. */ public void setUlimits(java.util.Collection ulimits) { if (ulimits == null) { this.ulimits = null; return; } this.ulimits = new java.util.ArrayList(ulimits); } /** *

        * A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a * container section of the Docker Remote API and the * --ulimit option to docker run. *

        *

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

        * * @param ulimits * A list of ulimits to set in the container. This parameter maps to Ulimits in the * Create * a container section of the Docker Remote API and the * --ulimit option to docker run. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withUlimits(Ulimit... ulimits) { if (this.ulimits == null) { setUlimits(new java.util.ArrayList(ulimits.length)); } for (Ulimit ele : ulimits) { this.ulimits.add(ele); } return this; } /** *

        * A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a * container section of the Docker Remote API and the * --ulimit option to docker run. *

        * * @param ulimits * A list of ulimits to set in the container. This parameter maps to Ulimits in the * Create * a container section of the Docker Remote API and the * --ulimit option to docker run. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withUlimits(java.util.Collection ulimits) { setUlimits(ulimits); return this; } /** *

        * The user name to use inside the container. This parameter maps to User in the Create a * container section of the Docker Remote API and the * --user option to docker run. *

        * * @param user * The user name to use inside the container. This parameter maps to User in the Create a * container section of the Docker Remote API and the * --user option to docker run. */ public void setUser(String user) { this.user = user; } /** *

        * The user name to use inside the container. This parameter maps to User in the Create a * container section of the Docker Remote API and the * --user option to docker run. *

        * * @return The user name to use inside the container. This parameter maps to User in the Create a * container section of the Docker Remote API and * the --user option to docker run. */ public String getUser() { return this.user; } /** *

        * The user name to use inside the container. This parameter maps to User in the Create a * container section of the Docker Remote API and the * --user option to docker run. *

        * * @param user * The user name to use inside the container. This parameter maps to User in the Create a * container section of the Docker Remote API and the * --user option to docker run. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withUser(String user) { setUser(user); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getImage() != null) sb.append("Image: ").append(getImage()).append(","); if (getVcpus() != null) sb.append("Vcpus: ").append(getVcpus()).append(","); if (getMemory() != null) sb.append("Memory: ").append(getMemory()).append(","); if (getCommand() != null) sb.append("Command: ").append(getCommand()).append(","); if (getJobRoleArn() != null) sb.append("JobRoleArn: ").append(getJobRoleArn()).append(","); if (getVolumes() != null) sb.append("Volumes: ").append(getVolumes()).append(","); if (getEnvironment() != null) sb.append("Environment: ").append(getEnvironment()).append(","); if (getMountPoints() != null) sb.append("MountPoints: ").append(getMountPoints()).append(","); if (getReadonlyRootFilesystem() != null) sb.append("ReadonlyRootFilesystem: ").append(getReadonlyRootFilesystem()).append(","); if (getPrivileged() != null) sb.append("Privileged: ").append(getPrivileged()).append(","); if (getUlimits() != null) sb.append("Ulimits: ").append(getUlimits()).append(","); if (getUser() != null) sb.append("User: ").append(getUser()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ContainerProperties == false) return false; ContainerProperties other = (ContainerProperties) obj; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getVcpus() == null ^ this.getVcpus() == null) return false; if (other.getVcpus() != null && other.getVcpus().equals(this.getVcpus()) == false) return false; if (other.getMemory() == null ^ this.getMemory() == null) return false; if (other.getMemory() != null && other.getMemory().equals(this.getMemory()) == false) return false; if (other.getCommand() == null ^ this.getCommand() == null) return false; if (other.getCommand() != null && other.getCommand().equals(this.getCommand()) == false) return false; if (other.getJobRoleArn() == null ^ this.getJobRoleArn() == null) return false; if (other.getJobRoleArn() != null && other.getJobRoleArn().equals(this.getJobRoleArn()) == false) return false; if (other.getVolumes() == null ^ this.getVolumes() == null) return false; if (other.getVolumes() != null && other.getVolumes().equals(this.getVolumes()) == false) return false; if (other.getEnvironment() == null ^ this.getEnvironment() == null) return false; if (other.getEnvironment() != null && other.getEnvironment().equals(this.getEnvironment()) == false) return false; if (other.getMountPoints() == null ^ this.getMountPoints() == null) return false; if (other.getMountPoints() != null && other.getMountPoints().equals(this.getMountPoints()) == false) return false; if (other.getReadonlyRootFilesystem() == null ^ this.getReadonlyRootFilesystem() == null) return false; if (other.getReadonlyRootFilesystem() != null && other.getReadonlyRootFilesystem().equals(this.getReadonlyRootFilesystem()) == false) return false; if (other.getPrivileged() == null ^ this.getPrivileged() == null) return false; if (other.getPrivileged() != null && other.getPrivileged().equals(this.getPrivileged()) == false) return false; if (other.getUlimits() == null ^ this.getUlimits() == null) return false; if (other.getUlimits() != null && other.getUlimits().equals(this.getUlimits()) == false) return false; if (other.getUser() == null ^ this.getUser() == null) return false; if (other.getUser() != null && other.getUser().equals(this.getUser()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getVcpus() == null) ? 0 : getVcpus().hashCode()); hashCode = prime * hashCode + ((getMemory() == null) ? 0 : getMemory().hashCode()); hashCode = prime * hashCode + ((getCommand() == null) ? 0 : getCommand().hashCode()); hashCode = prime * hashCode + ((getJobRoleArn() == null) ? 0 : getJobRoleArn().hashCode()); hashCode = prime * hashCode + ((getVolumes() == null) ? 0 : getVolumes().hashCode()); hashCode = prime * hashCode + ((getEnvironment() == null) ? 0 : getEnvironment().hashCode()); hashCode = prime * hashCode + ((getMountPoints() == null) ? 0 : getMountPoints().hashCode()); hashCode = prime * hashCode + ((getReadonlyRootFilesystem() == null) ? 0 : getReadonlyRootFilesystem().hashCode()); hashCode = prime * hashCode + ((getPrivileged() == null) ? 0 : getPrivileged().hashCode()); hashCode = prime * hashCode + ((getUlimits() == null) ? 0 : getUlimits().hashCode()); hashCode = prime * hashCode + ((getUser() == null) ? 0 : getUser().hashCode()); return hashCode; } @Override public ContainerProperties clone() { try { return (ContainerProperties) 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.ContainerPropertiesMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy