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

com.amazonaws.services.batch.model.EksPodPropertiesOverride 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 contains overrides for the Kubernetes pod properties of a job. *

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

* The overrides for the container that's used on the Amazon EKS pod. *

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

* The overrides for the conatainers defined in the Amazon EKS pod. These containers run before application * containers, always runs to completion, and must complete successfully before the next container starts. These * containers are registered with the Amazon EKS Connector agent and persists the registration information in the * Kubernetes backend data store. For more information, see Init Containers in the * Kubernetes documentation. *

* *

* This object is limited to 10 elements *

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

* Metadata about the overrides for the container that's used on the Amazon EKS pod. *

*/ private EksMetadata metadata; /** *

* The overrides for the container that's used on the Amazon EKS pod. *

* * @return The overrides for the container that's used on the Amazon EKS pod. */ public java.util.List getContainers() { return containers; } /** *

* The overrides for the container that's used on the Amazon EKS pod. *

* * @param containers * The overrides for the container that's used on the Amazon EKS pod. */ public void setContainers(java.util.Collection containers) { if (containers == null) { this.containers = null; return; } this.containers = new java.util.ArrayList(containers); } /** *

* The overrides for the container that's used on the Amazon EKS pod. *

*

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

* * @param containers * The overrides for the container that's used on the Amazon EKS pod. * @return Returns a reference to this object so that method calls can be chained together. */ public EksPodPropertiesOverride withContainers(EksContainerOverride... containers) { if (this.containers == null) { setContainers(new java.util.ArrayList(containers.length)); } for (EksContainerOverride ele : containers) { this.containers.add(ele); } return this; } /** *

* The overrides for the container that's used on the Amazon EKS pod. *

* * @param containers * The overrides for the container that's used on the Amazon EKS pod. * @return Returns a reference to this object so that method calls can be chained together. */ public EksPodPropertiesOverride withContainers(java.util.Collection containers) { setContainers(containers); return this; } /** *

* The overrides for the conatainers defined in the Amazon EKS pod. These containers run before application * containers, always runs to completion, and must complete successfully before the next container starts. These * containers are registered with the Amazon EKS Connector agent and persists the registration information in the * Kubernetes backend data store. For more information, see Init Containers in the * Kubernetes documentation. *

* *

* This object is limited to 10 elements *

*
* * @return The overrides for the conatainers defined in the Amazon EKS pod. These containers run before application * containers, always runs to completion, and must complete successfully before the next container starts. * These containers are registered with the Amazon EKS Connector agent and persists the registration * information in the Kubernetes backend data store. For more information, see Init Containers in the * Kubernetes documentation.

*

* This object is limited to 10 elements *

*/ public java.util.List getInitContainers() { return initContainers; } /** *

* The overrides for the conatainers defined in the Amazon EKS pod. These containers run before application * containers, always runs to completion, and must complete successfully before the next container starts. These * containers are registered with the Amazon EKS Connector agent and persists the registration information in the * Kubernetes backend data store. For more information, see Init Containers in the * Kubernetes documentation. *

* *

* This object is limited to 10 elements *

*
* * @param initContainers * The overrides for the conatainers defined in the Amazon EKS pod. These containers run before application * containers, always runs to completion, and must complete successfully before the next container starts. * These containers are registered with the Amazon EKS Connector agent and persists the registration * information in the Kubernetes backend data store. For more information, see Init Containers in the * Kubernetes documentation.

*

* This object is limited to 10 elements *

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

* The overrides for the conatainers defined in the Amazon EKS pod. These containers run before application * containers, always runs to completion, and must complete successfully before the next container starts. These * containers are registered with the Amazon EKS Connector agent and persists the registration information in the * Kubernetes backend data store. For more information, see Init Containers in the * Kubernetes documentation. *

* *

* This object is limited to 10 elements *

*
*

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

* * @param initContainers * The overrides for the conatainers defined in the Amazon EKS pod. These containers run before application * containers, always runs to completion, and must complete successfully before the next container starts. * These containers are registered with the Amazon EKS Connector agent and persists the registration * information in the Kubernetes backend data store. For more information, see Init Containers in the * Kubernetes documentation.

*

* This object is limited to 10 elements *

* @return Returns a reference to this object so that method calls can be chained together. */ public EksPodPropertiesOverride withInitContainers(EksContainerOverride... initContainers) { if (this.initContainers == null) { setInitContainers(new java.util.ArrayList(initContainers.length)); } for (EksContainerOverride ele : initContainers) { this.initContainers.add(ele); } return this; } /** *

* The overrides for the conatainers defined in the Amazon EKS pod. These containers run before application * containers, always runs to completion, and must complete successfully before the next container starts. These * containers are registered with the Amazon EKS Connector agent and persists the registration information in the * Kubernetes backend data store. For more information, see Init Containers in the * Kubernetes documentation. *

* *

* This object is limited to 10 elements *

*
* * @param initContainers * The overrides for the conatainers defined in the Amazon EKS pod. These containers run before application * containers, always runs to completion, and must complete successfully before the next container starts. * These containers are registered with the Amazon EKS Connector agent and persists the registration * information in the Kubernetes backend data store. For more information, see Init Containers in the * Kubernetes documentation.

*

* This object is limited to 10 elements *

* @return Returns a reference to this object so that method calls can be chained together. */ public EksPodPropertiesOverride withInitContainers(java.util.Collection initContainers) { setInitContainers(initContainers); return this; } /** *

* Metadata about the overrides for the container that's used on the Amazon EKS pod. *

* * @param metadata * Metadata about the overrides for the container that's used on the Amazon EKS pod. */ public void setMetadata(EksMetadata metadata) { this.metadata = metadata; } /** *

* Metadata about the overrides for the container that's used on the Amazon EKS pod. *

* * @return Metadata about the overrides for the container that's used on the Amazon EKS pod. */ public EksMetadata getMetadata() { return this.metadata; } /** *

* Metadata about the overrides for the container that's used on the Amazon EKS pod. *

* * @param metadata * Metadata about the overrides for the container that's used on the Amazon EKS pod. * @return Returns a reference to this object so that method calls can be chained together. */ public EksPodPropertiesOverride withMetadata(EksMetadata metadata) { setMetadata(metadata); 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 (getContainers() != null) sb.append("Containers: ").append(getContainers()).append(","); if (getInitContainers() != null) sb.append("InitContainers: ").append(getInitContainers()).append(","); if (getMetadata() != null) sb.append("Metadata: ").append(getMetadata()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EksPodPropertiesOverride == false) return false; EksPodPropertiesOverride other = (EksPodPropertiesOverride) obj; if (other.getContainers() == null ^ this.getContainers() == null) return false; if (other.getContainers() != null && other.getContainers().equals(this.getContainers()) == false) return false; if (other.getInitContainers() == null ^ this.getInitContainers() == null) return false; if (other.getInitContainers() != null && other.getInitContainers().equals(this.getInitContainers()) == false) return false; if (other.getMetadata() == null ^ this.getMetadata() == null) return false; if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContainers() == null) ? 0 : getContainers().hashCode()); hashCode = prime * hashCode + ((getInitContainers() == null) ? 0 : getInitContainers().hashCode()); hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode()); return hashCode; } @Override public EksPodPropertiesOverride clone() { try { return (EksPodPropertiesOverride) 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.EksPodPropertiesOverrideMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy