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

A set of criteria that CloudFormation uses to validate parameter values. * Although other constraints might be defined in the stack template, * CloudFormation returns only the AllowedValues * property.

See Also:

AWS * API Reference

*/ class ParameterConstraints { public: AWS_CLOUDFORMATION_API ParameterConstraints(); AWS_CLOUDFORMATION_API ParameterConstraints(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFORMATION_API ParameterConstraints& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFORMATION_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_CLOUDFORMATION_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

A list of values that are permitted for a parameter.

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

A list of values that are permitted for a parameter.

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

A list of values that are permitted for a parameter.

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

A list of values that are permitted for a parameter.

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

A list of values that are permitted for a parameter.

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

A list of values that are permitted for a parameter.

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

A list of values that are permitted for a parameter.

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

A list of values that are permitted for a parameter.

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

A list of values that are permitted for a parameter.

*/ inline ParameterConstraints& AddAllowedValues(const char* value) { m_allowedValuesHasBeenSet = true; m_allowedValues.push_back(value); return *this; } private: Aws::Vector m_allowedValues; bool m_allowedValuesHasBeenSet = false; }; } // namespace Model } // namespace CloudFormation } // namespace Aws