/** * 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 namespace Aws { namespace CodeStarNotifications { namespace Model { /** */ class CreateNotificationRuleRequest : public CodeStarNotificationsRequest { public: AWS_CODESTARNOTIFICATIONS_API CreateNotificationRuleRequest(); // 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 "CreateNotificationRule"; } AWS_CODESTARNOTIFICATIONS_API Aws::String SerializePayload() const override; /** *

The name for the notification rule. Notification rule names must be unique in * your Amazon Web Services account.

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

The name for the notification rule. Notification rule names must be unique in * your Amazon Web Services account.

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

The name for the notification rule. Notification rule names must be unique in * your Amazon Web Services account.

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

The name for the notification rule. Notification rule names must be unique in * your Amazon Web Services account.

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

The name for the notification rule. Notification rule names must be unique in * your Amazon Web Services account.

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

The name for the notification rule. Notification rule names must be unique in * your Amazon Web Services account.

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

The name for the notification rule. Notification rule names must be unique in * your Amazon Web Services account.

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

The name for the notification rule. Notification rule names must be unique in * your Amazon Web Services account.

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

A list of event types associated with this notification rule. For a list of * allowed events, see EventTypeSummary.

*/ inline const Aws::Vector& GetEventTypeIds() const{ return m_eventTypeIds; } /** *

A list of event types associated with this notification rule. For a list of * allowed events, see EventTypeSummary.

*/ inline bool EventTypeIdsHasBeenSet() const { return m_eventTypeIdsHasBeenSet; } /** *

A list of event types associated with this notification rule. For a list of * allowed events, see EventTypeSummary.

*/ inline void SetEventTypeIds(const Aws::Vector& value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds = value; } /** *

A list of event types associated with this notification rule. For a list of * allowed events, see EventTypeSummary.

*/ inline void SetEventTypeIds(Aws::Vector&& value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds = std::move(value); } /** *

A list of event types associated with this notification rule. For a list of * allowed events, see EventTypeSummary.

*/ inline CreateNotificationRuleRequest& WithEventTypeIds(const Aws::Vector& value) { SetEventTypeIds(value); return *this;} /** *

A list of event types associated with this notification rule. For a list of * allowed events, see EventTypeSummary.

*/ inline CreateNotificationRuleRequest& WithEventTypeIds(Aws::Vector&& value) { SetEventTypeIds(std::move(value)); return *this;} /** *

A list of event types associated with this notification rule. For a list of * allowed events, see EventTypeSummary.

*/ inline CreateNotificationRuleRequest& AddEventTypeIds(const Aws::String& value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds.push_back(value); return *this; } /** *

A list of event types associated with this notification rule. For a list of * allowed events, see EventTypeSummary.

*/ inline CreateNotificationRuleRequest& AddEventTypeIds(Aws::String&& value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds.push_back(std::move(value)); return *this; } /** *

A list of event types associated with this notification rule. For a list of * allowed events, see EventTypeSummary.

*/ inline CreateNotificationRuleRequest& AddEventTypeIds(const char* value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds.push_back(value); return *this; } /** *

The Amazon Resource Name (ARN) of the resource to associate with the * notification rule. Supported resources include pipelines in CodePipeline, * repositories in CodeCommit, and build projects in CodeBuild.

*/ inline const Aws::String& GetResource() const{ return m_resource; } /** *

The Amazon Resource Name (ARN) of the resource to associate with the * notification rule. Supported resources include pipelines in CodePipeline, * repositories in CodeCommit, and build projects in CodeBuild.

*/ inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the resource to associate with the * notification rule. Supported resources include pipelines in CodePipeline, * repositories in CodeCommit, and build projects in CodeBuild.

*/ inline void SetResource(const Aws::String& value) { m_resourceHasBeenSet = true; m_resource = value; } /** *

The Amazon Resource Name (ARN) of the resource to associate with the * notification rule. Supported resources include pipelines in CodePipeline, * repositories in CodeCommit, and build projects in CodeBuild.

*/ inline void SetResource(Aws::String&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); } /** *

The Amazon Resource Name (ARN) of the resource to associate with the * notification rule. Supported resources include pipelines in CodePipeline, * repositories in CodeCommit, and build projects in CodeBuild.

*/ inline void SetResource(const char* value) { m_resourceHasBeenSet = true; m_resource.assign(value); } /** *

The Amazon Resource Name (ARN) of the resource to associate with the * notification rule. Supported resources include pipelines in CodePipeline, * repositories in CodeCommit, and build projects in CodeBuild.

*/ inline CreateNotificationRuleRequest& WithResource(const Aws::String& value) { SetResource(value); return *this;} /** *

The Amazon Resource Name (ARN) of the resource to associate with the * notification rule. Supported resources include pipelines in CodePipeline, * repositories in CodeCommit, and build projects in CodeBuild.

*/ inline CreateNotificationRuleRequest& WithResource(Aws::String&& value) { SetResource(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the resource to associate with the * notification rule. Supported resources include pipelines in CodePipeline, * repositories in CodeCommit, and build projects in CodeBuild.

*/ inline CreateNotificationRuleRequest& WithResource(const char* value) { SetResource(value); return *this;} /** *

A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service * topics and Chatbot clients to associate with the notification rule.

*/ inline const Aws::Vector& GetTargets() const{ return m_targets; } /** *

A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service * topics and Chatbot clients to associate with the notification rule.

*/ inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; } /** *

A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service * topics and Chatbot clients to associate with the notification rule.

*/ inline void SetTargets(const Aws::Vector& value) { m_targetsHasBeenSet = true; m_targets = value; } /** *

A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service * topics and Chatbot clients to associate with the notification rule.

*/ inline void SetTargets(Aws::Vector&& value) { m_targetsHasBeenSet = true; m_targets = std::move(value); } /** *

A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service * topics and Chatbot clients to associate with the notification rule.

*/ inline CreateNotificationRuleRequest& WithTargets(const Aws::Vector& value) { SetTargets(value); return *this;} /** *

A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service * topics and Chatbot clients to associate with the notification rule.

*/ inline CreateNotificationRuleRequest& WithTargets(Aws::Vector&& value) { SetTargets(std::move(value)); return *this;} /** *

A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service * topics and Chatbot clients to associate with the notification rule.

*/ inline CreateNotificationRuleRequest& AddTargets(const Target& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; } /** *

A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service * topics and Chatbot clients to associate with the notification rule.

*/ inline CreateNotificationRuleRequest& AddTargets(Target&& value) { m_targetsHasBeenSet = true; m_targets.push_back(std::move(value)); return *this; } /** *

The level of detail to include in the notifications for this resource. * BASIC will include only the contents of the event as it would * appear in Amazon CloudWatch. FULL will include any supplemental * information provided by AWS CodeStar Notifications and/or the service for the * resource for which the notification is created.

*/ inline const DetailType& GetDetailType() const{ return m_detailType; } /** *

The level of detail to include in the notifications for this resource. * BASIC will include only the contents of the event as it would * appear in Amazon CloudWatch. FULL will include any supplemental * information provided by AWS CodeStar Notifications and/or the service for the * resource for which the notification is created.

*/ inline bool DetailTypeHasBeenSet() const { return m_detailTypeHasBeenSet; } /** *

The level of detail to include in the notifications for this resource. * BASIC will include only the contents of the event as it would * appear in Amazon CloudWatch. FULL will include any supplemental * information provided by AWS CodeStar Notifications and/or the service for the * resource for which the notification is created.

*/ inline void SetDetailType(const DetailType& value) { m_detailTypeHasBeenSet = true; m_detailType = value; } /** *

The level of detail to include in the notifications for this resource. * BASIC will include only the contents of the event as it would * appear in Amazon CloudWatch. FULL will include any supplemental * information provided by AWS CodeStar Notifications and/or the service for the * resource for which the notification is created.

*/ inline void SetDetailType(DetailType&& value) { m_detailTypeHasBeenSet = true; m_detailType = std::move(value); } /** *

The level of detail to include in the notifications for this resource. * BASIC will include only the contents of the event as it would * appear in Amazon CloudWatch. FULL will include any supplemental * information provided by AWS CodeStar Notifications and/or the service for the * resource for which the notification is created.

*/ inline CreateNotificationRuleRequest& WithDetailType(const DetailType& value) { SetDetailType(value); return *this;} /** *

The level of detail to include in the notifications for this resource. * BASIC will include only the contents of the event as it would * appear in Amazon CloudWatch. FULL will include any supplemental * information provided by AWS CodeStar Notifications and/or the service for the * resource for which the notification is created.

*/ inline CreateNotificationRuleRequest& WithDetailType(DetailType&& value) { SetDetailType(std::move(value)); return *this;} /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request with the same parameters is received and a token is included, the * request returns information about the initial request that used that token.

*

The Amazon Web Services SDKs prepopulate client request tokens. If you * are using an Amazon Web Services SDK, an idempotency token is created for * you.

*/ inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; } /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request with the same parameters is received and a token is included, the * request returns information about the initial request that used that token.

