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

Represents all of the information that is required to create a * form.

See Also:

AWS * API Reference

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

The name of the form.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the form.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the form.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the form.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the form.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the form.

*/ inline CreateFormData& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the form.

*/ inline CreateFormData& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the form.

*/ inline CreateFormData& WithName(const char* value) { SetName(value); return *this;} /** *

The type of data source to use to create the form.

*/ inline const FormDataTypeConfig& GetDataType() const{ return m_dataType; } /** *

The type of data source to use to create the form.

*/ inline bool DataTypeHasBeenSet() const { return m_dataTypeHasBeenSet; } /** *

The type of data source to use to create the form.

*/ inline void SetDataType(const FormDataTypeConfig& value) { m_dataTypeHasBeenSet = true; m_dataType = value; } /** *

The type of data source to use to create the form.

*/ inline void SetDataType(FormDataTypeConfig&& value) { m_dataTypeHasBeenSet = true; m_dataType = std::move(value); } /** *

The type of data source to use to create the form.

*/ inline CreateFormData& WithDataType(const FormDataTypeConfig& value) { SetDataType(value); return *this;} /** *

The type of data source to use to create the form.

*/ inline CreateFormData& WithDataType(FormDataTypeConfig&& value) { SetDataType(std::move(value)); return *this;} /** *

Specifies whether to perform a create or update action on the form.

*/ inline const FormActionType& GetFormActionType() const{ return m_formActionType; } /** *

Specifies whether to perform a create or update action on the form.

*/ inline bool FormActionTypeHasBeenSet() const { return m_formActionTypeHasBeenSet; } /** *

Specifies whether to perform a create or update action on the form.

*/ inline void SetFormActionType(const FormActionType& value) { m_formActionTypeHasBeenSet = true; m_formActionType = value; } /** *

Specifies whether to perform a create or update action on the form.

*/ inline void SetFormActionType(FormActionType&& value) { m_formActionTypeHasBeenSet = true; m_formActionType = std::move(value); } /** *

Specifies whether to perform a create or update action on the form.

*/ inline CreateFormData& WithFormActionType(const FormActionType& value) { SetFormActionType(value); return *this;} /** *

Specifies whether to perform a create or update action on the form.

*/ inline CreateFormData& WithFormActionType(FormActionType&& value) { SetFormActionType(std::move(value)); return *this;} /** *

The configuration information for the form's fields.

*/ inline const Aws::Map& GetFields() const{ return m_fields; } /** *

The configuration information for the form's fields.

*/ inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; } /** *

The configuration information for the form's fields.

*/ inline void SetFields(const Aws::Map& value) { m_fieldsHasBeenSet = true; m_fields = value; } /** *

The configuration information for the form's fields.

*/ inline void SetFields(Aws::Map&& value) { m_fieldsHasBeenSet = true; m_fields = std::move(value); } /** *

The configuration information for the form's fields.

*/ inline CreateFormData& WithFields(const Aws::Map& value) { SetFields(value); return *this;} /** *

The configuration information for the form's fields.

*/ inline CreateFormData& WithFields(Aws::Map&& value) { SetFields(std::move(value)); return *this;} /** *

The configuration information for the form's fields.

*/ inline CreateFormData& AddFields(const Aws::String& key, const FieldConfig& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, value); return *this; } /** *

The configuration information for the form's fields.

*/ inline CreateFormData& AddFields(Aws::String&& key, const FieldConfig& value) { m_fieldsHasBeenSet = true; m_fields.emplace(std::move(key), value); return *this; } /** *

The configuration information for the form's fields.

*/ inline CreateFormData& AddFields(const Aws::String& key, FieldConfig&& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, std::move(value)); return *this; } /** *

The configuration information for the form's fields.

*/ inline CreateFormData& AddFields(Aws::String&& key, FieldConfig&& value) { m_fieldsHasBeenSet = true; m_fields.emplace(std::move(key), std::move(value)); return *this; } /** *

The configuration information for the form's fields.

*/ inline CreateFormData& AddFields(const char* key, FieldConfig&& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, std::move(value)); return *this; } /** *

The configuration information for the form's fields.

*/ inline CreateFormData& AddFields(const char* key, const FieldConfig& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, value); return *this; } /** *

The configuration for the form's style.

*/ inline const FormStyle& GetStyle() const{ return m_style; } /** *

The configuration for the form's style.

*/ inline bool StyleHasBeenSet() const { return m_styleHasBeenSet; } /** *

The configuration for the form's style.

*/ inline void SetStyle(const FormStyle& value) { m_styleHasBeenSet = true; m_style = value; } /** *

The configuration for the form's style.

*/ inline void SetStyle(FormStyle&& value) { m_styleHasBeenSet = true; m_style = std::move(value); } /** *

The configuration for the form's style.

*/ inline CreateFormData& WithStyle(const FormStyle& value) { SetStyle(value); return *this;} /** *

The configuration for the form's style.

*/ inline CreateFormData& WithStyle(FormStyle&& value) { SetStyle(std::move(value)); return *this;} /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline const Aws::Map& GetSectionalElements() const{ return m_sectionalElements; } /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline bool SectionalElementsHasBeenSet() const { return m_sectionalElementsHasBeenSet; } /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline void SetSectionalElements(const Aws::Map& value) { m_sectionalElementsHasBeenSet = true; m_sectionalElements = value; } /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline void SetSectionalElements(Aws::Map&& value) { m_sectionalElementsHasBeenSet = true; m_sectionalElements = std::move(value); } /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline CreateFormData& WithSectionalElements(const Aws::Map& value) { SetSectionalElements(value); return *this;} /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline CreateFormData& WithSectionalElements(Aws::Map&& value) { SetSectionalElements(std::move(value)); return *this;} /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline CreateFormData& AddSectionalElements(const Aws::String& key, const SectionalElement& value) { m_sectionalElementsHasBeenSet = true; m_sectionalElements.emplace(key, value); return *this; } /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline CreateFormData& AddSectionalElements(Aws::String&& key, const SectionalElement& value) { m_sectionalElementsHasBeenSet = true; m_sectionalElements.emplace(std::move(key), value); return *this; } /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline CreateFormData& AddSectionalElements(const Aws::String& key, SectionalElement&& value) { m_sectionalElementsHasBeenSet = true; m_sectionalElements.emplace(key, std::move(value)); return *this; } /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline CreateFormData& AddSectionalElements(Aws::String&& key, SectionalElement&& value) { m_sectionalElementsHasBeenSet = true; m_sectionalElements.emplace(std::move(key), std::move(value)); return *this; } /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline CreateFormData& AddSectionalElements(const char* key, SectionalElement&& value) { m_sectionalElementsHasBeenSet = true; m_sectionalElements.emplace(key, std::move(value)); return *this; } /** *

The configuration information for the visual helper elements for the form. * These elements are not associated with any data.

*/ inline CreateFormData& AddSectionalElements(const char* key, const SectionalElement& value) { m_sectionalElementsHasBeenSet = true; m_sectionalElements.emplace(key, value); return *this; } /** *

The schema version of the form.

*/ inline const Aws::String& GetSchemaVersion() const{ return m_schemaVersion; } /** *

The schema version of the form.

*/ inline bool SchemaVersionHasBeenSet() const { return m_schemaVersionHasBeenSet; } /** *

The schema version of the form.

*/ inline void SetSchemaVersion(const Aws::String& value) { m_schemaVersionHasBeenSet = true; m_schemaVersion = value; } /** *

The schema version of the form.

*/ inline void SetSchemaVersion(Aws::String&& value) { m_schemaVersionHasBeenSet = true; m_schemaVersion = std::move(value); } /** *

The schema version of the form.

*/ inline void SetSchemaVersion(const char* value) { m_schemaVersionHasBeenSet = true; m_schemaVersion.assign(value); } /** *

The schema version of the form.

*/ inline CreateFormData& WithSchemaVersion(const Aws::String& value) { SetSchemaVersion(value); return *this;} /** *

The schema version of the form.

*/ inline CreateFormData& WithSchemaVersion(Aws::String&& value) { SetSchemaVersion(std::move(value)); return *this;} /** *

The schema version of the form.

*/ inline CreateFormData& WithSchemaVersion(const char* value) { SetSchemaVersion(value); return *this;} /** *

The FormCTA object that stores the call to action configuration * for the form.

*/ inline const FormCTA& GetCta() const{ return m_cta; } /** *

The FormCTA object that stores the call to action configuration * for the form.

*/ inline bool CtaHasBeenSet() const { return m_ctaHasBeenSet; } /** *

The FormCTA object that stores the call to action configuration * for the form.

*/ inline void SetCta(const FormCTA& value) { m_ctaHasBeenSet = true; m_cta = value; } /** *

The FormCTA object that stores the call to action configuration * for the form.

*/ inline void SetCta(FormCTA&& value) { m_ctaHasBeenSet = true; m_cta = std::move(value); } /** *

The FormCTA object that stores the call to action configuration * for the form.

*/ inline CreateFormData& WithCta(const FormCTA& value) { SetCta(value); return *this;} /** *

The FormCTA object that stores the call to action configuration * for the form.

*/ inline CreateFormData& WithCta(FormCTA&& value) { SetCta(std::move(value)); return *this;} /** *

One or more key-value pairs to use when tagging the form data.

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

One or more key-value pairs to use when tagging the form data.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

One or more key-value pairs to use when tagging the form data.

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

One or more key-value pairs to use when tagging the form data.

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

One or more key-value pairs to use when tagging the form data.

*/ inline CreateFormData& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

