/** * 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 namespace Aws { namespace Glue { namespace Model { /** */ class AWS_GLUE_API CreateTriggerRequest : public GlueRequest { public: CreateTriggerRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateTrigger"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the trigger.

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

The name of the trigger.

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

The name of the trigger.

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

The name of the trigger.

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

The name of the trigger.

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

The name of the trigger.

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

The name of the trigger.

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

The name of the trigger.

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

The name of the workflow associated with the trigger.

*/ inline const Aws::String& GetWorkflowName() const{ return m_workflowName; } /** *

The name of the workflow associated with the trigger.

*/ inline bool WorkflowNameHasBeenSet() const { return m_workflowNameHasBeenSet; } /** *

The name of the workflow associated with the trigger.

*/ inline void SetWorkflowName(const Aws::String& value) { m_workflowNameHasBeenSet = true; m_workflowName = value; } /** *

The name of the workflow associated with the trigger.

*/ inline void SetWorkflowName(Aws::String&& value) { m_workflowNameHasBeenSet = true; m_workflowName = std::move(value); } /** *

The name of the workflow associated with the trigger.

*/ inline void SetWorkflowName(const char* value) { m_workflowNameHasBeenSet = true; m_workflowName.assign(value); } /** *

The name of the workflow associated with the trigger.

*/ inline CreateTriggerRequest& WithWorkflowName(const Aws::String& value) { SetWorkflowName(value); return *this;} /** *

The name of the workflow associated with the trigger.

*/ inline CreateTriggerRequest& WithWorkflowName(Aws::String&& value) { SetWorkflowName(std::move(value)); return *this;} /** *

The name of the workflow associated with the trigger.

*/ inline CreateTriggerRequest& WithWorkflowName(const char* value) { SetWorkflowName(value); return *this;} /** *

The type of the new trigger.

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

The type of the new trigger.

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

The type of the new trigger.

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

The type of the new trigger.

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

The type of the new trigger.

*/ inline CreateTriggerRequest& WithType(const TriggerType& value) { SetType(value); return *this;} /** *

The type of the new trigger.

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

A cron expression used to specify the schedule (see Time-Based * Schedules for Jobs and Crawlers. For example, to run something every day at * 12:15 UTC, you would specify: cron(15 12 * * ? *).

This * field is required when the trigger type is SCHEDULED.

*/ inline const Aws::String& GetSchedule() const{ return m_schedule; } /** *

A cron expression used to specify the schedule (see Time-Based * Schedules for Jobs and Crawlers. For example, to run something every day at * 12:15 UTC, you would specify: cron(15 12 * * ? *).

This * field is required when the trigger type is SCHEDULED.

*/ inline bool ScheduleHasBeenSet() const { return m_scheduleHasBeenSet; } /** *

A cron expression used to specify the schedule (see Time-Based * Schedules for Jobs and Crawlers. For example, to run something every day at * 12:15 UTC, you would specify: cron(15 12 * * ? *).

This * field is required when the trigger type is SCHEDULED.

*/ inline void SetSchedule(const Aws::String& value) { m_scheduleHasBeenSet = true; m_schedule = value; } /** *

A cron expression used to specify the schedule (see Time-Based * Schedules for Jobs and Crawlers. For example, to run something every day at * 12:15 UTC, you would specify: cron(15 12 * * ? *).

This * field is required when the trigger type is SCHEDULED.

*/ inline void SetSchedule(Aws::String&& value) { m_scheduleHasBeenSet = true; m_schedule = std::move(value); } /** *

A cron expression used to specify the schedule (see Time-Based * Schedules for Jobs and Crawlers. For example, to run something every day at * 12:15 UTC, you would specify: cron(15 12 * * ? *).

This * field is required when the trigger type is SCHEDULED.

*/ inline void SetSchedule(const char* value) { m_scheduleHasBeenSet = true; m_schedule.assign(value); } /** *

A cron expression used to specify the schedule (see Time-Based * Schedules for Jobs and Crawlers. For example, to run something every day at * 12:15 UTC, you would specify: cron(15 12 * * ? *).

This * field is required when the trigger type is SCHEDULED.

*/ inline CreateTriggerRequest& WithSchedule(const Aws::String& value) { SetSchedule(value); return *this;} /** *

A cron expression used to specify the schedule (see Time-Based * Schedules for Jobs and Crawlers. For example, to run something every day at * 12:15 UTC, you would specify: cron(15 12 * * ? *).

This * field is required when the trigger type is SCHEDULED.

*/ inline CreateTriggerRequest& WithSchedule(Aws::String&& value) { SetSchedule(std::move(value)); return *this;} /** *

A cron expression used to specify the schedule (see Time-Based * Schedules for Jobs and Crawlers. For example, to run something every day at * 12:15 UTC, you would specify: cron(15 12 * * ? *).

This * field is required when the trigger type is SCHEDULED.

*/ inline CreateTriggerRequest& WithSchedule(const char* value) { SetSchedule(value); return *this;} /** *

A predicate to specify when the new trigger should fire.

This field is * required when the trigger type is CONDITIONAL.

*/ inline const Predicate& GetPredicate() const{ return m_predicate; } /** *

A predicate to specify when the new trigger should fire.

This field is * required when the trigger type is CONDITIONAL.

*/ inline bool PredicateHasBeenSet() const { return m_predicateHasBeenSet; } /** *

A predicate to specify when the new trigger should fire.

This field is * required when the trigger type is CONDITIONAL.

*/ inline void SetPredicate(const Predicate& value) { m_predicateHasBeenSet = true; m_predicate = value; } /** *

A predicate to specify when the new trigger should fire.

This field is * required when the trigger type is CONDITIONAL.

*/ inline void SetPredicate(Predicate&& value) { m_predicateHasBeenSet = true; m_predicate = std::move(value); } /** *

A predicate to specify when the new trigger should fire.

This field is * required when the trigger type is CONDITIONAL.

*/ inline CreateTriggerRequest& WithPredicate(const Predicate& value) { SetPredicate(value); return *this;} /** *

A predicate to specify when the new trigger should fire.

This field is * required when the trigger type is CONDITIONAL.

*/ inline CreateTriggerRequest& WithPredicate(Predicate&& value) { SetPredicate(std::move(value)); return *this;} /** *

The actions initiated by this trigger when it fires.

*/ inline const Aws::Vector& GetActions() const{ return m_actions; } /** *

The actions initiated by this trigger when it fires.

*/ inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; } /** *

The actions initiated by this trigger when it fires.

*/ inline void SetActions(const Aws::Vector& value) { m_actionsHasBeenSet = true; m_actions = value; } /** *

The actions initiated by this trigger when it fires.

*/ inline void SetActions(Aws::Vector&& value) { m_actionsHasBeenSet = true; m_actions = std::move(value); } /** *

The actions initiated by this trigger when it fires.

*/ inline CreateTriggerRequest& WithActions(const Aws::Vector& value) { SetActions(value); return *this;} /** *

The actions initiated by this trigger when it fires.

*/ inline CreateTriggerRequest& WithActions(Aws::Vector&& value) { SetActions(std::move(value)); return *this;} /** *

The actions initiated by this trigger when it fires.

*/ inline CreateTriggerRequest& AddActions(const Action& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; } /** *

The actions initiated by this trigger when it fires.

*/ inline CreateTriggerRequest& AddActions(Action&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; } /** *

A description of the new trigger.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the new trigger.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description of the new trigger.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description of the new trigger.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description of the new trigger.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description of the new trigger.

*/ inline CreateTriggerRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the new trigger.

