/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace KMS { namespace Model { /** */ class AWS_KMS_API RetireGrantRequest : public KMSRequest { public: RetireGrantRequest(); // 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 "RetireGrant"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Token that identifies the grant to be retired.

*/ inline const Aws::String& GetGrantToken() const{ return m_grantToken; } /** *

Token that identifies the grant to be retired.

*/ inline bool GrantTokenHasBeenSet() const { return m_grantTokenHasBeenSet; } /** *

Token that identifies the grant to be retired.

*/ inline void SetGrantToken(const Aws::String& value) { m_grantTokenHasBeenSet = true; m_grantToken = value; } /** *

Token that identifies the grant to be retired.

*/ inline void SetGrantToken(Aws::String&& value) { m_grantTokenHasBeenSet = true; m_grantToken = std::move(value); } /** *

Token that identifies the grant to be retired.

*/ inline void SetGrantToken(const char* value) { m_grantTokenHasBeenSet = true; m_grantToken.assign(value); } /** *

Token that identifies the grant to be retired.

*/ inline RetireGrantRequest& WithGrantToken(const Aws::String& value) { SetGrantToken(value); return *this;} /** *

Token that identifies the grant to be retired.

*/ inline RetireGrantRequest& WithGrantToken(Aws::String&& value) { SetGrantToken(std::move(value)); return *this;} /** *

Token that identifies the grant to be retired.

*/ inline RetireGrantRequest& WithGrantToken(const char* value) { SetGrantToken(value); return *this;} /** *

The Amazon Resource Name (ARN) of the CMK associated with the grant.

*

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

*/ inline const Aws::String& GetKeyId() const{ return m_keyId; } /** *

The Amazon Resource Name (ARN) of the CMK associated with the grant.

*

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

*/ inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the CMK associated with the grant.

*

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

*/ inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; } /** *

The Amazon Resource Name (ARN) of the CMK associated with the grant.

*

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

*/ inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); } /** *

The Amazon Resource Name (ARN) of the CMK associated with the grant.

*

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

*/ inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); } /** *

The Amazon Resource Name (ARN) of the CMK associated with the grant.

*

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

*/ inline RetireGrantRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the CMK associated with the grant.

*

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

*/ inline RetireGrantRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the CMK associated with the grant.

*

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

*/ inline RetireGrantRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;} /** *

Unique identifier of the grant to retire. The grant ID is returned in the * response to a CreateGrant operation.

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

    *
*/ inline const Aws::String& GetGrantId() const{ return m_grantId; } /** *

Unique identifier of the grant to retire. The grant ID is returned in the * response to a CreateGrant operation.

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

    *
*/ inline bool GrantIdHasBeenSet() const { return m_grantIdHasBeenSet; } /** *

Unique identifier of the grant to retire. The grant ID is returned in the * response to a CreateGrant operation.

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

    *
*/ inline void SetGrantId(const Aws::String& value) { m_grantIdHasBeenSet = true; m_grantId = value; } /** *

Unique identifier of the grant to retire. The grant ID is returned in the * response to a CreateGrant operation.

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

    *
*/ inline void SetGrantId(Aws::String&& value) { m_grantIdHasBeenSet = true; m_grantId = std::move(value); } /** *

Unique identifier of the grant to retire. The grant ID is returned in the * response to a CreateGrant operation.

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

    *
*/ inline void SetGrantId(const char* value) { m_grantIdHasBeenSet = true; m_grantId.assign(value); } /** *

Unique identifier of the grant to retire. The grant ID is returned in the * response to a CreateGrant operation.

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

    *
*/ inline RetireGrantRequest& WithGrantId(const Aws::String& value) { SetGrantId(value); return *this;} /** *

Unique identifier of the grant to retire. The grant ID is returned in the * response to a CreateGrant operation.

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

    *
*/ inline RetireGrantRequest& WithGrantId(Aws::String&& value) { SetGrantId(std::move(value)); return *this;} /** *

Unique identifier of the grant to retire. The grant ID is returned in the * response to a CreateGrant operation.

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

    *
*/ inline RetireGrantRequest& WithGrantId(const char* value) { SetGrantId(value); return *this;} private: Aws::String m_grantToken; bool m_grantTokenHasBeenSet; Aws::String m_keyId; bool m_keyIdHasBeenSet; Aws::String m_grantId; bool m_grantIdHasBeenSet; }; } // namespace Model } // namespace KMS } // namespace Aws