*

The Amazon Web Services SDKs prepopulate client request tokens. If you * are using an Amazon Web Services SDK, an idempotency token is created for * you.

*/ inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; } /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request with the same parameters is received and a token is included, the * request returns information about the initial request that used that token.

*

The Amazon Web Services SDKs prepopulate client request tokens. If you * are using an Amazon Web Services SDK, an idempotency token is created for * you.

*/ inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; } /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request with the same parameters is received and a token is included, the * request returns information about the initial request that used that token.

*

The Amazon Web Services SDKs prepopulate client request tokens. If you * are using an Amazon Web Services SDK, an idempotency token is created for * you.

*/ inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); } /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request with the same parameters is received and a token is included, the * request returns information about the initial request that used that token.

*

The Amazon Web Services SDKs prepopulate client request tokens. If you * are using an Amazon Web Services SDK, an idempotency token is created for * you.

*/ inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); } /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request with the same parameters is received and a token is included, the * request returns information about the initial request that used that token.

*

The Amazon Web Services SDKs prepopulate client request tokens. If you * are using an Amazon Web Services SDK, an idempotency token is created for * you.

*/ inline CreateNotificationRuleRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;} /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request with the same parameters is received and a token is included, the * request returns information about the initial request that used that token.

*

The Amazon Web Services SDKs prepopulate client request tokens. If you * are using an Amazon Web Services SDK, an idempotency token is created for * you.

