/** * 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 IoTSiteWise { namespace Model { /** */ class CreateAccessPolicyRequest : public IoTSiteWiseRequest { public: AWS_IOTSITEWISE_API CreateAccessPolicyRequest(); // 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 "CreateAccessPolicy"; } AWS_IOTSITEWISE_API Aws::String SerializePayload() const override; /** *

The identity for this access policy. Choose an IAM Identity Center user, an * IAM Identity Center group, or an IAM user.

*/ inline const Identity& GetAccessPolicyIdentity() const{ return m_accessPolicyIdentity; } /** *

The identity for this access policy. Choose an IAM Identity Center user, an * IAM Identity Center group, or an IAM user.

*/ inline bool AccessPolicyIdentityHasBeenSet() const { return m_accessPolicyIdentityHasBeenSet; } /** *

The identity for this access policy. Choose an IAM Identity Center user, an * IAM Identity Center group, or an IAM user.

*/ inline void SetAccessPolicyIdentity(const Identity& value) { m_accessPolicyIdentityHasBeenSet = true; m_accessPolicyIdentity = value; } /** *

The identity for this access policy. Choose an IAM Identity Center user, an * IAM Identity Center group, or an IAM user.

*/ inline void SetAccessPolicyIdentity(Identity&& value) { m_accessPolicyIdentityHasBeenSet = true; m_accessPolicyIdentity = std::move(value); } /** *

The identity for this access policy. Choose an IAM Identity Center user, an * IAM Identity Center group, or an IAM user.

*/ inline CreateAccessPolicyRequest& WithAccessPolicyIdentity(const Identity& value) { SetAccessPolicyIdentity(value); return *this;} /** *

The identity for this access policy. Choose an IAM Identity Center user, an * IAM Identity Center group, or an IAM user.

*/ inline CreateAccessPolicyRequest& WithAccessPolicyIdentity(Identity&& value) { SetAccessPolicyIdentity(std::move(value)); return *this;} /** *

The IoT SiteWise Monitor resource for this access policy. Choose either a * portal or a project.

*/ inline const Resource& GetAccessPolicyResource() const{ return m_accessPolicyResource; } /** *

The IoT SiteWise Monitor resource for this access policy. Choose either a * portal or a project.

*/ inline bool AccessPolicyResourceHasBeenSet() const { return m_accessPolicyResourceHasBeenSet; } /** *

The IoT SiteWise Monitor resource for this access policy. Choose either a * portal or a project.

*/ inline void SetAccessPolicyResource(const Resource& value) { m_accessPolicyResourceHasBeenSet = true; m_accessPolicyResource = value; } /** *

The IoT SiteWise Monitor resource for this access policy. Choose either a * portal or a project.

*/ inline void SetAccessPolicyResource(Resource&& value) { m_accessPolicyResourceHasBeenSet = true; m_accessPolicyResource = std::move(value); } /** *

The IoT SiteWise Monitor resource for this access policy. Choose either a * portal or a project.

*/ inline CreateAccessPolicyRequest& WithAccessPolicyResource(const Resource& value) { SetAccessPolicyResource(value); return *this;} /** *

The IoT SiteWise Monitor resource for this access policy. Choose either a * portal or a project.

*/ inline CreateAccessPolicyRequest& WithAccessPolicyResource(Resource&& value) { SetAccessPolicyResource(std::move(value)); return *this;} /** *

The permission level for this access policy. Note that a project * ADMINISTRATOR is also known as a project owner.

*/ inline const Permission& GetAccessPolicyPermission() const{ return m_accessPolicyPermission; } /** *

The permission level for this access policy. Note that a project * ADMINISTRATOR is also known as a project owner.

*/ inline bool AccessPolicyPermissionHasBeenSet() const { return m_accessPolicyPermissionHasBeenSet; } /** *

The permission level for this access policy. Note that a project * ADMINISTRATOR is also known as a project owner.

*/ inline void SetAccessPolicyPermission(const Permission& value) { m_accessPolicyPermissionHasBeenSet = true; m_accessPolicyPermission = value; } /** *

The permission level for this access policy. Note that a project * ADMINISTRATOR is also known as a project owner.

*/ inline void SetAccessPolicyPermission(Permission&& value) { m_accessPolicyPermissionHasBeenSet = true; m_accessPolicyPermission = std::move(value); } /** *

The permission level for this access policy. Note that a project * ADMINISTRATOR is also known as a project owner.

*/ inline CreateAccessPolicyRequest& WithAccessPolicyPermission(const Permission& value) { SetAccessPolicyPermission(value); return *this;} /** *

The permission level for this access policy. Note that a project * ADMINISTRATOR is also known as a project owner.

*/ inline CreateAccessPolicyRequest& WithAccessPolicyPermission(Permission&& value) { SetAccessPolicyPermission(std::move(value)); return *this;} /** *

A unique case-sensitive identifier that you can provide to ensure the * idempotency of the request. Don't reuse this client token if a new idempotent * request is required.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

A unique case-sensitive identifier that you can provide to ensure the * idempotency of the request. Don't reuse this client token if a new idempotent * request is required.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

A unique case-sensitive identifier that you can provide to ensure the * idempotency of the request. Don't reuse this client token if a new idempotent * request is required.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

A unique case-sensitive identifier that you can provide to ensure the * idempotency of the request. Don't reuse this client token if a new idempotent * request is required.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

A unique case-sensitive identifier that you can provide to ensure the * idempotency of the request. Don't reuse this client token if a new idempotent * request is required.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

A unique case-sensitive identifier that you can provide to ensure the * idempotency of the request. Don't reuse this client token if a new idempotent * request is required.

*/ inline CreateAccessPolicyRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

A unique case-sensitive identifier that you can provide to ensure the * idempotency of the request. Don't reuse this client token if a new idempotent * request is required.

*/ inline CreateAccessPolicyRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

A unique case-sensitive identifier that you can provide to ensure the * idempotency of the request. Don't reuse this client token if a new idempotent * request is required.

*/ inline CreateAccessPolicyRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

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

A list of key-value pairs that contain metadata for the access policy. For * more information, see Tagging * your IoT SiteWise resources in the IoT SiteWise User Guide.

*/ inline CreateAccessPolicyRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Identity m_accessPolicyIdentity; bool m_accessPolicyIdentityHasBeenSet = false; Resource m_accessPolicyResource; bool m_accessPolicyResourceHasBeenSet = false; Permission m_accessPolicyPermission; bool m_accessPolicyPermissionHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace IoTSiteWise } // namespace Aws