*/ inline CreateTriggerRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the new trigger.

*/ inline CreateTriggerRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

Set to true to start SCHEDULED and * CONDITIONAL triggers when created. True is not supported for * ON_DEMAND triggers.

*/ inline bool GetStartOnCreation() const{ return m_startOnCreation; } /** *

Set to true to start SCHEDULED and * CONDITIONAL triggers when created. True is not supported for * ON_DEMAND triggers.

*/ inline bool StartOnCreationHasBeenSet() const { return m_startOnCreationHasBeenSet; } /** *

Set to true to start SCHEDULED and * CONDITIONAL triggers when created. True is not supported for * ON_DEMAND triggers.

*/ inline void SetStartOnCreation(bool value) { m_startOnCreationHasBeenSet = true; m_startOnCreation = value; } /** *

Set to true to start SCHEDULED and * CONDITIONAL triggers when created. True is not supported for * ON_DEMAND triggers.

*/ inline CreateTriggerRequest& WithStartOnCreation(bool value) { SetStartOnCreation(value); return *this;} /** *

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

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

The tags to use with this trigger. You may use tags to limit access to the * trigger. For more information about tags in AWS Glue, see AWS Tags in * AWS Glue in the developer guide.

*/ inline CreateTriggerRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet; Aws::String m_workflowName; bool m_workflowNameHasBeenSet; TriggerType m_type; bool m_typeHasBeenSet; Aws::String m_schedule; bool m_scheduleHasBeenSet; Predicate m_predicate; bool m_predicateHasBeenSet; Aws::Vector m_actions; bool m_actionsHasBeenSet; Aws::String m_description; bool m_descriptionHasBeenSet; bool m_startOnCreation; bool m_startOnCreationHasBeenSet; Aws::Map m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace Glue } // namespace Aws