/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace IoT { namespace Model { /** *

The input for the CreatePolicy operation.

See Also:

AWS * API Reference

*/ class CreatePolicyRequest : public IoTRequest { public: AWS_IOT_API CreatePolicyRequest(); // 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 "CreatePolicy"; } AWS_IOT_API Aws::String SerializePayload() const override; /** *

The policy name.

*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The policy name.

*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The policy name.

*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The policy name.

*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The policy name.

*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The policy name.

*/ inline CreatePolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The policy name.

*/ inline CreatePolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The policy name.

*/ inline CreatePolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *

The JSON document that describes the policy. policyDocument must have * a minimum length of 1, with a maximum length of 2048, excluding whitespace.

*/ inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; } /** *

The JSON document that describes the policy. policyDocument must have * a minimum length of 1, with a maximum length of 2048, excluding whitespace.

*/ inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; } /** *

The JSON document that describes the policy. policyDocument must have * a minimum length of 1, with a maximum length of 2048, excluding whitespace.

*/ inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; } /** *

The JSON document that describes the policy. policyDocument must have * a minimum length of 1, with a maximum length of 2048, excluding whitespace.

*/ inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); } /** *

The JSON document that describes the policy. policyDocument must have * a minimum length of 1, with a maximum length of 2048, excluding whitespace.

*/ inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); } /** *

The JSON document that describes the policy. policyDocument must have * a minimum length of 1, with a maximum length of 2048, excluding whitespace.

*/ inline CreatePolicyRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;} /** *

The JSON document that describes the policy. policyDocument must have * a minimum length of 1, with a maximum length of 2048, excluding whitespace.

*/ inline CreatePolicyRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;} /** *

The JSON document that describes the policy. policyDocument must have * a minimum length of 1, with a maximum length of 2048, excluding whitespace.

*/ inline CreatePolicyRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;} /** *

Metadata which can be used to manage the policy.

For URI * Request parameters use format: ...key1=value1&key2=value2...

For the * CLI command-line parameter use format: &&tags * "key1=value1&key2=value2..."

For the cli-input-json file use format: * "tags": "key1=value1&key2=value2..."

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

Metadata which can be used to manage the policy.

For URI * Request parameters use format: ...key1=value1&key2=value2...

For the * CLI command-line parameter use format: &&tags * "key1=value1&key2=value2..."

For the cli-input-json file use format: * "tags": "key1=value1&key2=value2..."

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

Metadata which can be used to manage the policy.

For URI * Request parameters use format: ...key1=value1&key2=value2...

For the * CLI command-line parameter use format: &&tags * "key1=value1&key2=value2..."

For the cli-input-json file use format: * "tags": "key1=value1&key2=value2..."

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

Metadata which can be used to manage the policy.

For URI * Request parameters use format: ...key1=value1&key2=value2...

For the * CLI command-line parameter use format: &&tags * "key1=value1&key2=value2..."

For the cli-input-json file use format: * "tags": "key1=value1&key2=value2..."

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

Metadata which can be used to manage the policy.

For URI * Request parameters use format: ...key1=value1&key2=value2...

For the * CLI command-line parameter use format: &&tags * "key1=value1&key2=value2..."

For the cli-input-json file use format: * "tags": "key1=value1&key2=value2..."

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

Metadata which can be used to manage the policy.

For URI * Request parameters use format: ...key1=value1&key2=value2...

For the * CLI command-line parameter use format: &&tags * "key1=value1&key2=value2..."

For the cli-input-json file use format: * "tags": "key1=value1&key2=value2..."

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

Metadata which can be used to manage the policy.

For URI * Request parameters use format: ...key1=value1&key2=value2...

For the * CLI command-line parameter use format: &&tags * "key1=value1&key2=value2..."

For the cli-input-json file use format: * "tags": "key1=value1&key2=value2..."

*/ inline CreatePolicyRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

Metadata which can be used to manage the policy.

For URI * Request parameters use format: ...key1=value1&key2=value2...

For the * CLI command-line parameter use format: &&tags * "key1=value1&key2=value2..."

For the cli-input-json file use format: * "tags": "key1=value1&key2=value2..."

*/ inline CreatePolicyRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::String m_policyDocument; bool m_policyDocumentHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws