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

Describes the validation configuration for a field.

See Also:

* AWS * API Reference

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

The validation to perform on an object type.

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

The validation to perform on an object type.

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

The validation to perform on an object type.

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

The validation to perform on an object type.

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

The validation to perform on an object type.

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

The validation to perform on an object type.

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

The validation to perform on an object type.

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

The validation to perform on an object type.

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

The validation to perform on a string value.

*/ inline const Aws::Vector& GetStrValues() const{ return m_strValues; } /** *

The validation to perform on a string value.

*/ inline bool StrValuesHasBeenSet() const { return m_strValuesHasBeenSet; } /** *

The validation to perform on a string value.

*/ inline void SetStrValues(const Aws::Vector& value) { m_strValuesHasBeenSet = true; m_strValues = value; } /** *

The validation to perform on a string value.

*/ inline void SetStrValues(Aws::Vector&& value) { m_strValuesHasBeenSet = true; m_strValues = std::move(value); } /** *

The validation to perform on a string value.

*/ inline FieldValidationConfiguration& WithStrValues(const Aws::Vector& value) { SetStrValues(value); return *this;} /** *

The validation to perform on a string value.

*/ inline FieldValidationConfiguration& WithStrValues(Aws::Vector&& value) { SetStrValues(std::move(value)); return *this;} /** *

The validation to perform on a string value.

*/ inline FieldValidationConfiguration& AddStrValues(const Aws::String& value) { m_strValuesHasBeenSet = true; m_strValues.push_back(value); return *this; } /** *

The validation to perform on a string value.

*/ inline FieldValidationConfiguration& AddStrValues(Aws::String&& value) { m_strValuesHasBeenSet = true; m_strValues.push_back(std::move(value)); return *this; } /** *

The validation to perform on a string value.

*/ inline FieldValidationConfiguration& AddStrValues(const char* value) { m_strValuesHasBeenSet = true; m_strValues.push_back(value); return *this; } /** *

The validation to perform on a number value.

*/ inline const Aws::Vector& GetNumValues() const{ return m_numValues; } /** *

The validation to perform on a number value.

*/ inline bool NumValuesHasBeenSet() const { return m_numValuesHasBeenSet; } /** *

The validation to perform on a number value.

*/ inline void SetNumValues(const Aws::Vector& value) { m_numValuesHasBeenSet = true; m_numValues = value; } /** *

The validation to perform on a number value.

*/ inline void SetNumValues(Aws::Vector&& value) { m_numValuesHasBeenSet = true; m_numValues = std::move(value); } /** *

The validation to perform on a number value.

*/ inline FieldValidationConfiguration& WithNumValues(const Aws::Vector& value) { SetNumValues(value); return *this;} /** *

The validation to perform on a number value.

*/ inline FieldValidationConfiguration& WithNumValues(Aws::Vector&& value) { SetNumValues(std::move(value)); return *this;} /** *

The validation to perform on a number value.

*/ inline FieldValidationConfiguration& AddNumValues(int value) { m_numValuesHasBeenSet = true; m_numValues.push_back(value); return *this; } /** *

The validation message to display.

*/ inline const Aws::String& GetValidationMessage() const{ return m_validationMessage; } /** *

The validation message to display.

*/ inline bool ValidationMessageHasBeenSet() const { return m_validationMessageHasBeenSet; } /** *

The validation message to display.

*/ inline void SetValidationMessage(const Aws::String& value) { m_validationMessageHasBeenSet = true; m_validationMessage = value; } /** *

The validation message to display.

*/ inline void SetValidationMessage(Aws::String&& value) { m_validationMessageHasBeenSet = true; m_validationMessage = std::move(value); } /** *

The validation message to display.

*/ inline void SetValidationMessage(const char* value) { m_validationMessageHasBeenSet = true; m_validationMessage.assign(value); } /** *

The validation message to display.

*/ inline FieldValidationConfiguration& WithValidationMessage(const Aws::String& value) { SetValidationMessage(value); return *this;} /** *

The validation message to display.

*/ inline FieldValidationConfiguration& WithValidationMessage(Aws::String&& value) { SetValidationMessage(std::move(value)); return *this;} /** *

The validation message to display.

*/ inline FieldValidationConfiguration& WithValidationMessage(const char* value) { SetValidationMessage(value); return *this;} private: Aws::String m_type; bool m_typeHasBeenSet = false; Aws::Vector m_strValues; bool m_strValuesHasBeenSet = false; Aws::Vector m_numValues; bool m_numValuesHasBeenSet = false; Aws::String m_validationMessage; bool m_validationMessageHasBeenSet = false; }; } // namespace Model } // namespace AmplifyUIBuilder } // namespace Aws