/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #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 the event action configuration for an element of a * Component or ComponentChild. Use for the workflow * feature in Amplify Studio that allows you to bind events and actions to * components. ActionParameters defines the action that is performed * when an event occurs on the component.

See Also:

AWS * API Reference

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

The type of navigation action. Valid values are url and * anchor. This value is required for a navigation action.

*/ inline const ComponentProperty& GetType() const{ return m_type; } /** *

The type of navigation action. Valid values are url and * anchor. This value is required for a navigation action.

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

The type of navigation action. Valid values are url and * anchor. This value is required for a navigation action.

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

The type of navigation action. Valid values are url and * anchor. This value is required for a navigation action.

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

The type of navigation action. Valid values are url and * anchor. This value is required for a navigation action.

*/ inline ActionParameters& WithType(const ComponentProperty& value) { SetType(value); return *this;} /** *

The type of navigation action. Valid values are url and * anchor. This value is required for a navigation action.

*/ inline ActionParameters& WithType(ComponentProperty&& value) { SetType(std::move(value)); return *this;} /** *

The URL to the location to open. Specify this value for a navigation * action.

*/ inline const ComponentProperty& GetUrl() const{ return m_url; } /** *

The URL to the location to open. Specify this value for a navigation * action.

*/ inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; } /** *

The URL to the location to open. Specify this value for a navigation * action.

*/ inline void SetUrl(const ComponentProperty& value) { m_urlHasBeenSet = true; m_url = value; } /** *

The URL to the location to open. Specify this value for a navigation * action.

*/ inline void SetUrl(ComponentProperty&& value) { m_urlHasBeenSet = true; m_url = std::move(value); } /** *

The URL to the location to open. Specify this value for a navigation * action.

*/ inline ActionParameters& WithUrl(const ComponentProperty& value) { SetUrl(value); return *this;} /** *

The URL to the location to open. Specify this value for a navigation * action.

*/ inline ActionParameters& WithUrl(ComponentProperty&& value) { SetUrl(std::move(value)); return *this;} /** *

The HTML anchor link to the location to open. Specify this value for a * navigation action.

*/ inline const ComponentProperty& GetAnchor() const{ return m_anchor; } /** *

The HTML anchor link to the location to open. Specify this value for a * navigation action.

*/ inline bool AnchorHasBeenSet() const { return m_anchorHasBeenSet; } /** *

The HTML anchor link to the location to open. Specify this value for a * navigation action.

*/ inline void SetAnchor(const ComponentProperty& value) { m_anchorHasBeenSet = true; m_anchor = value; } /** *

The HTML anchor link to the location to open. Specify this value for a * navigation action.

*/ inline void SetAnchor(ComponentProperty&& value) { m_anchorHasBeenSet = true; m_anchor = std::move(value); } /** *

The HTML anchor link to the location to open. Specify this value for a * navigation action.

*/ inline ActionParameters& WithAnchor(const ComponentProperty& value) { SetAnchor(value); return *this;} /** *

The HTML anchor link to the location to open. Specify this value for a * navigation action.

*/ inline ActionParameters& WithAnchor(ComponentProperty&& value) { SetAnchor(std::move(value)); return *this;} /** *

The element within the same component to modify when the action occurs.

*/ inline const ComponentProperty& GetTarget() const{ return m_target; } /** *

The element within the same component to modify when the action occurs.

*/ inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; } /** *

The element within the same component to modify when the action occurs.

*/ inline void SetTarget(const ComponentProperty& value) { m_targetHasBeenSet = true; m_target = value; } /** *

The element within the same component to modify when the action occurs.

*/ inline void SetTarget(ComponentProperty&& value) { m_targetHasBeenSet = true; m_target = std::move(value); } /** *

The element within the same component to modify when the action occurs.

*/ inline ActionParameters& WithTarget(const ComponentProperty& value) { SetTarget(value); return *this;} /** *

The element within the same component to modify when the action occurs.

*/ inline ActionParameters& WithTarget(ComponentProperty&& value) { SetTarget(std::move(value)); return *this;} /** *

Specifies whether the user should be signed out globally. Specify this value * for an auth sign out action.

*/ inline const ComponentProperty& GetGlobal() const{ return m_global; } /** *

Specifies whether the user should be signed out globally. Specify this value * for an auth sign out action.

*/ inline bool GlobalHasBeenSet() const { return m_globalHasBeenSet; } /** *

Specifies whether the user should be signed out globally. Specify this value * for an auth sign out action.

*/ inline void SetGlobal(const ComponentProperty& value) { m_globalHasBeenSet = true; m_global = value; } /** *

Specifies whether the user should be signed out globally. Specify this value * for an auth sign out action.

*/ inline void SetGlobal(ComponentProperty&& value) { m_globalHasBeenSet = true; m_global = std::move(value); } /** *

Specifies whether the user should be signed out globally. Specify this value * for an auth sign out action.

*/ inline ActionParameters& WithGlobal(const ComponentProperty& value) { SetGlobal(value); return *this;} /** *

Specifies whether the user should be signed out globally. Specify this value * for an auth sign out action.

*/ inline ActionParameters& WithGlobal(ComponentProperty&& value) { SetGlobal(std::move(value)); return *this;} /** *

The name of the data model. Use when the action performs an operation on an * Amplify DataStore model.

*/ inline const Aws::String& GetModel() const{ return m_model; } /** *

The name of the data model. Use when the action performs an operation on an * Amplify DataStore model.

*/ inline bool ModelHasBeenSet() const { return m_modelHasBeenSet; } /** *

The name of the data model. Use when the action performs an operation on an * Amplify DataStore model.

*/ inline void SetModel(const Aws::String& value) { m_modelHasBeenSet = true; m_model = value; } /** *

The name of the data model. Use when the action performs an operation on an * Amplify DataStore model.

*/ inline void SetModel(Aws::String&& value) { m_modelHasBeenSet = true; m_model = std::move(value); } /** *

The name of the data model. Use when the action performs an operation on an * Amplify DataStore model.

*/ inline void SetModel(const char* value) { m_modelHasBeenSet = true; m_model.assign(value); } /** *

The name of the data model. Use when the action performs an operation on an * Amplify DataStore model.

*/ inline ActionParameters& WithModel(const Aws::String& value) { SetModel(value); return *this;} /** *

The name of the data model. Use when the action performs an operation on an * Amplify DataStore model.

*/ inline ActionParameters& WithModel(Aws::String&& value) { SetModel(std::move(value)); return *this;} /** *

The name of the data model. Use when the action performs an operation on an * Amplify DataStore model.

*/ inline ActionParameters& WithModel(const char* value) { SetModel(value); return *this;} /** *

The unique ID of the component that the ActionParameters apply * to.

*/ inline const ComponentProperty& GetId() const{ return m_id; } /** *

The unique ID of the component that the ActionParameters apply * to.

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

The unique ID of the component that the ActionParameters apply * to.

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

The unique ID of the component that the ActionParameters apply * to.

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

The unique ID of the component that the ActionParameters apply * to.

*/ inline ActionParameters& WithId(const ComponentProperty& value) { SetId(value); return *this;} /** *

The unique ID of the component that the ActionParameters apply * to.

*/ inline ActionParameters& WithId(ComponentProperty&& value) { SetId(std::move(value)); return *this;} /** *

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A dictionary of key-value pairs mapping Amplify Studio properties to fields * in a data model. Use when the action performs an operation on an Amplify * DataStore model.

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

A key-value pair that specifies the state property name and its initial * value.

*/ inline const MutationActionSetStateParameter& GetState() const{ return m_state; } /** *

A key-value pair that specifies the state property name and its initial * value.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

A key-value pair that specifies the state property name and its initial * value.

*/ inline void SetState(const MutationActionSetStateParameter& value) { m_stateHasBeenSet = true; m_state = value; } /** *

A key-value pair that specifies the state property name and its initial * value.

*/ inline void SetState(MutationActionSetStateParameter&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

A key-value pair that specifies the state property name and its initial * value.

*/ inline ActionParameters& WithState(const MutationActionSetStateParameter& value) { SetState(value); return *this;} /** *

A key-value pair that specifies the state property name and its initial * value.

*/ inline ActionParameters& WithState(MutationActionSetStateParameter&& value) { SetState(std::move(value)); return *this;} private: ComponentProperty m_type; bool m_typeHasBeenSet = false; ComponentProperty m_url; bool m_urlHasBeenSet = false; ComponentProperty m_anchor; bool m_anchorHasBeenSet = false; ComponentProperty m_target; bool m_targetHasBeenSet = false; ComponentProperty m_global; bool m_globalHasBeenSet = false; Aws::String m_model; bool m_modelHasBeenSet = false; ComponentProperty m_id; bool m_idHasBeenSet = false; Aws::Map m_fields; bool m_fieldsHasBeenSet = false; MutationActionSetStateParameter m_state; bool m_stateHasBeenSet = false; }; } // namespace Model } // namespace AmplifyUIBuilder } // namespace Aws