/* * Copyright 2018-2023 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.ecs.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes the resources available for a container instance. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Resource implements Serializable, Cloneable, StructuredPojo { /** *
* The name of the resource, such as CPU
, MEMORY
, PORTS
,
* PORTS_UDP
, or a user-defined resource.
*
* The type of the resource. Valid values: INTEGER
, DOUBLE
, LONG
, or
* STRINGSET
.
*
* When the doubleValue
type is set, the value of the resource must be a double precision
* floating-point type.
*
* When the longValue
type is set, the value of the resource must be an extended precision
* floating-point type.
*
* When the integerValue
type is set, the value of the resource must be an integer.
*
* When the stringSetValue
type is set, the value of the resource must be a string type.
*
* The name of the resource, such as CPU
, MEMORY
, PORTS
,
* PORTS_UDP
, or a user-defined resource.
*
CPU
, MEMORY
, PORTS
,
* PORTS_UDP
, or a user-defined resource.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the resource, such as CPU
, MEMORY
, PORTS
,
* PORTS_UDP
, or a user-defined resource.
*
CPU
, MEMORY
, PORTS
,
* PORTS_UDP
, or a user-defined resource.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the resource, such as CPU
, MEMORY
, PORTS
,
* PORTS_UDP
, or a user-defined resource.
*
CPU
, MEMORY
, PORTS
,
* PORTS_UDP
, or a user-defined resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Resource withName(String name) {
setName(name);
return this;
}
/**
*
* The type of the resource. Valid values: INTEGER
, DOUBLE
, LONG
, or
* STRINGSET
.
*
INTEGER
, DOUBLE
, LONG
, or
* STRINGSET
.
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of the resource. Valid values: INTEGER
, DOUBLE
, LONG
, or
* STRINGSET
.
*
INTEGER
, DOUBLE
, LONG
, or
* STRINGSET
.
*/
public String getType() {
return this.type;
}
/**
*
* The type of the resource. Valid values: INTEGER
, DOUBLE
, LONG
, or
* STRINGSET
.
*
INTEGER
, DOUBLE
, LONG
, or
* STRINGSET
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Resource withType(String type) {
setType(type);
return this;
}
/**
*
* When the doubleValue
type is set, the value of the resource must be a double precision
* floating-point type.
*
doubleValue
type is set, the value of the resource must be a double precision
* floating-point type.
*/
public void setDoubleValue(Double doubleValue) {
this.doubleValue = doubleValue;
}
/**
*
* When the doubleValue
type is set, the value of the resource must be a double precision
* floating-point type.
*
doubleValue
type is set, the value of the resource must be a double precision
* floating-point type.
*/
public Double getDoubleValue() {
return this.doubleValue;
}
/**
*
* When the doubleValue
type is set, the value of the resource must be a double precision
* floating-point type.
*
doubleValue
type is set, the value of the resource must be a double precision
* floating-point type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Resource withDoubleValue(Double doubleValue) {
setDoubleValue(doubleValue);
return this;
}
/**
*
* When the longValue
type is set, the value of the resource must be an extended precision
* floating-point type.
*
longValue
type is set, the value of the resource must be an extended precision
* floating-point type.
*/
public void setLongValue(Long longValue) {
this.longValue = longValue;
}
/**
*
* When the longValue
type is set, the value of the resource must be an extended precision
* floating-point type.
*
longValue
type is set, the value of the resource must be an extended precision
* floating-point type.
*/
public Long getLongValue() {
return this.longValue;
}
/**
*
* When the longValue
type is set, the value of the resource must be an extended precision
* floating-point type.
*
longValue
type is set, the value of the resource must be an extended precision
* floating-point type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Resource withLongValue(Long longValue) {
setLongValue(longValue);
return this;
}
/**
*
* When the integerValue
type is set, the value of the resource must be an integer.
*
integerValue
type is set, the value of the resource must be an integer.
*/
public void setIntegerValue(Integer integerValue) {
this.integerValue = integerValue;
}
/**
*
* When the integerValue
type is set, the value of the resource must be an integer.
*
integerValue
type is set, the value of the resource must be an integer.
*/
public Integer getIntegerValue() {
return this.integerValue;
}
/**
*
* When the integerValue
type is set, the value of the resource must be an integer.
*
integerValue
type is set, the value of the resource must be an integer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Resource withIntegerValue(Integer integerValue) {
setIntegerValue(integerValue);
return this;
}
/**
*
* When the stringSetValue
type is set, the value of the resource must be a string type.
*
stringSetValue
type is set, the value of the resource must be a string type.
*/
public java.util.List
* When the stringSetValue
type is set, the value of the resource must be a string type.
*
stringSetValue
type is set, the value of the resource must be a string type.
*/
public void setStringSetValue(java.util.Collection
* When the stringSetValue
type is set, the value of the resource must be a string type.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setStringSetValue(java.util.Collection)} or {@link #withStringSetValue(java.util.Collection)} if you want * to override the existing values. *
* * @param stringSetValue * When thestringSetValue
type is set, the value of the resource must be a string type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Resource withStringSetValue(String... stringSetValue) {
if (this.stringSetValue == null) {
setStringSetValue(new com.amazonaws.internal.SdkInternalList
* When the stringSetValue
type is set, the value of the resource must be a string type.
*
stringSetValue
type is set, the value of the resource must be a string type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Resource withStringSetValue(java.util.Collection