/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ECS { namespace Model { /** *

Describes the resources available for a container instance.

See * Also:

AWS API * Reference

*/ class Resource { public: AWS_ECS_API Resource(); AWS_ECS_API Resource(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API Resource& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the resource, such as CPU, MEMORY, * PORTS, PORTS_UDP, or a user-defined resource.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the resource, such as CPU, MEMORY, * PORTS, PORTS_UDP, or a user-defined resource.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the resource, such as CPU, MEMORY, * PORTS, PORTS_UDP, or a user-defined resource.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the resource, such as CPU, MEMORY, * PORTS, PORTS_UDP, or a user-defined resource.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the resource, such as CPU, MEMORY, * PORTS, PORTS_UDP, or a user-defined resource.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the resource, such as CPU, MEMORY, * PORTS, PORTS_UDP, or a user-defined resource.

*/ inline Resource& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the resource, such as CPU, MEMORY, * PORTS, PORTS_UDP, or a user-defined resource.

*/ inline Resource& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the resource, such as CPU, MEMORY, * PORTS, PORTS_UDP, or a user-defined resource.

*/ inline Resource& WithName(const char* value) { SetName(value); return *this;} /** *

The type of the resource. Valid values: INTEGER, * DOUBLE, LONG, or STRINGSET.

*/ inline const Aws::String& GetType() const{ return m_type; } /** *

The type of the resource. Valid values: INTEGER, * DOUBLE, LONG, or STRINGSET.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of the resource. Valid values: INTEGER, * DOUBLE, LONG, or STRINGSET.

*/ inline void SetType(const Aws::String& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of the resource. Valid values: INTEGER, * DOUBLE, LONG, or STRINGSET.

*/ inline void SetType(Aws::String&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of the resource. Valid values: INTEGER, * DOUBLE, LONG, or STRINGSET.

*/ inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); } /** *

The type of the resource. Valid values: INTEGER, * DOUBLE, LONG, or STRINGSET.

*/ inline Resource& WithType(const Aws::String& value) { SetType(value); return *this;} /** *

The type of the resource. Valid values: INTEGER, * DOUBLE, LONG, or STRINGSET.

*/ inline Resource& WithType(Aws::String&& value) { SetType(std::move(value)); return *this;} /** *

The type of the resource. Valid values: INTEGER, * DOUBLE, LONG, or STRINGSET.

*/ inline Resource& WithType(const char* value) { SetType(value); return *this;} /** *

When the doubleValue type is set, the value of the resource must * be a double precision floating-point type.

*/ inline double GetDoubleValue() const{ return m_doubleValue; } /** *

When the doubleValue type is set, the value of the resource must * be a double precision floating-point type.

*/ inline bool DoubleValueHasBeenSet() const { return m_doubleValueHasBeenSet; } /** *

When the doubleValue type is set, the value of the resource must * be a double precision floating-point type.

*/ inline void SetDoubleValue(double value) { m_doubleValueHasBeenSet = true; m_doubleValue = value; } /** *

When the doubleValue type is set, the value of the resource must * be a double precision floating-point type.

*/ inline Resource& WithDoubleValue(double value) { SetDoubleValue(value); return *this;} /** *

When the longValue type is set, the value of the resource must * be an extended precision floating-point type.

*/ inline long long GetLongValue() const{ return m_longValue; } /** *

When the longValue type is set, the value of the resource must * be an extended precision floating-point type.

*/ inline bool LongValueHasBeenSet() const { return m_longValueHasBeenSet; } /** *

When the longValue type is set, the value of the resource must * be an extended precision floating-point type.

*/ inline void SetLongValue(long long value) { m_longValueHasBeenSet = true; m_longValue = value; } /** *

When the longValue type is set, the value of the resource must * be an extended precision floating-point type.

*/ inline Resource& WithLongValue(long long value) { SetLongValue(value); return *this;} /** *

When the integerValue type is set, the value of the resource * must be an integer.

*/ inline int GetIntegerValue() const{ return m_integerValue; } /** *

When the integerValue type is set, the value of the resource * must be an integer.

*/ inline bool IntegerValueHasBeenSet() const { return m_integerValueHasBeenSet; } /** *

When the integerValue type is set, the value of the resource * must be an integer.

*/ inline void SetIntegerValue(int value) { m_integerValueHasBeenSet = true; m_integerValue = value; } /** *

When the integerValue type is set, the value of the resource * must be an integer.

*/ inline Resource& WithIntegerValue(int value) { SetIntegerValue(value); return *this;} /** *

When the stringSetValue type is set, the value of the resource * must be a string type.

*/ inline const Aws::Vector& GetStringSetValue() const{ return m_stringSetValue; } /** *

When the stringSetValue type is set, the value of the resource * must be a string type.

*/ inline bool StringSetValueHasBeenSet() const { return m_stringSetValueHasBeenSet; } /** *

When the stringSetValue type is set, the value of the resource * must be a string type.

*/ inline void SetStringSetValue(const Aws::Vector& value) { m_stringSetValueHasBeenSet = true; m_stringSetValue = value; } /** *

When the stringSetValue type is set, the value of the resource * must be a string type.

*/ inline void SetStringSetValue(Aws::Vector&& value) { m_stringSetValueHasBeenSet = true; m_stringSetValue = std::move(value); } /** *

When the stringSetValue type is set, the value of the resource * must be a string type.

*/ inline Resource& WithStringSetValue(const Aws::Vector& value) { SetStringSetValue(value); return *this;} /** *

When the stringSetValue type is set, the value of the resource * must be a string type.

*/ inline Resource& WithStringSetValue(Aws::Vector&& value) { SetStringSetValue(std::move(value)); return *this;} /** *

When the stringSetValue type is set, the value of the resource * must be a string type.

*/ inline Resource& AddStringSetValue(const Aws::String& value) { m_stringSetValueHasBeenSet = true; m_stringSetValue.push_back(value); return *this; } /** *

When the stringSetValue type is set, the value of the resource * must be a string type.

*/ inline Resource& AddStringSetValue(Aws::String&& value) { m_stringSetValueHasBeenSet = true; m_stringSetValue.push_back(std::move(value)); return *this; } /** *

When the stringSetValue type is set, the value of the resource * must be a string type.

*/ inline Resource& AddStringSetValue(const char* value) { m_stringSetValueHasBeenSet = true; m_stringSetValue.push_back(value); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_type; bool m_typeHasBeenSet = false; double m_doubleValue; bool m_doubleValueHasBeenSet = false; long long m_longValue; bool m_longValueHasBeenSet = false; int m_integerValue; bool m_integerValueHasBeenSet = false; Aws::Vector m_stringSetValue; bool m_stringSetValueHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws