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

The constraints that the administrator has put on the * parameter.

See Also:

AWS * API Reference

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

The values that the administrator has allowed for the parameter.

*/ inline const Aws::Vector& GetAllowedValues() const{ return m_allowedValues; } /** *

The values that the administrator has allowed for the parameter.

*/ inline bool AllowedValuesHasBeenSet() const { return m_allowedValuesHasBeenSet; } /** *

The values that the administrator has allowed for the parameter.

*/ inline void SetAllowedValues(const Aws::Vector& value) { m_allowedValuesHasBeenSet = true; m_allowedValues = value; } /** *

The values that the administrator has allowed for the parameter.

*/ inline void SetAllowedValues(Aws::Vector&& value) { m_allowedValuesHasBeenSet = true; m_allowedValues = std::move(value); } /** *

The values that the administrator has allowed for the parameter.

*/ inline ParameterConstraints& WithAllowedValues(const Aws::Vector& value) { SetAllowedValues(value); return *this;} /** *

The values that the administrator has allowed for the parameter.

*/ inline ParameterConstraints& WithAllowedValues(Aws::Vector&& value) { SetAllowedValues(std::move(value)); return *this;} /** *

The values that the administrator has allowed for the parameter.

*/ inline ParameterConstraints& AddAllowedValues(const Aws::String& value) { m_allowedValuesHasBeenSet = true; m_allowedValues.push_back(value); return *this; } /** *

The values that the administrator has allowed for the parameter.

*/ inline ParameterConstraints& AddAllowedValues(Aws::String&& value) { m_allowedValuesHasBeenSet = true; m_allowedValues.push_back(std::move(value)); return *this; } /** *

The values that the administrator has allowed for the parameter.

*/ inline ParameterConstraints& AddAllowedValues(const char* value) { m_allowedValuesHasBeenSet = true; m_allowedValues.push_back(value); return *this; } /** *

A regular expression that represents the patterns that allow for * String types. The pattern must match the entire parameter value * provided.

*/ inline const Aws::String& GetAllowedPattern() const{ return m_allowedPattern; } /** *

A regular expression that represents the patterns that allow for * String types. The pattern must match the entire parameter value * provided.

*/ inline bool AllowedPatternHasBeenSet() const { return m_allowedPatternHasBeenSet; } /** *

A regular expression that represents the patterns that allow for * String types. The pattern must match the entire parameter value * provided.

*/ inline void SetAllowedPattern(const Aws::String& value) { m_allowedPatternHasBeenSet = true; m_allowedPattern = value; } /** *

A regular expression that represents the patterns that allow for * String types. The pattern must match the entire parameter value * provided.

*/ inline void SetAllowedPattern(Aws::String&& value) { m_allowedPatternHasBeenSet = true; m_allowedPattern = std::move(value); } /** *

A regular expression that represents the patterns that allow for * String types. The pattern must match the entire parameter value * provided.

*/ inline void SetAllowedPattern(const char* value) { m_allowedPatternHasBeenSet = true; m_allowedPattern.assign(value); } /** *

A regular expression that represents the patterns that allow for * String types. The pattern must match the entire parameter value * provided.

*/ inline ParameterConstraints& WithAllowedPattern(const Aws::String& value) { SetAllowedPattern(value); return *this;} /** *

A regular expression that represents the patterns that allow for * String types. The pattern must match the entire parameter value * provided.

*/ inline ParameterConstraints& WithAllowedPattern(Aws::String&& value) { SetAllowedPattern(std::move(value)); return *this;} /** *

A regular expression that represents the patterns that allow for * String types. The pattern must match the entire parameter value * provided.

*/ inline ParameterConstraints& WithAllowedPattern(const char* value) { SetAllowedPattern(value); return *this;} /** *

A string that explains a constraint when the constraint is violated. For * example, without a constraint description, a parameter that has an allowed * pattern of [A-Za-z0-9]+ displays the following error message when * the user specifies an invalid value:

Malformed input-Parameter * MyParameter must match pattern [A-Za-z0-9]+

By adding a * constraint description, such as must only contain letters (uppercase and * lowercase) and numbers, you can display the following customized error * message:

Malformed input-Parameter MyParameter must only contain * uppercase and lowercase letters and numbers.

*/ inline const Aws::String& GetConstraintDescription() const{ return m_constraintDescription; } /** *

A string that explains a constraint when the constraint is violated. For * example, without a constraint description, a parameter that has an allowed * pattern of [A-Za-z0-9]+ displays the following error message when * the user specifies an invalid value:

Malformed input-Parameter * MyParameter must match pattern [A-Za-z0-9]+

By adding a * constraint description, such as must only contain letters (uppercase and * lowercase) and numbers, you can display the following customized error * message:

Malformed input-Parameter MyParameter must only contain * uppercase and lowercase letters and numbers.

*/ inline bool ConstraintDescriptionHasBeenSet() const { return m_constraintDescriptionHasBeenSet; } /** *

A string that explains a constraint when the constraint is violated. For * example, without a constraint description, a parameter that has an allowed * pattern of [A-Za-z0-9]+ displays the following error message when * the user specifies an invalid value:

Malformed input-Parameter * MyParameter must match pattern [A-Za-z0-9]+

By adding a * constraint description, such as must only contain letters (uppercase and * lowercase) and numbers, you can display the following customized error * message:

Malformed input-Parameter MyParameter must only contain * uppercase and lowercase letters and numbers.

*/ inline void SetConstraintDescription(const Aws::String& value) { m_constraintDescriptionHasBeenSet = true; m_constraintDescription = value; } /** *

A string that explains a constraint when the constraint is violated. For * example, without a constraint description, a parameter that has an allowed * pattern of [A-Za-z0-9]+ displays the following error message when * the user specifies an invalid value:

Malformed input-Parameter * MyParameter must match pattern [A-Za-z0-9]+

By adding a * constraint description, such as must only contain letters (uppercase and * lowercase) and numbers, you can display the following customized error * message:

Malformed input-Parameter MyParameter must only contain * uppercase and lowercase letters and numbers.

*/ inline void SetConstraintDescription(Aws::String&& value) { m_constraintDescriptionHasBeenSet = true; m_constraintDescription = std::move(value); } /** *

A string that explains a constraint when the constraint is violated. For * example, without a constraint description, a parameter that has an allowed * pattern of [A-Za-z0-9]+ displays the following error message when * the user specifies an invalid value:

Malformed input-Parameter * MyParameter must match pattern [A-Za-z0-9]+

By adding a * constraint description, such as must only contain letters (uppercase and * lowercase) and numbers, you can display the following customized error * message:

Malformed input-Parameter MyParameter must only contain * uppercase and lowercase letters and numbers.

*/ inline void SetConstraintDescription(const char* value) { m_constraintDescriptionHasBeenSet = true; m_constraintDescription.assign(value); } /** *

A string that explains a constraint when the constraint is violated. For * example, without a constraint description, a parameter that has an allowed * pattern of [A-Za-z0-9]+ displays the following error message when * the user specifies an invalid value:

Malformed input-Parameter * MyParameter must match pattern [A-Za-z0-9]+

By adding a * constraint description, such as must only contain letters (uppercase and * lowercase) and numbers, you can display the following customized error * message:

Malformed input-Parameter MyParameter must only contain * uppercase and lowercase letters and numbers.

*/ inline ParameterConstraints& WithConstraintDescription(const Aws::String& value) { SetConstraintDescription(value); return *this;} /** *

A string that explains a constraint when the constraint is violated. For * example, without a constraint description, a parameter that has an allowed * pattern of [A-Za-z0-9]+ displays the following error message when * the user specifies an invalid value:

Malformed input-Parameter * MyParameter must match pattern [A-Za-z0-9]+

By adding a * constraint description, such as must only contain letters (uppercase and * lowercase) and numbers, you can display the following customized error * message:

Malformed input-Parameter MyParameter must only contain * uppercase and lowercase letters and numbers.

*/ inline ParameterConstraints& WithConstraintDescription(Aws::String&& value) { SetConstraintDescription(std::move(value)); return *this;} /** *

A string that explains a constraint when the constraint is violated. For * example, without a constraint description, a parameter that has an allowed * pattern of [A-Za-z0-9]+ displays the following error message when * the user specifies an invalid value:

Malformed input-Parameter * MyParameter must match pattern [A-Za-z0-9]+

By adding a * constraint description, such as must only contain letters (uppercase and * lowercase) and numbers, you can display the following customized error * message:

Malformed input-Parameter MyParameter must only contain * uppercase and lowercase letters and numbers.

*/ inline ParameterConstraints& WithConstraintDescription(const char* value) { SetConstraintDescription(value); return *this;} /** *

An integer value that determines the largest number of characters you want to * allow for String types.

*/ inline const Aws::String& GetMaxLength() const{ return m_maxLength; } /** *

An integer value that determines the largest number of characters you want to * allow for String types.

*/ inline bool MaxLengthHasBeenSet() const { return m_maxLengthHasBeenSet; } /** *

An integer value that determines the largest number of characters you want to * allow for String types.

*/ inline void SetMaxLength(const Aws::String& value) { m_maxLengthHasBeenSet = true; m_maxLength = value; } /** *

An integer value that determines the largest number of characters you want to * allow for String types.

*/ inline void SetMaxLength(Aws::String&& value) { m_maxLengthHasBeenSet = true; m_maxLength = std::move(value); } /** *

An integer value that determines the largest number of characters you want to * allow for String types.

*/ inline void SetMaxLength(const char* value) { m_maxLengthHasBeenSet = true; m_maxLength.assign(value); } /** *

An integer value that determines the largest number of characters you want to * allow for String types.

*/ inline ParameterConstraints& WithMaxLength(const Aws::String& value) { SetMaxLength(value); return *this;} /** *

An integer value that determines the largest number of characters you want to * allow for String types.

*/ inline ParameterConstraints& WithMaxLength(Aws::String&& value) { SetMaxLength(std::move(value)); return *this;} /** *

An integer value that determines the largest number of characters you want to * allow for String types.

*/ inline ParameterConstraints& WithMaxLength(const char* value) { SetMaxLength(value); return *this;} /** *

An integer value that determines the smallest number of characters you want * to allow for String types.

*/ inline const Aws::String& GetMinLength() const{ return m_minLength; } /** *

An integer value that determines the smallest number of characters you want * to allow for String types.

*/ inline bool MinLengthHasBeenSet() const { return m_minLengthHasBeenSet; } /** *

An integer value that determines the smallest number of characters you want * to allow for String types.

*/ inline void SetMinLength(const Aws::String& value) { m_minLengthHasBeenSet = true; m_minLength = value; } /** *

An integer value that determines the smallest number of characters you want * to allow for String types.

*/ inline void SetMinLength(Aws::String&& value) { m_minLengthHasBeenSet = true; m_minLength = std::move(value); } /** *

An integer value that determines the smallest number of characters you want * to allow for String types.

*/ inline void SetMinLength(const char* value) { m_minLengthHasBeenSet = true; m_minLength.assign(value); } /** *

An integer value that determines the smallest number of characters you want * to allow for String types.

*/ inline ParameterConstraints& WithMinLength(const Aws::String& value) { SetMinLength(value); return *this;} /** *

An integer value that determines the smallest number of characters you want * to allow for String types.

*/ inline ParameterConstraints& WithMinLength(Aws::String&& value) { SetMinLength(std::move(value)); return *this;} /** *

An integer value that determines the smallest number of characters you want * to allow for String types.

*/ inline ParameterConstraints& WithMinLength(const char* value) { SetMinLength(value); return *this;} /** *

A numeric value that determines the largest numeric value you want to allow * for Number types.

*/ inline const Aws::String& GetMaxValue() const{ return m_maxValue; } /** *

A numeric value that determines the largest numeric value you want to allow * for Number types.

*/ inline bool MaxValueHasBeenSet() const { return m_maxValueHasBeenSet; } /** *

A numeric value that determines the largest numeric value you want to allow * for Number types.

*/ inline void SetMaxValue(const Aws::String& value) { m_maxValueHasBeenSet = true; m_maxValue = value; } /** *

A numeric value that determines the largest numeric value you want to allow * for Number types.

*/ inline void SetMaxValue(Aws::String&& value) { m_maxValueHasBeenSet = true; m_maxValue = std::move(value); } /** *

A numeric value that determines the largest numeric value you want to allow * for Number types.

*/ inline void SetMaxValue(const char* value) { m_maxValueHasBeenSet = true; m_maxValue.assign(value); } /** *

A numeric value that determines the largest numeric value you want to allow * for Number types.

*/ inline ParameterConstraints& WithMaxValue(const Aws::String& value) { SetMaxValue(value); return *this;} /** *

A numeric value that determines the largest numeric value you want to allow * for Number types.

*/ inline ParameterConstraints& WithMaxValue(Aws::String&& value) { SetMaxValue(std::move(value)); return *this;} /** *

A numeric value that determines the largest numeric value you want to allow * for Number types.

*/ inline ParameterConstraints& WithMaxValue(const char* value) { SetMaxValue(value); return *this;} /** *

A numeric value that determines the smallest numeric value you want to allow * for Number types.

*/ inline const Aws::String& GetMinValue() const{ return m_minValue; } /** *

A numeric value that determines the smallest numeric value you want to allow * for Number types.

*/ inline bool MinValueHasBeenSet() const { return m_minValueHasBeenSet; } /** *

A numeric value that determines the smallest numeric value you want to allow * for Number types.

*/ inline void SetMinValue(const Aws::String& value) { m_minValueHasBeenSet = true; m_minValue = value; } /** *

A numeric value that determines the smallest numeric value you want to allow * for Number types.

*/ inline void SetMinValue(Aws::String&& value) { m_minValueHasBeenSet = true; m_minValue = std::move(value); } /** *

A numeric value that determines the smallest numeric value you want to allow * for Number types.

*/ inline void SetMinValue(const char* value) { m_minValueHasBeenSet = true; m_minValue.assign(value); } /** *

A numeric value that determines the smallest numeric value you want to allow * for Number types.

*/ inline ParameterConstraints& WithMinValue(const Aws::String& value) { SetMinValue(value); return *this;} /** *

A numeric value that determines the smallest numeric value you want to allow * for Number types.

*/ inline ParameterConstraints& WithMinValue(Aws::String&& value) { SetMinValue(std::move(value)); return *this;} /** *

A numeric value that determines the smallest numeric value you want to allow * for Number types.

*/ inline ParameterConstraints& WithMinValue(const char* value) { SetMinValue(value); return *this;} private: Aws::Vector m_allowedValues; bool m_allowedValuesHasBeenSet = false; Aws::String m_allowedPattern; bool m_allowedPatternHasBeenSet = false; Aws::String m_constraintDescription; bool m_constraintDescriptionHasBeenSet = false; Aws::String m_maxLength; bool m_maxLengthHasBeenSet = false; Aws::String m_minLength; bool m_minLengthHasBeenSet = false; Aws::String m_maxValue; bool m_maxValueHasBeenSet = false; Aws::String m_minValue; bool m_minValueHasBeenSet = false; }; } // namespace Model } // namespace ServiceCatalog } // namespace Aws