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

com.amazonaws.services.gamelift.model.CreateContainerGroupDefinitionRequest Maven / Gradle / Ivy

/*
 * 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.gamelift.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

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

    /**
     * 

* A descriptive identifier for the container group definition. The name value must be unique in an Amazon Web * Services Region. *

*/ private String name; /** *

* The method for deploying the container group across fleet instances. A replica container group might have * multiple copies on each fleet instance. A daemon container group has one copy per fleet instance. Default value * is REPLICA. *

*/ private String schedulingStrategy; /** *

* The maximum amount of memory (in MiB) to allocate to the container group. All containers in the group share this * memory. If you specify memory limits for individual containers, set this parameter based on the following * guidelines. The value must be (1) greater than the sum of the soft memory limits for all containers in the group, * and (2) greater than any individual container's hard memory limit. *

*/ private Integer totalMemoryLimit; /** *

* The maximum amount of CPU units to allocate to the container group. Set this parameter to an integer value in CPU * units (1 vCPU is equal to 1024 CPU units). All containers in the group share this memory. If you specify CPU * limits for individual containers, set this parameter based on the following guidelines. The value must be equal * to or greater than the sum of the CPU limits for all containers in the group. *

*/ private Integer totalCpuLimit; /** *

* Definitions for all containers in this group. Each container definition identifies the container image and * specifies configuration settings for the container. See the Container fleet * design guide for container guidelines. *

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

* The platform that is used by containers in the container group definition. All containers in a group must run on * the same operating system. *

*/ private String operatingSystem; /** *

* A list of labels to assign to the container group definition resource. Tags are developer-defined key-value * pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost * allocation. For more information, see * Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. *

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

* A descriptive identifier for the container group definition. The name value must be unique in an Amazon Web * Services Region. *

* * @param name * A descriptive identifier for the container group definition. The name value must be unique in an Amazon * Web Services Region. */ public void setName(String name) { this.name = name; } /** *

* A descriptive identifier for the container group definition. The name value must be unique in an Amazon Web * Services Region. *

* * @return A descriptive identifier for the container group definition. The name value must be unique in an Amazon * Web Services Region. */ public String getName() { return this.name; } /** *

* A descriptive identifier for the container group definition. The name value must be unique in an Amazon Web * Services Region. *

* * @param name * A descriptive identifier for the container group definition. The name value must be unique in an Amazon * Web Services Region. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateContainerGroupDefinitionRequest withName(String name) { setName(name); return this; } /** *

* The method for deploying the container group across fleet instances. A replica container group might have * multiple copies on each fleet instance. A daemon container group has one copy per fleet instance. Default value * is REPLICA. *

* * @param schedulingStrategy * The method for deploying the container group across fleet instances. A replica container group might have * multiple copies on each fleet instance. A daemon container group has one copy per fleet instance. Default * value is REPLICA. * @see ContainerSchedulingStrategy */ public void setSchedulingStrategy(String schedulingStrategy) { this.schedulingStrategy = schedulingStrategy; } /** *

* The method for deploying the container group across fleet instances. A replica container group might have * multiple copies on each fleet instance. A daemon container group has one copy per fleet instance. Default value * is REPLICA. *

* * @return The method for deploying the container group across fleet instances. A replica container group might have * multiple copies on each fleet instance. A daemon container group has one copy per fleet instance. Default * value is REPLICA. * @see ContainerSchedulingStrategy */ public String getSchedulingStrategy() { return this.schedulingStrategy; } /** *

* The method for deploying the container group across fleet instances. A replica container group might have * multiple copies on each fleet instance. A daemon container group has one copy per fleet instance. Default value * is REPLICA. *

* * @param schedulingStrategy * The method for deploying the container group across fleet instances. A replica container group might have * multiple copies on each fleet instance. A daemon container group has one copy per fleet instance. Default * value is REPLICA. * @return Returns a reference to this object so that method calls can be chained together. * @see ContainerSchedulingStrategy */ public CreateContainerGroupDefinitionRequest withSchedulingStrategy(String schedulingStrategy) { setSchedulingStrategy(schedulingStrategy); return this; } /** *

* The method for deploying the container group across fleet instances. A replica container group might have * multiple copies on each fleet instance. A daemon container group has one copy per fleet instance. Default value * is REPLICA. *

* * @param schedulingStrategy * The method for deploying the container group across fleet instances. A replica container group might have * multiple copies on each fleet instance. A daemon container group has one copy per fleet instance. Default * value is REPLICA. * @return Returns a reference to this object so that method calls can be chained together. * @see ContainerSchedulingStrategy */ public CreateContainerGroupDefinitionRequest withSchedulingStrategy(ContainerSchedulingStrategy schedulingStrategy) { this.schedulingStrategy = schedulingStrategy.toString(); return this; } /** *

* The maximum amount of memory (in MiB) to allocate to the container group. All containers in the group share this * memory. If you specify memory limits for individual containers, set this parameter based on the following * guidelines. The value must be (1) greater than the sum of the soft memory limits for all containers in the group, * and (2) greater than any individual container's hard memory limit. *

* * @param totalMemoryLimit * The maximum amount of memory (in MiB) to allocate to the container group. All containers in the group * share this memory. If you specify memory limits for individual containers, set this parameter based on the * following guidelines. The value must be (1) greater than the sum of the soft memory limits for all * containers in the group, and (2) greater than any individual container's hard memory limit. */ public void setTotalMemoryLimit(Integer totalMemoryLimit) { this.totalMemoryLimit = totalMemoryLimit; } /** *

* The maximum amount of memory (in MiB) to allocate to the container group. All containers in the group share this * memory. If you specify memory limits for individual containers, set this parameter based on the following * guidelines. The value must be (1) greater than the sum of the soft memory limits for all containers in the group, * and (2) greater than any individual container's hard memory limit. *

* * @return The maximum amount of memory (in MiB) to allocate to the container group. All containers in the group * share this memory. If you specify memory limits for individual containers, set this parameter based on * the following guidelines. The value must be (1) greater than the sum of the soft memory limits for all * containers in the group, and (2) greater than any individual container's hard memory limit. */ public Integer getTotalMemoryLimit() { return this.totalMemoryLimit; } /** *

* The maximum amount of memory (in MiB) to allocate to the container group. All containers in the group share this * memory. If you specify memory limits for individual containers, set this parameter based on the following * guidelines. The value must be (1) greater than the sum of the soft memory limits for all containers in the group, * and (2) greater than any individual container's hard memory limit. *

* * @param totalMemoryLimit * The maximum amount of memory (in MiB) to allocate to the container group. All containers in the group * share this memory. If you specify memory limits for individual containers, set this parameter based on the * following guidelines. The value must be (1) greater than the sum of the soft memory limits for all * containers in the group, and (2) greater than any individual container's hard memory limit. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateContainerGroupDefinitionRequest withTotalMemoryLimit(Integer totalMemoryLimit) { setTotalMemoryLimit(totalMemoryLimit); return this; } /** *

* The maximum amount of CPU units to allocate to the container group. Set this parameter to an integer value in CPU * units (1 vCPU is equal to 1024 CPU units). All containers in the group share this memory. If you specify CPU * limits for individual containers, set this parameter based on the following guidelines. The value must be equal * to or greater than the sum of the CPU limits for all containers in the group. *

* * @param totalCpuLimit * The maximum amount of CPU units to allocate to the container group. Set this parameter to an integer value * in CPU units (1 vCPU is equal to 1024 CPU units). All containers in the group share this memory. If you * specify CPU limits for individual containers, set this parameter based on the following guidelines. The * value must be equal to or greater than the sum of the CPU limits for all containers in the group. */ public void setTotalCpuLimit(Integer totalCpuLimit) { this.totalCpuLimit = totalCpuLimit; } /** *

* The maximum amount of CPU units to allocate to the container group. Set this parameter to an integer value in CPU * units (1 vCPU is equal to 1024 CPU units). All containers in the group share this memory. If you specify CPU * limits for individual containers, set this parameter based on the following guidelines. The value must be equal * to or greater than the sum of the CPU limits for all containers in the group. *

* * @return The maximum amount of CPU units to allocate to the container group. Set this parameter to an integer * value in CPU units (1 vCPU is equal to 1024 CPU units). All containers in the group share this memory. If * you specify CPU limits for individual containers, set this parameter based on the following guidelines. * The value must be equal to or greater than the sum of the CPU limits for all containers in the group. */ public Integer getTotalCpuLimit() { return this.totalCpuLimit; } /** *

* The maximum amount of CPU units to allocate to the container group. Set this parameter to an integer value in CPU * units (1 vCPU is equal to 1024 CPU units). All containers in the group share this memory. If you specify CPU * limits for individual containers, set this parameter based on the following guidelines. The value must be equal * to or greater than the sum of the CPU limits for all containers in the group. *

* * @param totalCpuLimit * The maximum amount of CPU units to allocate to the container group. Set this parameter to an integer value * in CPU units (1 vCPU is equal to 1024 CPU units). All containers in the group share this memory. If you * specify CPU limits for individual containers, set this parameter based on the following guidelines. The * value must be equal to or greater than the sum of the CPU limits for all containers in the group. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateContainerGroupDefinitionRequest withTotalCpuLimit(Integer totalCpuLimit) { setTotalCpuLimit(totalCpuLimit); return this; } /** *

* Definitions for all containers in this group. Each container definition identifies the container image and * specifies configuration settings for the container. See the Container fleet * design guide for container guidelines. *

* * @return Definitions for all containers in this group. Each container definition identifies the container image * and specifies configuration settings for the container. See the Container * fleet design guide for container guidelines. */ public java.util.List getContainerDefinitions() { return containerDefinitions; } /** *

* Definitions for all containers in this group. Each container definition identifies the container image and * specifies configuration settings for the container. See the Container fleet * design guide for container guidelines. *

* * @param containerDefinitions * Definitions for all containers in this group. Each container definition identifies the container image and * specifies configuration settings for the container. See the Container * fleet design guide for container guidelines. */ public void setContainerDefinitions(java.util.Collection containerDefinitions) { if (containerDefinitions == null) { this.containerDefinitions = null; return; } this.containerDefinitions = new java.util.ArrayList(containerDefinitions); } /** *

* Definitions for all containers in this group. Each container definition identifies the container image and * specifies configuration settings for the container. See the Container fleet * design guide for container guidelines. *

*

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

* * @param containerDefinitions * Definitions for all containers in this group. Each container definition identifies the container image and * specifies configuration settings for the container. See the Container * fleet design guide for container guidelines. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateContainerGroupDefinitionRequest withContainerDefinitions(ContainerDefinitionInput... containerDefinitions) { if (this.containerDefinitions == null) { setContainerDefinitions(new java.util.ArrayList(containerDefinitions.length)); } for (ContainerDefinitionInput ele : containerDefinitions) { this.containerDefinitions.add(ele); } return this; } /** *

* Definitions for all containers in this group. Each container definition identifies the container image and * specifies configuration settings for the container. See the Container fleet * design guide for container guidelines. *

* * @param containerDefinitions * Definitions for all containers in this group. Each container definition identifies the container image and * specifies configuration settings for the container. See the Container * fleet design guide for container guidelines. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateContainerGroupDefinitionRequest withContainerDefinitions(java.util.Collection containerDefinitions) { setContainerDefinitions(containerDefinitions); return this; } /** *

* The platform that is used by containers in the container group definition. All containers in a group must run on * the same operating system. *

* * @param operatingSystem * The platform that is used by containers in the container group definition. All containers in a group must * run on the same operating system. * @see ContainerOperatingSystem */ public void setOperatingSystem(String operatingSystem) { this.operatingSystem = operatingSystem; } /** *

* The platform that is used by containers in the container group definition. All containers in a group must run on * the same operating system. *

* * @return The platform that is used by containers in the container group definition. All containers in a group must * run on the same operating system. * @see ContainerOperatingSystem */ public String getOperatingSystem() { return this.operatingSystem; } /** *

* The platform that is used by containers in the container group definition. All containers in a group must run on * the same operating system. *

* * @param operatingSystem * The platform that is used by containers in the container group definition. All containers in a group must * run on the same operating system. * @return Returns a reference to this object so that method calls can be chained together. * @see ContainerOperatingSystem */ public CreateContainerGroupDefinitionRequest withOperatingSystem(String operatingSystem) { setOperatingSystem(operatingSystem); return this; } /** *

* The platform that is used by containers in the container group definition. All containers in a group must run on * the same operating system. *

* * @param operatingSystem * The platform that is used by containers in the container group definition. All containers in a group must * run on the same operating system. * @return Returns a reference to this object so that method calls can be chained together. * @see ContainerOperatingSystem */ public CreateContainerGroupDefinitionRequest withOperatingSystem(ContainerOperatingSystem operatingSystem) { this.operatingSystem = operatingSystem.toString(); return this; } /** *

* A list of labels to assign to the container group definition resource. Tags are developer-defined key-value * pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost * allocation. For more information, see * Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. *

* * @return A list of labels to assign to the container group definition resource. Tags are developer-defined * key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access * management and cost allocation. For more information, see Tagging Amazon Web Services * Resources in the Amazon Web Services General Reference. */ public java.util.List getTags() { return tags; } /** *

* A list of labels to assign to the container group definition resource. Tags are developer-defined key-value * pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost * allocation. For more information, see * Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. *

* * @param tags * A list of labels to assign to the container group definition resource. Tags are developer-defined * key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access * management and cost allocation. For more information, see Tagging Amazon Web Services * Resources in the Amazon Web Services General Reference. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* A list of labels to assign to the container group definition resource. Tags are developer-defined key-value * pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost * allocation. For more information, see * Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. *

*

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

* * @param tags * A list of labels to assign to the container group definition resource. Tags are developer-defined * key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access * management and cost allocation. For more information, see Tagging Amazon Web Services * Resources in the Amazon Web Services General Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateContainerGroupDefinitionRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* A list of labels to assign to the container group definition resource. Tags are developer-defined key-value * pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost * allocation. For more information, see * Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. *

* * @param tags * A list of labels to assign to the container group definition resource. Tags are developer-defined * key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access * management and cost allocation. For more information, see Tagging Amazon Web Services * Resources in the Amazon Web Services General Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateContainerGroupDefinitionRequest withTags(java.util.Collection tags) { setTags(tags); 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 (getSchedulingStrategy() != null) sb.append("SchedulingStrategy: ").append(getSchedulingStrategy()).append(","); if (getTotalMemoryLimit() != null) sb.append("TotalMemoryLimit: ").append(getTotalMemoryLimit()).append(","); if (getTotalCpuLimit() != null) sb.append("TotalCpuLimit: ").append(getTotalCpuLimit()).append(","); if (getContainerDefinitions() != null) sb.append("ContainerDefinitions: ").append(getContainerDefinitions()).append(","); if (getOperatingSystem() != null) sb.append("OperatingSystem: ").append(getOperatingSystem()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateContainerGroupDefinitionRequest == false) return false; CreateContainerGroupDefinitionRequest other = (CreateContainerGroupDefinitionRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getSchedulingStrategy() == null ^ this.getSchedulingStrategy() == null) return false; if (other.getSchedulingStrategy() != null && other.getSchedulingStrategy().equals(this.getSchedulingStrategy()) == false) return false; if (other.getTotalMemoryLimit() == null ^ this.getTotalMemoryLimit() == null) return false; if (other.getTotalMemoryLimit() != null && other.getTotalMemoryLimit().equals(this.getTotalMemoryLimit()) == false) return false; if (other.getTotalCpuLimit() == null ^ this.getTotalCpuLimit() == null) return false; if (other.getTotalCpuLimit() != null && other.getTotalCpuLimit().equals(this.getTotalCpuLimit()) == false) return false; if (other.getContainerDefinitions() == null ^ this.getContainerDefinitions() == null) return false; if (other.getContainerDefinitions() != null && other.getContainerDefinitions().equals(this.getContainerDefinitions()) == false) return false; if (other.getOperatingSystem() == null ^ this.getOperatingSystem() == null) return false; if (other.getOperatingSystem() != null && other.getOperatingSystem().equals(this.getOperatingSystem()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 + ((getSchedulingStrategy() == null) ? 0 : getSchedulingStrategy().hashCode()); hashCode = prime * hashCode + ((getTotalMemoryLimit() == null) ? 0 : getTotalMemoryLimit().hashCode()); hashCode = prime * hashCode + ((getTotalCpuLimit() == null) ? 0 : getTotalCpuLimit().hashCode()); hashCode = prime * hashCode + ((getContainerDefinitions() == null) ? 0 : getContainerDefinitions().hashCode()); hashCode = prime * hashCode + ((getOperatingSystem() == null) ? 0 : getOperatingSystem().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateContainerGroupDefinitionRequest clone() { return (CreateContainerGroupDefinitionRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy