/** * 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 Batch { namespace Model { /** *

The type and amount of a resource to assign to a container. Currently, the * only supported resource type is GPU.

See Also:

AWS * API Reference

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

The number of physical GPUs to reserve for the container. The number of GPUs * reserved for all containers in a job should not exceed the number of available * GPUs on the compute resource that the job is launched on.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

The number of physical GPUs to reserve for the container. The number of GPUs * reserved for all containers in a job should not exceed the number of available * GPUs on the compute resource that the job is launched on.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

The number of physical GPUs to reserve for the container. The number of GPUs * reserved for all containers in a job should not exceed the number of available * GPUs on the compute resource that the job is launched on.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

The number of physical GPUs to reserve for the container. The number of GPUs * reserved for all containers in a job should not exceed the number of available * GPUs on the compute resource that the job is launched on.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

The number of physical GPUs to reserve for the container. The number of GPUs * reserved for all containers in a job should not exceed the number of available * GPUs on the compute resource that the job is launched on.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

The number of physical GPUs to reserve for the container. The number of GPUs * reserved for all containers in a job should not exceed the number of available * GPUs on the compute resource that the job is launched on.

*/ inline ResourceRequirement& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

The number of physical GPUs to reserve for the container. The number of GPUs * reserved for all containers in a job should not exceed the number of available * GPUs on the compute resource that the job is launched on.

*/ inline ResourceRequirement& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

The number of physical GPUs to reserve for the container. The number of GPUs * reserved for all containers in a job should not exceed the number of available * GPUs on the compute resource that the job is launched on.

*/ inline ResourceRequirement& WithValue(const char* value) { SetValue(value); return *this;} /** *

The type of resource to assign to a container. Currently, the only supported * resource type is GPU.

*/ inline const ResourceType& GetType() const{ return m_type; } /** *

The type of resource to assign to a container. Currently, the only supported * resource type is GPU.

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

The type of resource to assign to a container. Currently, the only supported * resource type is GPU.

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

The type of resource to assign to a container. Currently, the only supported * resource type is GPU.

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

The type of resource to assign to a container. Currently, the only supported * resource type is GPU.

*/ inline ResourceRequirement& WithType(const ResourceType& value) { SetType(value); return *this;} /** *

The type of resource to assign to a container. Currently, the only supported * resource type is GPU.

*/ inline ResourceRequirement& WithType(ResourceType&& value) { SetType(std::move(value)); return *this;} private: Aws::String m_value; bool m_valueHasBeenSet; ResourceType m_type; bool m_typeHasBeenSet; }; } // namespace Model } // namespace Batch } // namespace Aws