One or more key-value pairs to use when tagging the form data.

*/ inline CreateFormData& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

One or more key-value pairs to use when tagging the form data.

*/ inline CreateFormData& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

One or more key-value pairs to use when tagging the form data.

*/ inline CreateFormData& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

One or more key-value pairs to use when tagging the form data.

*/ inline CreateFormData& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

One or more key-value pairs to use when tagging the form data.

*/ inline CreateFormData& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

One or more key-value pairs to use when tagging the form data.

*/ inline CreateFormData& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

One or more key-value pairs to use when tagging the form data.

*/ inline CreateFormData& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

One or more key-value pairs to use when tagging the form data.

*/ inline CreateFormData& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

Specifies an icon or decoration to display on the form.

*/ inline const LabelDecorator& GetLabelDecorator() const{ return m_labelDecorator; } /** *

Specifies an icon or decoration to display on the form.

*/ inline bool LabelDecoratorHasBeenSet() const { return m_labelDecoratorHasBeenSet; } /** *

Specifies an icon or decoration to display on the form.

*/ inline void SetLabelDecorator(const LabelDecorator& value) { m_labelDecoratorHasBeenSet = true; m_labelDecorator = value; } /** *

Specifies an icon or decoration to display on the form.

*/ inline void SetLabelDecorator(LabelDecorator&& value) { m_labelDecoratorHasBeenSet = true; m_labelDecorator = std::move(value); } /** *

Specifies an icon or decoration to display on the form.

*/ inline CreateFormData& WithLabelDecorator(const LabelDecorator& value) { SetLabelDecorator(value); return *this;} /** *

Specifies an icon or decoration to display on the form.

*/ inline CreateFormData& WithLabelDecorator(LabelDecorator&& value) { SetLabelDecorator(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; FormDataTypeConfig m_dataType; bool m_dataTypeHasBeenSet = false; FormActionType m_formActionType; bool m_formActionTypeHasBeenSet = false; Aws::Map m_fields; bool m_fieldsHasBeenSet = false; FormStyle m_style; bool m_styleHasBeenSet = false; Aws::Map m_sectionalElements; bool m_sectionalElementsHasBeenSet = false; Aws::String m_schemaVersion; bool m_schemaVersionHasBeenSet = false; FormCTA m_cta; bool m_ctaHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; LabelDecorator m_labelDecorator; bool m_labelDecoratorHasBeenSet = false; }; } // namespace Model } // namespace AmplifyUIBuilder } // namespace Aws