*/ inline CreateNotificationRuleRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;} /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request with the same parameters is received and a token is included, the * request returns information about the initial request that used that token.

*

The Amazon Web Services SDKs prepopulate client request tokens. If you * are using an Amazon Web Services SDK, an idempotency token is created for * you.

*/ inline CreateNotificationRuleRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} /** *

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

A list of tags to apply to this notification rule. Key names cannot start * with "aws".

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

The status of the notification rule. The default value is * ENABLED. If the status is set to DISABLED, * notifications aren't sent for the notification rule.

*/ inline const NotificationRuleStatus& GetStatus() const{ return m_status; } /** *

The status of the notification rule. The default value is * ENABLED. If the status is set to DISABLED, * notifications aren't sent for the notification rule.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the notification rule. The default value is * ENABLED. If the status is set to DISABLED, * notifications aren't sent for the notification rule.

*/ inline void SetStatus(const NotificationRuleStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the notification rule. The default value is * ENABLED. If the status is set to DISABLED, * notifications aren't sent for the notification rule.

*/ inline void SetStatus(NotificationRuleStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the notification rule. The default value is * ENABLED. If the status is set to DISABLED, * notifications aren't sent for the notification rule.

*/ inline CreateNotificationRuleRequest& WithStatus(const NotificationRuleStatus& value) { SetStatus(value); return *this;} /** *

The status of the notification rule. The default value is * ENABLED. If the status is set to DISABLED, * notifications aren't sent for the notification rule.

*/ inline CreateNotificationRuleRequest& WithStatus(NotificationRuleStatus&& value) { SetStatus(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::Vector m_eventTypeIds; bool m_eventTypeIdsHasBeenSet = false; Aws::String m_resource; bool m_resourceHasBeenSet = false; Aws::Vector m_targets; bool m_targetsHasBeenSet = false; DetailType m_detailType; bool m_detailTypeHasBeenSet = false; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; NotificationRuleStatus m_status; bool m_statusHasBeenSet = false; }; } // namespace Model } // namespace CodeStarNotifications } // namespace Aws