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

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

/**
 * 

* EKS container properties are used in job definitions for Amazon EKS based job definitions to describe the properties * for a container node in the pod that's launched as part of a job. This can't be specified for Amazon ECS based job * definitions. *

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

* The name of the container. If the name isn't specified, the default name "Default" is used. Each * container in a pod must have a unique name. *

*/ private String name; /** *

* The Docker image used to start the container. *

*/ private String image; /** *

* The image pull policy for the container. Supported values are Always, IfNotPresent, and * Never. This parameter defaults to IfNotPresent. However, if the :latest * tag is specified, it defaults to Always. For more information, see Updating images in the * Kubernetes documentation. *

*/ private String imagePullPolicy; /** *

* The entrypoint for the container. This isn't run within a shell. If this isn't specified, the * ENTRYPOINT of the container image is used. Environment variable references are expanded using the * container's environment. *

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if * the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the * command string will remain "$(NAME1)." $$ is replaced with $ and the * resulting string isn't expanded. For example, $$(VAR_NAME) will be passed as * $(VAR_NAME) whether or not the VAR_NAME environment variable exists. The entrypoint * can't be updated. For more information, see ENTRYPOINT in the Dockerfile * reference and Define a * command and arguments for a container and Entrypoint * in the Kubernetes documentation. *

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

* An array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is * used. This corresponds to the args member in the Entrypoint * portion of the Pod * in Kubernetes. Environment variable references are expanded using the container's environment. *

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if * the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the * command string will remain "$(NAME1)." $$ is replaced with $, and the * resulting string isn't expanded. For example, $$(VAR_NAME) is passed as $(VAR_NAME) * whether or not the VAR_NAME environment variable exists. For more information, see Dockerfile reference: CMD and Define a * command and arguments for a pod in the Kubernetes documentation. *

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

* The environment variables to pass to a container. *

* *

* Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for * variables that Batch sets. *

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

* The type and amount of resources to assign to a container. The supported resources include memory, * cpu, and nvidia.com/gpu. For more information, see Resource management for * pods and containers in the Kubernetes documentation. *

*/ private EksContainerResourceRequirements resources; /** *

* The volume mounts for the container. Batch supports emptyDir, hostPath, and * secret volume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation. *

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

* The security context for a job. For more information, see Configure a security context * for a pod or container in the Kubernetes documentation. *

*/ private EksContainerSecurityContext securityContext; /** *

* The name of the container. If the name isn't specified, the default name "Default" is used. Each * container in a pod must have a unique name. *

* * @param name * The name of the container. If the name isn't specified, the default name "Default" is used. * Each container in a pod must have a unique name. */ public void setName(String name) { this.name = name; } /** *

* The name of the container. If the name isn't specified, the default name "Default" is used. Each * container in a pod must have a unique name. *

* * @return The name of the container. If the name isn't specified, the default name "Default" is used. * Each container in a pod must have a unique name. */ public String getName() { return this.name; } /** *

* The name of the container. If the name isn't specified, the default name "Default" is used. Each * container in a pod must have a unique name. *

* * @param name * The name of the container. If the name isn't specified, the default name "Default" is used. * Each container in a pod must have a unique name. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withName(String name) { setName(name); return this; } /** *

* The Docker image used to start the container. *

* * @param image * The Docker image used to start the container. */ public void setImage(String image) { this.image = image; } /** *

* The Docker image used to start the container. *

* * @return The Docker image used to start the container. */ public String getImage() { return this.image; } /** *

* The Docker image used to start the container. *

* * @param image * The Docker image used to start the container. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withImage(String image) { setImage(image); return this; } /** *

* The image pull policy for the container. Supported values are Always, IfNotPresent, and * Never. This parameter defaults to IfNotPresent. However, if the :latest * tag is specified, it defaults to Always. For more information, see Updating images in the * Kubernetes documentation. *

* * @param imagePullPolicy * The image pull policy for the container. Supported values are Always, * IfNotPresent, and Never. This parameter defaults to IfNotPresent. * However, if the :latest tag is specified, it defaults to Always. For more * information, see Updating * images in the Kubernetes documentation. */ public void setImagePullPolicy(String imagePullPolicy) { this.imagePullPolicy = imagePullPolicy; } /** *

* The image pull policy for the container. Supported values are Always, IfNotPresent, and * Never. This parameter defaults to IfNotPresent. However, if the :latest * tag is specified, it defaults to Always. For more information, see Updating images in the * Kubernetes documentation. *

* * @return The image pull policy for the container. Supported values are Always, * IfNotPresent, and Never. This parameter defaults to IfNotPresent. * However, if the :latest tag is specified, it defaults to Always. For more * information, see Updating images in the * Kubernetes documentation. */ public String getImagePullPolicy() { return this.imagePullPolicy; } /** *

* The image pull policy for the container. Supported values are Always, IfNotPresent, and * Never. This parameter defaults to IfNotPresent. However, if the :latest * tag is specified, it defaults to Always. For more information, see Updating images in the * Kubernetes documentation. *

* * @param imagePullPolicy * The image pull policy for the container. Supported values are Always, * IfNotPresent, and Never. This parameter defaults to IfNotPresent. * However, if the :latest tag is specified, it defaults to Always. For more * information, see Updating * images in the Kubernetes documentation. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withImagePullPolicy(String imagePullPolicy) { setImagePullPolicy(imagePullPolicy); return this; } /** *

* The entrypoint for the container. This isn't run within a shell. If this isn't specified, the * ENTRYPOINT of the container image is used. Environment variable references are expanded using the * container's environment. *

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if * the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the * command string will remain "$(NAME1)." $$ is replaced with $ and the * resulting string isn't expanded. For example, $$(VAR_NAME) will be passed as * $(VAR_NAME) whether or not the VAR_NAME environment variable exists. The entrypoint * can't be updated. For more information, see ENTRYPOINT in the Dockerfile * reference and Define a * command and arguments for a container and Entrypoint * in the Kubernetes documentation. *

* * @return The entrypoint for the container. This isn't run within a shell. If this isn't specified, the * ENTRYPOINT of the container image is used. Environment variable references are expanded * using the container's environment.

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For * example, if the reference is to "$(NAME1)" and the NAME1 environment variable * doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with * $ and the resulting string isn't expanded. For example, $$(VAR_NAME) will be * passed as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. * The entrypoint can't be updated. For more information, see ENTRYPOINT in the Dockerfile * reference and Define * a command and arguments for a container and Entrypoint in the Kubernetes documentation. */ public java.util.List getCommand() { return command; } /** *

* The entrypoint for the container. This isn't run within a shell. If this isn't specified, the * ENTRYPOINT of the container image is used. Environment variable references are expanded using the * container's environment. *

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if * the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the * command string will remain "$(NAME1)." $$ is replaced with $ and the * resulting string isn't expanded. For example, $$(VAR_NAME) will be passed as * $(VAR_NAME) whether or not the VAR_NAME environment variable exists. The entrypoint * can't be updated. For more information, see ENTRYPOINT in the Dockerfile * reference and Define a * command and arguments for a container and Entrypoint * in the Kubernetes documentation. *

* * @param command * The entrypoint for the container. This isn't run within a shell. If this isn't specified, the * ENTRYPOINT of the container image is used. Environment variable references are expanded using * the container's environment.

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For * example, if the reference is to "$(NAME1)" and the NAME1 environment variable * doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with * $ and the resulting string isn't expanded. For example, $$(VAR_NAME) will be * passed as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. * The entrypoint can't be updated. For more information, see ENTRYPOINT in the Dockerfile * reference and Define * a command and arguments for a container and Entrypoint in the Kubernetes documentation. */ public void setCommand(java.util.Collection command) { if (command == null) { this.command = null; return; } this.command = new java.util.ArrayList(command); } /** *

* The entrypoint for the container. This isn't run within a shell. If this isn't specified, the * ENTRYPOINT of the container image is used. Environment variable references are expanded using the * container's environment. *

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if * the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the * command string will remain "$(NAME1)." $$ is replaced with $ and the * resulting string isn't expanded. For example, $$(VAR_NAME) will be passed as * $(VAR_NAME) whether or not the VAR_NAME environment variable exists. The entrypoint * can't be updated. For more information, see ENTRYPOINT in the Dockerfile * reference and Define a * command and arguments for a container and Entrypoint * in the Kubernetes documentation. *

*

* 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 entrypoint for the container. This isn't run within a shell. If this isn't specified, the * ENTRYPOINT of the container image is used. Environment variable references are expanded using * the container's environment.

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For * example, if the reference is to "$(NAME1)" and the NAME1 environment variable * doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with * $ and the resulting string isn't expanded. For example, $$(VAR_NAME) will be * passed as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. * The entrypoint can't be updated. For more information, see ENTRYPOINT in the Dockerfile * reference and Define * a command and arguments for a container and Entrypoint in the Kubernetes documentation. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer 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 entrypoint for the container. This isn't run within a shell. If this isn't specified, the * ENTRYPOINT of the container image is used. Environment variable references are expanded using the * container's environment. *

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if * the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the * command string will remain "$(NAME1)." $$ is replaced with $ and the * resulting string isn't expanded. For example, $$(VAR_NAME) will be passed as * $(VAR_NAME) whether or not the VAR_NAME environment variable exists. The entrypoint * can't be updated. For more information, see ENTRYPOINT in the Dockerfile * reference and Define a * command and arguments for a container and Entrypoint * in the Kubernetes documentation. *

* * @param command * The entrypoint for the container. This isn't run within a shell. If this isn't specified, the * ENTRYPOINT of the container image is used. Environment variable references are expanded using * the container's environment.

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For * example, if the reference is to "$(NAME1)" and the NAME1 environment variable * doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with * $ and the resulting string isn't expanded. For example, $$(VAR_NAME) will be * passed as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. * The entrypoint can't be updated. For more information, see ENTRYPOINT in the Dockerfile * reference and Define * a command and arguments for a container and Entrypoint in the Kubernetes documentation. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withCommand(java.util.Collection command) { setCommand(command); return this; } /** *

* An array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is * used. This corresponds to the args member in the Entrypoint * portion of the Pod * in Kubernetes. Environment variable references are expanded using the container's environment. *

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if * the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the * command string will remain "$(NAME1)." $$ is replaced with $, and the * resulting string isn't expanded. For example, $$(VAR_NAME) is passed as $(VAR_NAME) * whether or not the VAR_NAME environment variable exists. For more information, see Dockerfile reference: CMD and Define a * command and arguments for a pod in the Kubernetes documentation. *

* * @return An array of arguments to the entrypoint. If this isn't specified, the CMD of the container * image is used. This corresponds to the args member in the Entrypoint portion of the Pod in * Kubernetes. Environment variable references are expanded using the container's environment.

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For * example, if the reference is to "$(NAME1)" and the NAME1 environment variable * doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with * $, and the resulting string isn't expanded. For example, $$(VAR_NAME) is passed * as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. For * more information, see Dockerfile * reference: CMD and Define * a command and arguments for a pod in the Kubernetes documentation. */ public java.util.List getArgs() { return args; } /** *

* An array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is * used. This corresponds to the args member in the Entrypoint * portion of the Pod * in Kubernetes. Environment variable references are expanded using the container's environment. *

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if * the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the * command string will remain "$(NAME1)." $$ is replaced with $, and the * resulting string isn't expanded. For example, $$(VAR_NAME) is passed as $(VAR_NAME) * whether or not the VAR_NAME environment variable exists. For more information, see Dockerfile reference: CMD and Define a * command and arguments for a pod in the Kubernetes documentation. *

* * @param args * An array of arguments to the entrypoint. If this isn't specified, the CMD of the container * image is used. This corresponds to the args member in the Entrypoint portion of the Pod in * Kubernetes. Environment variable references are expanded using the container's environment.

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For * example, if the reference is to "$(NAME1)" and the NAME1 environment variable * doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with * $, and the resulting string isn't expanded. For example, $$(VAR_NAME) is passed * as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. For more * information, see Dockerfile reference: * CMD and Define * a command and arguments for a pod in the Kubernetes documentation. */ public void setArgs(java.util.Collection args) { if (args == null) { this.args = null; return; } this.args = new java.util.ArrayList(args); } /** *

* An array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is * used. This corresponds to the args member in the Entrypoint * portion of the Pod * in Kubernetes. Environment variable references are expanded using the container's environment. *

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if * the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the * command string will remain "$(NAME1)." $$ is replaced with $, and the * resulting string isn't expanded. For example, $$(VAR_NAME) is passed as $(VAR_NAME) * whether or not the VAR_NAME environment variable exists. For more information, see Dockerfile reference: CMD and Define a * command and arguments for a pod in the Kubernetes documentation. *

*

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

* * @param args * An array of arguments to the entrypoint. If this isn't specified, the CMD of the container * image is used. This corresponds to the args member in the Entrypoint portion of the Pod in * Kubernetes. Environment variable references are expanded using the container's environment.

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For * example, if the reference is to "$(NAME1)" and the NAME1 environment variable * doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with * $, and the resulting string isn't expanded. For example, $$(VAR_NAME) is passed * as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. For more * information, see Dockerfile reference: * CMD and Define * a command and arguments for a pod in the Kubernetes documentation. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withArgs(String... args) { if (this.args == null) { setArgs(new java.util.ArrayList(args.length)); } for (String ele : args) { this.args.add(ele); } return this; } /** *

* An array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is * used. This corresponds to the args member in the Entrypoint * portion of the Pod * in Kubernetes. Environment variable references are expanded using the container's environment. *

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if * the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the * command string will remain "$(NAME1)." $$ is replaced with $, and the * resulting string isn't expanded. For example, $$(VAR_NAME) is passed as $(VAR_NAME) * whether or not the VAR_NAME environment variable exists. For more information, see Dockerfile reference: CMD and Define a * command and arguments for a pod in the Kubernetes documentation. *

* * @param args * An array of arguments to the entrypoint. If this isn't specified, the CMD of the container * image is used. This corresponds to the args member in the Entrypoint portion of the Pod in * Kubernetes. Environment variable references are expanded using the container's environment.

*

* If the referenced environment variable doesn't exist, the reference in the command isn't changed. For * example, if the reference is to "$(NAME1)" and the NAME1 environment variable * doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with * $, and the resulting string isn't expanded. For example, $$(VAR_NAME) is passed * as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. For more * information, see Dockerfile reference: * CMD and Define * a command and arguments for a pod in the Kubernetes documentation. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withArgs(java.util.Collection args) { setArgs(args); return this; } /** *

* The environment variables to pass to a container. *

* *

* Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for * variables that Batch sets. *

*
* * @return The environment variables to pass to a container.

*

* Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for * variables that Batch sets. *

*/ public java.util.List getEnv() { return env; } /** *

* The environment variables to pass to a container. *

* *

* Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for * variables that Batch sets. *

*
* * @param env * The environment variables to pass to a container.

*

* Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for * variables that Batch sets. *

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

* The environment variables to pass to a container. *

* *

* Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for * variables that Batch sets. *

*
*

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

* * @param env * The environment variables to pass to a container.

*

* Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for * variables that Batch sets. *

* @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withEnv(EksContainerEnvironmentVariable... env) { if (this.env == null) { setEnv(new java.util.ArrayList(env.length)); } for (EksContainerEnvironmentVariable ele : env) { this.env.add(ele); } return this; } /** *

* The environment variables to pass to a container. *

* *

* Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for * variables that Batch sets. *

*
* * @param env * The environment variables to pass to a container.

*

* Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for * variables that Batch sets. *

* @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withEnv(java.util.Collection env) { setEnv(env); return this; } /** *

* The type and amount of resources to assign to a container. The supported resources include memory, * cpu, and nvidia.com/gpu. For more information, see Resource management for * pods and containers in the Kubernetes documentation. *

* * @param resources * The type and amount of resources to assign to a container. The supported resources include * memory, cpu, and nvidia.com/gpu. For more information, see Resource management * for pods and containers in the Kubernetes documentation. */ public void setResources(EksContainerResourceRequirements resources) { this.resources = resources; } /** *

* The type and amount of resources to assign to a container. The supported resources include memory, * cpu, and nvidia.com/gpu. For more information, see Resource management for * pods and containers in the Kubernetes documentation. *

* * @return The type and amount of resources to assign to a container. The supported resources include * memory, cpu, and nvidia.com/gpu. For more information, see Resource management * for pods and containers in the Kubernetes documentation. */ public EksContainerResourceRequirements getResources() { return this.resources; } /** *

* The type and amount of resources to assign to a container. The supported resources include memory, * cpu, and nvidia.com/gpu. For more information, see Resource management for * pods and containers in the Kubernetes documentation. *

* * @param resources * The type and amount of resources to assign to a container. The supported resources include * memory, cpu, and nvidia.com/gpu. For more information, see Resource management * for pods and containers in the Kubernetes documentation. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withResources(EksContainerResourceRequirements resources) { setResources(resources); return this; } /** *

* The volume mounts for the container. Batch supports emptyDir, hostPath, and * secret volume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation. *

* * @return The volume mounts for the container. Batch supports emptyDir, hostPath, and * secret volume types. For more information about volumes and volume mounts in Kubernetes, see * Volumes in the Kubernetes * documentation. */ public java.util.List getVolumeMounts() { return volumeMounts; } /** *

* The volume mounts for the container. Batch supports emptyDir, hostPath, and * secret volume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation. *

* * @param volumeMounts * The volume mounts for the container. Batch supports emptyDir, hostPath, and * secret volume types. For more information about volumes and volume mounts in Kubernetes, see * Volumes in the Kubernetes * documentation. */ public void setVolumeMounts(java.util.Collection volumeMounts) { if (volumeMounts == null) { this.volumeMounts = null; return; } this.volumeMounts = new java.util.ArrayList(volumeMounts); } /** *

* The volume mounts for the container. Batch supports emptyDir, hostPath, and * secret volume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation. *

*

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

* * @param volumeMounts * The volume mounts for the container. Batch supports emptyDir, hostPath, and * secret volume types. For more information about volumes and volume mounts in Kubernetes, see * Volumes in the Kubernetes * documentation. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withVolumeMounts(EksContainerVolumeMount... volumeMounts) { if (this.volumeMounts == null) { setVolumeMounts(new java.util.ArrayList(volumeMounts.length)); } for (EksContainerVolumeMount ele : volumeMounts) { this.volumeMounts.add(ele); } return this; } /** *

* The volume mounts for the container. Batch supports emptyDir, hostPath, and * secret volume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation. *

* * @param volumeMounts * The volume mounts for the container. Batch supports emptyDir, hostPath, and * secret volume types. For more information about volumes and volume mounts in Kubernetes, see * Volumes in the Kubernetes * documentation. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withVolumeMounts(java.util.Collection volumeMounts) { setVolumeMounts(volumeMounts); return this; } /** *

* The security context for a job. For more information, see Configure a security context * for a pod or container in the Kubernetes documentation. *

* * @param securityContext * The security context for a job. For more information, see Configure a security * context for a pod or container in the Kubernetes documentation. */ public void setSecurityContext(EksContainerSecurityContext securityContext) { this.securityContext = securityContext; } /** *

* The security context for a job. For more information, see Configure a security context * for a pod or container in the Kubernetes documentation. *

* * @return The security context for a job. For more information, see Configure a security * context for a pod or container in the Kubernetes documentation. */ public EksContainerSecurityContext getSecurityContext() { return this.securityContext; } /** *

* The security context for a job. For more information, see Configure a security context * for a pod or container in the Kubernetes documentation. *

* * @param securityContext * The security context for a job. For more information, see Configure a security * context for a pod or container in the Kubernetes documentation. * @return Returns a reference to this object so that method calls can be chained together. */ public EksContainer withSecurityContext(EksContainerSecurityContext securityContext) { setSecurityContext(securityContext); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getImage() != null) sb.append("Image: ").append(getImage()).append(","); if (getImagePullPolicy() != null) sb.append("ImagePullPolicy: ").append(getImagePullPolicy()).append(","); if (getCommand() != null) sb.append("Command: ").append(getCommand()).append(","); if (getArgs() != null) sb.append("Args: ").append(getArgs()).append(","); if (getEnv() != null) sb.append("Env: ").append(getEnv()).append(","); if (getResources() != null) sb.append("Resources: ").append(getResources()).append(","); if (getVolumeMounts() != null) sb.append("VolumeMounts: ").append(getVolumeMounts()).append(","); if (getSecurityContext() != null) sb.append("SecurityContext: ").append(getSecurityContext()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EksContainer == false) return false; EksContainer other = (EksContainer) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getImagePullPolicy() == null ^ this.getImagePullPolicy() == null) return false; if (other.getImagePullPolicy() != null && other.getImagePullPolicy().equals(this.getImagePullPolicy()) == 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.getArgs() == null ^ this.getArgs() == null) return false; if (other.getArgs() != null && other.getArgs().equals(this.getArgs()) == false) return false; if (other.getEnv() == null ^ this.getEnv() == null) return false; if (other.getEnv() != null && other.getEnv().equals(this.getEnv()) == false) return false; if (other.getResources() == null ^ this.getResources() == null) return false; if (other.getResources() != null && other.getResources().equals(this.getResources()) == false) return false; if (other.getVolumeMounts() == null ^ this.getVolumeMounts() == null) return false; if (other.getVolumeMounts() != null && other.getVolumeMounts().equals(this.getVolumeMounts()) == false) return false; if (other.getSecurityContext() == null ^ this.getSecurityContext() == null) return false; if (other.getSecurityContext() != null && other.getSecurityContext().equals(this.getSecurityContext()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getImagePullPolicy() == null) ? 0 : getImagePullPolicy().hashCode()); hashCode = prime * hashCode + ((getCommand() == null) ? 0 : getCommand().hashCode()); hashCode = prime * hashCode + ((getArgs() == null) ? 0 : getArgs().hashCode()); hashCode = prime * hashCode + ((getEnv() == null) ? 0 : getEnv().hashCode()); hashCode = prime * hashCode + ((getResources() == null) ? 0 : getResources().hashCode()); hashCode = prime * hashCode + ((getVolumeMounts() == null) ? 0 : getVolumeMounts().hashCode()); hashCode = prime * hashCode + ((getSecurityContext() == null) ? 0 : getSecurityContext().hashCode()); return hashCode; } @Override public EksContainer clone() { try { return (EksContainer) 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.EksContainerMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy