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

An object representing a constraint on task placement. To learn more, see Task * Placement Constraints in the Amazon Elastic Container Service Developer * Guide.

See Also:

AWS * API Reference

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

A cluster query language expression to apply to the constraint. You cannot * specify an expression if the constraint type is distinctInstance. * To learn more, see Cluster * Query Language in the Amazon Elastic Container Service Developer Guide.

*/ inline const Aws::String& GetExpression() const{ return m_expression; } /** *

A cluster query language expression to apply to the constraint. You cannot * specify an expression if the constraint type is distinctInstance. * To learn more, see Cluster * Query Language in the Amazon Elastic Container Service Developer Guide.

*/ inline bool ExpressionHasBeenSet() const { return m_expressionHasBeenSet; } /** *

A cluster query language expression to apply to the constraint. You cannot * specify an expression if the constraint type is distinctInstance. * To learn more, see Cluster * Query Language in the Amazon Elastic Container Service Developer Guide.

*/ inline void SetExpression(const Aws::String& value) { m_expressionHasBeenSet = true; m_expression = value; } /** *

A cluster query language expression to apply to the constraint. You cannot * specify an expression if the constraint type is distinctInstance. * To learn more, see Cluster * Query Language in the Amazon Elastic Container Service Developer Guide.

*/ inline void SetExpression(Aws::String&& value) { m_expressionHasBeenSet = true; m_expression = std::move(value); } /** *

A cluster query language expression to apply to the constraint. You cannot * specify an expression if the constraint type is distinctInstance. * To learn more, see Cluster * Query Language in the Amazon Elastic Container Service Developer Guide.

*/ inline void SetExpression(const char* value) { m_expressionHasBeenSet = true; m_expression.assign(value); } /** *

A cluster query language expression to apply to the constraint. You cannot * specify an expression if the constraint type is distinctInstance. * To learn more, see Cluster * Query Language in the Amazon Elastic Container Service Developer Guide.

*/ inline PlacementConstraint& WithExpression(const Aws::String& value) { SetExpression(value); return *this;} /** *

A cluster query language expression to apply to the constraint. You cannot * specify an expression if the constraint type is distinctInstance. * To learn more, see Cluster * Query Language in the Amazon Elastic Container Service Developer Guide.

*/ inline PlacementConstraint& WithExpression(Aws::String&& value) { SetExpression(std::move(value)); return *this;} /** *

A cluster query language expression to apply to the constraint. You cannot * specify an expression if the constraint type is distinctInstance. * To learn more, see Cluster * Query Language in the Amazon Elastic Container Service Developer Guide.

*/ inline PlacementConstraint& WithExpression(const char* value) { SetExpression(value); return *this;} /** *

The type of constraint. Use distinctInstance to ensure that each task in a * particular group is running on a different container instance. Use memberOf to * restrict the selection to a group of valid candidates.

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

The type of constraint. Use distinctInstance to ensure that each task in a * particular group is running on a different container instance. Use memberOf to * restrict the selection to a group of valid candidates.

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

The type of constraint. Use distinctInstance to ensure that each task in a * particular group is running on a different container instance. Use memberOf to * restrict the selection to a group of valid candidates.

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

The type of constraint. Use distinctInstance to ensure that each task in a * particular group is running on a different container instance. Use memberOf to * restrict the selection to a group of valid candidates.

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

The type of constraint. Use distinctInstance to ensure that each task in a * particular group is running on a different container instance. Use memberOf to * restrict the selection to a group of valid candidates.

*/ inline PlacementConstraint& WithType(const PlacementConstraintType& value) { SetType(value); return *this;} /** *

The type of constraint. Use distinctInstance to ensure that each task in a * particular group is running on a different container instance. Use memberOf to * restrict the selection to a group of valid candidates.

*/ inline PlacementConstraint& WithType(PlacementConstraintType&& value) { SetType(std::move(value)); return *this;} private: Aws::String m_expression; bool m_expressionHasBeenSet = false; PlacementConstraintType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace Pipes } // namespace Aws