/** * 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 { /** *

Contains the configuration settings for a Form user interface * (UI) element for an Amplify app. A form is a component you can add to your * project by specifying a data source as the default configuration for the * form.

See Also:

AWS * API Reference

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

The unique ID of the Amplify app associated with the form.

*/ inline const Aws::String& GetAppId() const{ return m_appId; } /** *

The unique ID of the Amplify app associated with the form.

*/ inline bool AppIdHasBeenSet() const { return m_appIdHasBeenSet; } /** *

The unique ID of the Amplify app associated with the form.

*/ inline void SetAppId(const Aws::String& value) { m_appIdHasBeenSet = true; m_appId = value; } /** *

The unique ID of the Amplify app associated with the form.

*/ inline void SetAppId(Aws::String&& value) { m_appIdHasBeenSet = true; m_appId = std::move(value); } /** *

The unique ID of the Amplify app associated with the form.

*/ inline void SetAppId(const char* value) { m_appIdHasBeenSet = true; m_appId.assign(value); } /** *

The unique ID of the Amplify app associated with the form.

*/ inline Form& WithAppId(const Aws::String& value) { SetAppId(value); return *this;} /** *

The unique ID of the Amplify app associated with the form.

*/ inline Form& WithAppId(Aws::String&& value) { SetAppId(std::move(value)); return *this;} /** *

The unique ID of the Amplify app associated with the form.

*/ inline Form& WithAppId(const char* value) { SetAppId(value); return *this;} /** *

The name of the backend environment that is a part of the Amplify app.

*/ inline const Aws::String& GetEnvironmentName() const{ return m_environmentName; } /** *

The name of the backend environment that is a part of the Amplify app.

*/ inline bool EnvironmentNameHasBeenSet() const { return m_environmentNameHasBeenSet; } /** *

The name of the backend environment that is a part of the Amplify app.

*/ inline void SetEnvironmentName(const Aws::String& value) { m_environmentNameHasBeenSet = true; m_environmentName = value; } /** *

The name of the backend environment that is a part of the Amplify app.

*/ inline void SetEnvironmentName(Aws::String&& value) { m_environmentNameHasBeenSet = true; m_environmentName = std::move(value); } /** *

The name of the backend environment that is a part of the Amplify app.

*/ inline void SetEnvironmentName(const char* value) { m_environmentNameHasBeenSet = true; m_environmentName.assign(value); } /** *

The name of the backend environment that is a part of the Amplify app.

*/ inline Form& WithEnvironmentName(const Aws::String& value) { SetEnvironmentName(value); return *this;} /** *

The name of the backend environment that is a part of the Amplify app.

*/ inline Form& WithEnvironmentName(Aws::String&& value) { SetEnvironmentName(std::move(value)); return *this;} /** *

The name of the backend environment that is a part of the Amplify app.

*/ inline Form& WithEnvironmentName(const char* value) { SetEnvironmentName(value); return *this;} /** *

The unique ID of the form.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The unique ID of the form.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The unique ID of the form.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The unique ID of the form.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The unique ID of the form.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The unique ID of the form.

*/ inline Form& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The unique ID of the form.

*/ inline Form& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The unique ID of the form.

*/ inline Form& WithId(const char* value) { SetId(value); return *this;} /** *

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 Form& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the form.

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

The name of the form.

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

The operation to perform on the specified form.

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

The operation to perform on the specified form.

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

The operation to perform on the specified form.

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

The operation to perform on the specified form.

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

The operation to perform on the specified form.

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

The operation to perform on the specified form.

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

Stores the configuration for the form's style.

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

Stores the configuration for the form's style.

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

Stores the configuration for the form's style.

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

Stores the configuration for the form's style.

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

Stores the configuration for the form's style.

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

Stores the configuration for the form's style.

*/ inline Form& WithStyle(FormStyle&& value) { SetStyle(std::move(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 Form& WithDataType(const FormDataTypeConfig& value) { SetDataType(value); return *this;} /** *

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

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the information about the form's fields.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

Stores the visual helper elements for the form that are not associated with * any data.

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

The schema version of the form when it was imported.

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

The schema version of the form when it was imported.

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

The schema version of the form when it was imported.

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

The schema version of the form when it was imported.

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

The schema version of the form when it was imported.

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

The schema version of the form when it was imported.

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

The schema version of the form when it was imported.

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

The schema version of the form when it was imported.

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

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

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

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

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

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

*/ 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.

*/ 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.

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

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

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

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

*/ inline Form& 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.

*/ inline Form& 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.

*/ inline Form& 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.

*/ inline Form& 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.

*/ inline Form& 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.

*/ inline Form& 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.

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

Stores the call to action configuration for the form.

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

Stores the call to action configuration for the form.

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

Stores the call to action configuration for the form.

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

Stores the call to action configuration for the form.

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

Stores the call to action configuration for the form.

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

Stores the call to action configuration for the form.

*/ inline Form& WithCta(FormCTA&& value) { SetCta(std::move(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 Form& WithLabelDecorator(const LabelDecorator& value) { SetLabelDecorator(value); return *this;} /** *

Specifies an icon or decoration to display on the form.

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