/** * 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 VerifiedPermissions { namespace Model { /** */ class CreatePolicyRequest : public VerifiedPermissionsRequest { public: AWS_VERIFIEDPERMISSIONS_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_VERIFIEDPERMISSIONS_API Aws::String SerializePayload() const override; AWS_VERIFIEDPERMISSIONS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Specifies a unique, case-sensitive ID that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

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

Specifies a unique, case-sensitive ID that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

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

Specifies a unique, case-sensitive ID that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

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

Specifies a unique, case-sensitive ID that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

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

Specifies a unique, case-sensitive ID that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

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

Specifies a unique, case-sensitive ID that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

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

Specifies a unique, case-sensitive ID that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

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

Specifies a unique, case-sensitive ID that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

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

Specifies the PolicyStoreId of the policy store you want to * store the policy in.

*/ inline const Aws::String& GetPolicyStoreId() const{ return m_policyStoreId; } /** *

Specifies the PolicyStoreId of the policy store you want to * store the policy in.

*/ inline bool PolicyStoreIdHasBeenSet() const { return m_policyStoreIdHasBeenSet; } /** *

Specifies the PolicyStoreId of the policy store you want to * store the policy in.

*/ inline void SetPolicyStoreId(const Aws::String& value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId = value; } /** *

Specifies the PolicyStoreId of the policy store you want to * store the policy in.

*/ inline void SetPolicyStoreId(Aws::String&& value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId = std::move(value); } /** *

Specifies the PolicyStoreId of the policy store you want to * store the policy in.

*/ inline void SetPolicyStoreId(const char* value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId.assign(value); } /** *

Specifies the PolicyStoreId of the policy store you want to * store the policy in.

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

Specifies the PolicyStoreId of the policy store you want to * store the policy in.

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

Specifies the PolicyStoreId of the policy store you want to * store the policy in.

*/ inline CreatePolicyRequest& WithPolicyStoreId(const char* value) { SetPolicyStoreId(value); return *this;} /** *

A structure that specifies the policy type and content to use for the new * policy. You must include either a static or a templateLinked element. The policy * content must be written in the Cedar policy language.

*/ inline const PolicyDefinition& GetDefinition() const{ return m_definition; } /** *

A structure that specifies the policy type and content to use for the new * policy. You must include either a static or a templateLinked element. The policy * content must be written in the Cedar policy language.

*/ inline bool DefinitionHasBeenSet() const { return m_definitionHasBeenSet; } /** *

A structure that specifies the policy type and content to use for the new * policy. You must include either a static or a templateLinked element. The policy * content must be written in the Cedar policy language.

*/ inline void SetDefinition(const PolicyDefinition& value) { m_definitionHasBeenSet = true; m_definition = value; } /** *

A structure that specifies the policy type and content to use for the new * policy. You must include either a static or a templateLinked element. The policy * content must be written in the Cedar policy language.

*/ inline void SetDefinition(PolicyDefinition&& value) { m_definitionHasBeenSet = true; m_definition = std::move(value); } /** *

A structure that specifies the policy type and content to use for the new * policy. You must include either a static or a templateLinked element. The policy * content must be written in the Cedar policy language.

*/ inline CreatePolicyRequest& WithDefinition(const PolicyDefinition& value) { SetDefinition(value); return *this;} /** *

A structure that specifies the policy type and content to use for the new * policy. You must include either a static or a templateLinked element. The policy * content must be written in the Cedar policy language.

*/ inline CreatePolicyRequest& WithDefinition(PolicyDefinition&& value) { SetDefinition(std::move(value)); return *this;} private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::String m_policyStoreId; bool m_policyStoreIdHasBeenSet = false; PolicyDefinition m_definition; bool m_definitionHasBeenSet = false; }; } // namespace Model } // namespace VerifiedPermissions } // namespace Aws