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

Information about a trigger for a repository.

See Also:

AWS * API Reference

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

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

The name of the trigger.

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

The name of the trigger.

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

The ARN of the resource that is the target for a trigger (for example, the * ARN of a topic in Amazon SNS).

*/ inline const Aws::String& GetDestinationArn() const{ return m_destinationArn; } /** *

The ARN of the resource that is the target for a trigger (for example, the * ARN of a topic in Amazon SNS).

*/ inline bool DestinationArnHasBeenSet() const { return m_destinationArnHasBeenSet; } /** *

The ARN of the resource that is the target for a trigger (for example, the * ARN of a topic in Amazon SNS).

*/ inline void SetDestinationArn(const Aws::String& value) { m_destinationArnHasBeenSet = true; m_destinationArn = value; } /** *

The ARN of the resource that is the target for a trigger (for example, the * ARN of a topic in Amazon SNS).

*/ inline void SetDestinationArn(Aws::String&& value) { m_destinationArnHasBeenSet = true; m_destinationArn = std::move(value); } /** *

The ARN of the resource that is the target for a trigger (for example, the * ARN of a topic in Amazon SNS).

*/ inline void SetDestinationArn(const char* value) { m_destinationArnHasBeenSet = true; m_destinationArn.assign(value); } /** *

The ARN of the resource that is the target for a trigger (for example, the * ARN of a topic in Amazon SNS).

*/ inline RepositoryTrigger& WithDestinationArn(const Aws::String& value) { SetDestinationArn(value); return *this;} /** *

The ARN of the resource that is the target for a trigger (for example, the * ARN of a topic in Amazon SNS).

*/ inline RepositoryTrigger& WithDestinationArn(Aws::String&& value) { SetDestinationArn(std::move(value)); return *this;} /** *

The ARN of the resource that is the target for a trigger (for example, the * ARN of a topic in Amazon SNS).

*/ inline RepositoryTrigger& WithDestinationArn(const char* value) { SetDestinationArn(value); return *this;} /** *

Any custom data associated with the trigger to be included in the information * sent to the target of the trigger.

*/ inline const Aws::String& GetCustomData() const{ return m_customData; } /** *

Any custom data associated with the trigger to be included in the information * sent to the target of the trigger.

*/ inline bool CustomDataHasBeenSet() const { return m_customDataHasBeenSet; } /** *

Any custom data associated with the trigger to be included in the information * sent to the target of the trigger.

*/ inline void SetCustomData(const Aws::String& value) { m_customDataHasBeenSet = true; m_customData = value; } /** *

Any custom data associated with the trigger to be included in the information * sent to the target of the trigger.

*/ inline void SetCustomData(Aws::String&& value) { m_customDataHasBeenSet = true; m_customData = std::move(value); } /** *

Any custom data associated with the trigger to be included in the information * sent to the target of the trigger.

*/ inline void SetCustomData(const char* value) { m_customDataHasBeenSet = true; m_customData.assign(value); } /** *

Any custom data associated with the trigger to be included in the information * sent to the target of the trigger.

*/ inline RepositoryTrigger& WithCustomData(const Aws::String& value) { SetCustomData(value); return *this;} /** *

Any custom data associated with the trigger to be included in the information * sent to the target of the trigger.

*/ inline RepositoryTrigger& WithCustomData(Aws::String&& value) { SetCustomData(std::move(value)); return *this;} /** *

Any custom data associated with the trigger to be included in the information * sent to the target of the trigger.

*/ inline RepositoryTrigger& WithCustomData(const char* value) { SetCustomData(value); return *this;} /** *

The branches to be included in the trigger configuration. If you specify an * empty array, the trigger applies to all branches.

Although no * content is required in the array, you must include the array itself.

*/ inline const Aws::Vector& GetBranches() const{ return m_branches; } /** *

The branches to be included in the trigger configuration. If you specify an * empty array, the trigger applies to all branches.

Although no * content is required in the array, you must include the array itself.

*/ inline bool BranchesHasBeenSet() const { return m_branchesHasBeenSet; } /** *

The branches to be included in the trigger configuration. If you specify an * empty array, the trigger applies to all branches.

Although no * content is required in the array, you must include the array itself.

*/ inline void SetBranches(const Aws::Vector& value) { m_branchesHasBeenSet = true; m_branches = value; } /** *

The branches to be included in the trigger configuration. If you specify an * empty array, the trigger applies to all branches.

Although no * content is required in the array, you must include the array itself.

*/ inline void SetBranches(Aws::Vector&& value) { m_branchesHasBeenSet = true; m_branches = std::move(value); } /** *

The branches to be included in the trigger configuration. If you specify an * empty array, the trigger applies to all branches.

Although no * content is required in the array, you must include the array itself.

*/ inline RepositoryTrigger& WithBranches(const Aws::Vector& value) { SetBranches(value); return *this;} /** *

The branches to be included in the trigger configuration. If you specify an * empty array, the trigger applies to all branches.

Although no * content is required in the array, you must include the array itself.

*/ inline RepositoryTrigger& WithBranches(Aws::Vector&& value) { SetBranches(std::move(value)); return *this;} /** *

The branches to be included in the trigger configuration. If you specify an * empty array, the trigger applies to all branches.

Although no * content is required in the array, you must include the array itself.

*/ inline RepositoryTrigger& AddBranches(const Aws::String& value) { m_branchesHasBeenSet = true; m_branches.push_back(value); return *this; } /** *

The branches to be included in the trigger configuration. If you specify an * empty array, the trigger applies to all branches.

Although no * content is required in the array, you must include the array itself.

*/ inline RepositoryTrigger& AddBranches(Aws::String&& value) { m_branchesHasBeenSet = true; m_branches.push_back(std::move(value)); return *this; } /** *

The branches to be included in the trigger configuration. If you specify an * empty array, the trigger applies to all branches.

Although no * content is required in the array, you must include the array itself.

*/ inline RepositoryTrigger& AddBranches(const char* value) { m_branchesHasBeenSet = true; m_branches.push_back(value); return *this; } /** *

The repository events that cause the trigger to run actions in another * service, such as sending a notification through Amazon SNS.

The * valid value "all" cannot be used with any other values.

*/ inline const Aws::Vector& GetEvents() const{ return m_events; } /** *

The repository events that cause the trigger to run actions in another * service, such as sending a notification through Amazon SNS.

The * valid value "all" cannot be used with any other values.

*/ inline bool EventsHasBeenSet() const { return m_eventsHasBeenSet; } /** *

The repository events that cause the trigger to run actions in another * service, such as sending a notification through Amazon SNS.

The * valid value "all" cannot be used with any other values.

*/ inline void SetEvents(const Aws::Vector& value) { m_eventsHasBeenSet = true; m_events = value; } /** *

The repository events that cause the trigger to run actions in another * service, such as sending a notification through Amazon SNS.

The * valid value "all" cannot be used with any other values.

*/ inline void SetEvents(Aws::Vector&& value) { m_eventsHasBeenSet = true; m_events = std::move(value); } /** *

The repository events that cause the trigger to run actions in another * service, such as sending a notification through Amazon SNS.

The * valid value "all" cannot be used with any other values.

*/ inline RepositoryTrigger& WithEvents(const Aws::Vector& value) { SetEvents(value); return *this;} /** *

The repository events that cause the trigger to run actions in another * service, such as sending a notification through Amazon SNS.

The * valid value "all" cannot be used with any other values.

*/ inline RepositoryTrigger& WithEvents(Aws::Vector&& value) { SetEvents(std::move(value)); return *this;} /** *

The repository events that cause the trigger to run actions in another * service, such as sending a notification through Amazon SNS.

The * valid value "all" cannot be used with any other values.

*/ inline RepositoryTrigger& AddEvents(const RepositoryTriggerEventEnum& value) { m_eventsHasBeenSet = true; m_events.push_back(value); return *this; } /** *

The repository events that cause the trigger to run actions in another * service, such as sending a notification through Amazon SNS.

The * valid value "all" cannot be used with any other values.

*/ inline RepositoryTrigger& AddEvents(RepositoryTriggerEventEnum&& value) { m_eventsHasBeenSet = true; m_events.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_destinationArn; bool m_destinationArnHasBeenSet = false; Aws::String m_customData; bool m_customDataHasBeenSet = false; Aws::Vector m_branches; bool m_branchesHasBeenSet = false; Aws::Vector m_events; bool m_eventsHasBeenSet = false; }; } // namespace Model } // namespace CodeCommit } // namespace Aws