/** * 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 SNS { namespace Model { /** */ class AddPermissionRequest : public SNSRequest { public: AWS_SNS_API AddPermissionRequest(); // 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 "AddPermission"; } AWS_SNS_API Aws::String SerializePayload() const override; protected: AWS_SNS_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The ARN of the topic whose access control policy you wish to modify.

*/ inline const Aws::String& GetTopicArn() const{ return m_topicArn; } /** *

The ARN of the topic whose access control policy you wish to modify.

*/ inline bool TopicArnHasBeenSet() const { return m_topicArnHasBeenSet; } /** *

The ARN of the topic whose access control policy you wish to modify.

*/ inline void SetTopicArn(const Aws::String& value) { m_topicArnHasBeenSet = true; m_topicArn = value; } /** *

The ARN of the topic whose access control policy you wish to modify.

*/ inline void SetTopicArn(Aws::String&& value) { m_topicArnHasBeenSet = true; m_topicArn = std::move(value); } /** *

The ARN of the topic whose access control policy you wish to modify.

*/ inline void SetTopicArn(const char* value) { m_topicArnHasBeenSet = true; m_topicArn.assign(value); } /** *

The ARN of the topic whose access control policy you wish to modify.

*/ inline AddPermissionRequest& WithTopicArn(const Aws::String& value) { SetTopicArn(value); return *this;} /** *

The ARN of the topic whose access control policy you wish to modify.

*/ inline AddPermissionRequest& WithTopicArn(Aws::String&& value) { SetTopicArn(std::move(value)); return *this;} /** *

The ARN of the topic whose access control policy you wish to modify.

*/ inline AddPermissionRequest& WithTopicArn(const char* value) { SetTopicArn(value); return *this;} /** *

A unique identifier for the new policy statement.

*/ inline const Aws::String& GetLabel() const{ return m_label; } /** *

A unique identifier for the new policy statement.

*/ inline bool LabelHasBeenSet() const { return m_labelHasBeenSet; } /** *

A unique identifier for the new policy statement.

*/ inline void SetLabel(const Aws::String& value) { m_labelHasBeenSet = true; m_label = value; } /** *

A unique identifier for the new policy statement.

*/ inline void SetLabel(Aws::String&& value) { m_labelHasBeenSet = true; m_label = std::move(value); } /** *

A unique identifier for the new policy statement.

*/ inline void SetLabel(const char* value) { m_labelHasBeenSet = true; m_label.assign(value); } /** *

A unique identifier for the new policy statement.

*/ inline AddPermissionRequest& WithLabel(const Aws::String& value) { SetLabel(value); return *this;} /** *

A unique identifier for the new policy statement.

*/ inline AddPermissionRequest& WithLabel(Aws::String&& value) { SetLabel(std::move(value)); return *this;} /** *

A unique identifier for the new policy statement.

*/ inline AddPermissionRequest& WithLabel(const char* value) { SetLabel(value); return *this;} /** *

The Amazon Web Services account IDs of the users (principals) who will be * given access to the specified actions. The users must have Amazon Web Services * account, but do not need to be signed up for this service.

*/ inline const Aws::Vector& GetAWSAccountId() const{ return m_aWSAccountId; } /** *

The Amazon Web Services account IDs of the users (principals) who will be * given access to the specified actions. The users must have Amazon Web Services * account, but do not need to be signed up for this service.

*/ inline bool AWSAccountIdHasBeenSet() const { return m_aWSAccountIdHasBeenSet; } /** *

The Amazon Web Services account IDs of the users (principals) who will be * given access to the specified actions. The users must have Amazon Web Services * account, but do not need to be signed up for this service.

*/ inline void SetAWSAccountId(const Aws::Vector& value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId = value; } /** *

The Amazon Web Services account IDs of the users (principals) who will be * given access to the specified actions. The users must have Amazon Web Services * account, but do not need to be signed up for this service.

*/ inline void SetAWSAccountId(Aws::Vector&& value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId = std::move(value); } /** *

The Amazon Web Services account IDs of the users (principals) who will be * given access to the specified actions. The users must have Amazon Web Services * account, but do not need to be signed up for this service.

*/ inline AddPermissionRequest& WithAWSAccountId(const Aws::Vector& value) { SetAWSAccountId(value); return *this;} /** *

The Amazon Web Services account IDs of the users (principals) who will be * given access to the specified actions. The users must have Amazon Web Services * account, but do not need to be signed up for this service.

*/ inline AddPermissionRequest& WithAWSAccountId(Aws::Vector&& value) { SetAWSAccountId(std::move(value)); return *this;} /** *

The Amazon Web Services account IDs of the users (principals) who will be * given access to the specified actions. The users must have Amazon Web Services * account, but do not need to be signed up for this service.

*/ inline AddPermissionRequest& AddAWSAccountId(const Aws::String& value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId.push_back(value); return *this; } /** *

The Amazon Web Services account IDs of the users (principals) who will be * given access to the specified actions. The users must have Amazon Web Services * account, but do not need to be signed up for this service.

*/ inline AddPermissionRequest& AddAWSAccountId(Aws::String&& value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId.push_back(std::move(value)); return *this; } /** *

The Amazon Web Services account IDs of the users (principals) who will be * given access to the specified actions. The users must have Amazon Web Services * account, but do not need to be signed up for this service.

*/ inline AddPermissionRequest& AddAWSAccountId(const char* value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId.push_back(value); return *this; } /** *

The action you want to allow for the specified principal(s).

Valid * values: Any Amazon SNS action name, for example Publish.

*/ inline const Aws::Vector& GetActionName() const{ return m_actionName; } /** *

The action you want to allow for the specified principal(s).

Valid * values: Any Amazon SNS action name, for example Publish.

*/ inline bool ActionNameHasBeenSet() const { return m_actionNameHasBeenSet; } /** *

The action you want to allow for the specified principal(s).

Valid * values: Any Amazon SNS action name, for example Publish.

*/ inline void SetActionName(const Aws::Vector& value) { m_actionNameHasBeenSet = true; m_actionName = value; } /** *

The action you want to allow for the specified principal(s).

Valid * values: Any Amazon SNS action name, for example Publish.

*/ inline void SetActionName(Aws::Vector&& value) { m_actionNameHasBeenSet = true; m_actionName = std::move(value); } /** *

The action you want to allow for the specified principal(s).

Valid * values: Any Amazon SNS action name, for example Publish.

*/ inline AddPermissionRequest& WithActionName(const Aws::Vector& value) { SetActionName(value); return *this;} /** *

The action you want to allow for the specified principal(s).

Valid * values: Any Amazon SNS action name, for example Publish.

*/ inline AddPermissionRequest& WithActionName(Aws::Vector&& value) { SetActionName(std::move(value)); return *this;} /** *

The action you want to allow for the specified principal(s).

Valid * values: Any Amazon SNS action name, for example Publish.

*/ inline AddPermissionRequest& AddActionName(const Aws::String& value) { m_actionNameHasBeenSet = true; m_actionName.push_back(value); return *this; } /** *

The action you want to allow for the specified principal(s).

Valid * values: Any Amazon SNS action name, for example Publish.

*/ inline AddPermissionRequest& AddActionName(Aws::String&& value) { m_actionNameHasBeenSet = true; m_actionName.push_back(std::move(value)); return *this; } /** *

The action you want to allow for the specified principal(s).

Valid * values: Any Amazon SNS action name, for example Publish.

*/ inline AddPermissionRequest& AddActionName(const char* value) { m_actionNameHasBeenSet = true; m_actionName.push_back(value); return *this; } private: Aws::String m_topicArn; bool m_topicArnHasBeenSet = false; Aws::String m_label; bool m_labelHasBeenSet = false; Aws::Vector m_aWSAccountId; bool m_aWSAccountIdHasBeenSet = false; Aws::Vector m_actionName; bool m_actionNameHasBeenSet = false; }; } // namespace Model } // namespace SNS } // namespace Aws