/** * 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 namespace Aws { namespace KMS { namespace Model { /** */ class VerifyMacRequest : public KMSRequest { public: AWS_KMS_API VerifyMacRequest(); // 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 "VerifyMac"; } AWS_KMS_API Aws::String SerializePayload() const override; AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The message that will be used in the verification. Enter the same message * that was used to generate the HMAC.

GenerateMac and * VerifyMac do not provide special handling for message digests. If * you generated an HMAC for a hash digest of a message, you must verify the HMAC * for the same hash digest.

*/ inline const Aws::Utils::CryptoBuffer& GetMessage() const{ return m_message; } /** *

The message that will be used in the verification. Enter the same message * that was used to generate the HMAC.

GenerateMac and * VerifyMac do not provide special handling for message digests. If * you generated an HMAC for a hash digest of a message, you must verify the HMAC * for the same hash digest.

*/ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } /** *

The message that will be used in the verification. Enter the same message * that was used to generate the HMAC.

GenerateMac and * VerifyMac do not provide special handling for message digests. If * you generated an HMAC for a hash digest of a message, you must verify the HMAC * for the same hash digest.

*/ inline void SetMessage(const Aws::Utils::CryptoBuffer& value) { m_messageHasBeenSet = true; m_message = value; } /** *

The message that will be used in the verification. Enter the same message * that was used to generate the HMAC.

GenerateMac and * VerifyMac do not provide special handling for message digests. If * you generated an HMAC for a hash digest of a message, you must verify the HMAC * for the same hash digest.

*/ inline void SetMessage(Aws::Utils::CryptoBuffer&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } /** *

The message that will be used in the verification. Enter the same message * that was used to generate the HMAC.

GenerateMac and * VerifyMac do not provide special handling for message digests. If * you generated an HMAC for a hash digest of a message, you must verify the HMAC * for the same hash digest.

*/ inline VerifyMacRequest& WithMessage(const Aws::Utils::CryptoBuffer& value) { SetMessage(value); return *this;} /** *

The message that will be used in the verification. Enter the same message * that was used to generate the HMAC.

GenerateMac and * VerifyMac do not provide special handling for message digests. If * you generated an HMAC for a hash digest of a message, you must verify the HMAC * for the same hash digest.

*/ inline VerifyMacRequest& WithMessage(Aws::Utils::CryptoBuffer&& value) { SetMessage(std::move(value)); return *this;} /** *

The KMS key that will be used in the verification.

Enter a key ID of * the KMS key that was used to generate the HMAC. If you identify a different KMS * key, the VerifyMac operation fails.

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

The KMS key that will be used in the verification.

Enter a key ID of * the KMS key that was used to generate the HMAC. If you identify a different KMS * key, the VerifyMac operation fails.

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

The KMS key that will be used in the verification.

Enter a key ID of * the KMS key that was used to generate the HMAC. If you identify a different KMS * key, the VerifyMac operation fails.

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

The KMS key that will be used in the verification.

Enter a key ID of * the KMS key that was used to generate the HMAC. If you identify a different KMS * key, the VerifyMac operation fails.

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

The KMS key that will be used in the verification.

Enter a key ID of * the KMS key that was used to generate the HMAC. If you identify a different KMS * key, the VerifyMac operation fails.

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

The KMS key that will be used in the verification.

Enter a key ID of * the KMS key that was used to generate the HMAC. If you identify a different KMS * key, the VerifyMac operation fails.

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

The KMS key that will be used in the verification.

Enter a key ID of * the KMS key that was used to generate the HMAC. If you identify a different KMS * key, the VerifyMac operation fails.

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

The KMS key that will be used in the verification.

Enter a key ID of * the KMS key that was used to generate the HMAC. If you identify a different KMS * key, the VerifyMac operation fails.

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

The MAC algorithm that will be used in the verification. Enter the same MAC * algorithm that was used to compute the HMAC. This algorithm must be supported by * the HMAC KMS key identified by the KeyId parameter.

*/ inline const MacAlgorithmSpec& GetMacAlgorithm() const{ return m_macAlgorithm; } /** *

The MAC algorithm that will be used in the verification. Enter the same MAC * algorithm that was used to compute the HMAC. This algorithm must be supported by * the HMAC KMS key identified by the KeyId parameter.

*/ inline bool MacAlgorithmHasBeenSet() const { return m_macAlgorithmHasBeenSet; } /** *

The MAC algorithm that will be used in the verification. Enter the same MAC * algorithm that was used to compute the HMAC. This algorithm must be supported by * the HMAC KMS key identified by the KeyId parameter.

*/ inline void SetMacAlgorithm(const MacAlgorithmSpec& value) { m_macAlgorithmHasBeenSet = true; m_macAlgorithm = value; } /** *

The MAC algorithm that will be used in the verification. Enter the same MAC * algorithm that was used to compute the HMAC. This algorithm must be supported by * the HMAC KMS key identified by the KeyId parameter.

*/ inline void SetMacAlgorithm(MacAlgorithmSpec&& value) { m_macAlgorithmHasBeenSet = true; m_macAlgorithm = std::move(value); } /** *

The MAC algorithm that will be used in the verification. Enter the same MAC * algorithm that was used to compute the HMAC. This algorithm must be supported by * the HMAC KMS key identified by the KeyId parameter.

*/ inline VerifyMacRequest& WithMacAlgorithm(const MacAlgorithmSpec& value) { SetMacAlgorithm(value); return *this;} /** *

The MAC algorithm that will be used in the verification. Enter the same MAC * algorithm that was used to compute the HMAC. This algorithm must be supported by * the HMAC KMS key identified by the KeyId parameter.

*/ inline VerifyMacRequest& WithMacAlgorithm(MacAlgorithmSpec&& value) { SetMacAlgorithm(std::move(value)); return *this;} /** *

The HMAC to verify. Enter the HMAC that was generated by the * GenerateMac operation when you specified the same message, HMAC KMS key, * and MAC algorithm as the values specified in this request.

*/ inline const Aws::Utils::ByteBuffer& GetMac() const{ return m_mac; } /** *

The HMAC to verify. Enter the HMAC that was generated by the * GenerateMac operation when you specified the same message, HMAC KMS key, * and MAC algorithm as the values specified in this request.

*/ inline bool MacHasBeenSet() const { return m_macHasBeenSet; } /** *

The HMAC to verify. Enter the HMAC that was generated by the * GenerateMac operation when you specified the same message, HMAC KMS key, * and MAC algorithm as the values specified in this request.

*/ inline void SetMac(const Aws::Utils::ByteBuffer& value) { m_macHasBeenSet = true; m_mac = value; } /** *

The HMAC to verify. Enter the HMAC that was generated by the * GenerateMac operation when you specified the same message, HMAC KMS key, * and MAC algorithm as the values specified in this request.

*/ inline void SetMac(Aws::Utils::ByteBuffer&& value) { m_macHasBeenSet = true; m_mac = std::move(value); } /** *

The HMAC to verify. Enter the HMAC that was generated by the * GenerateMac operation when you specified the same message, HMAC KMS key, * and MAC algorithm as the values specified in this request.

*/ inline VerifyMacRequest& WithMac(const Aws::Utils::ByteBuffer& value) { SetMac(value); return *this;} /** *

The HMAC to verify. Enter the HMAC that was generated by the * GenerateMac operation when you specified the same message, HMAC KMS key, * and MAC algorithm as the values specified in this request.

*/ inline VerifyMacRequest& WithMac(Aws::Utils::ByteBuffer&& value) { SetMac(std::move(value)); return *this;} /** *

A list of grant tokens.

Use a grant token when your permission to call * this operation comes from a new grant that has not yet achieved eventual * consistency. For more information, see Grant * token and Using * a grant token in the Key Management Service Developer Guide.

*/ inline const Aws::Vector& GetGrantTokens() const{ return m_grantTokens; } /** *

A list of grant tokens.

Use a grant token when your permission to call * this operation comes from a new grant that has not yet achieved eventual * consistency. For more information, see Grant * token and Using * a grant token in the Key Management Service Developer Guide.

*/ inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; } /** *

A list of grant tokens.

Use a grant token when your permission to call * this operation comes from a new grant that has not yet achieved eventual * consistency. For more information, see Grant * token and Using * a grant token in the Key Management Service Developer Guide.

*/ inline void SetGrantTokens(const Aws::Vector& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; } /** *

A list of grant tokens.

Use a grant token when your permission to call * this operation comes from a new grant that has not yet achieved eventual * consistency. For more information, see Grant * token and Using * a grant token in the Key Management Service Developer Guide.

*/ inline void SetGrantTokens(Aws::Vector&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::move(value); } /** *

A list of grant tokens.

Use a grant token when your permission to call * this operation comes from a new grant that has not yet achieved eventual * consistency. For more information, see Grant * token and Using * a grant token in the Key Management Service Developer Guide.

*/ inline VerifyMacRequest& WithGrantTokens(const Aws::Vector& value) { SetGrantTokens(value); return *this;} /** *

A list of grant tokens.

Use a grant token when your permission to call * this operation comes from a new grant that has not yet achieved eventual * consistency. For more information, see Grant * token and Using * a grant token in the Key Management Service Developer Guide.

*/ inline VerifyMacRequest& WithGrantTokens(Aws::Vector&& value) { SetGrantTokens(std::move(value)); return *this;} /** *

A list of grant tokens.

Use a grant token when your permission to call * this operation comes from a new grant that has not yet achieved eventual * consistency. For more information, see Grant * token and Using * a grant token in the Key Management Service Developer Guide.

*/ inline VerifyMacRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; } /** *

A list of grant tokens.

Use a grant token when your permission to call * this operation comes from a new grant that has not yet achieved eventual * consistency. For more information, see Grant * token and Using * a grant token in the Key Management Service Developer Guide.

*/ inline VerifyMacRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(std::move(value)); return *this; } /** *

A list of grant tokens.

Use a grant token when your permission to call * this operation comes from a new grant that has not yet achieved eventual * consistency. For more information, see Grant * token and Using * a grant token in the Key Management Service Developer Guide.

*/ inline VerifyMacRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; } /** *

Checks if your request will succeed. DryRun is an optional * parameter.

To learn more about how to use this parameter, see Testing * your KMS API calls in the Key Management Service Developer Guide.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks if your request will succeed. DryRun is an optional * parameter.

To learn more about how to use this parameter, see Testing * your KMS API calls in the Key Management Service Developer Guide.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks if your request will succeed. DryRun is an optional * parameter.

To learn more about how to use this parameter, see Testing * your KMS API calls in the Key Management Service Developer Guide.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks if your request will succeed. DryRun is an optional * parameter.

To learn more about how to use this parameter, see Testing * your KMS API calls in the Key Management Service Developer Guide.

*/ inline VerifyMacRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: Aws::Utils::CryptoBuffer m_message; bool m_messageHasBeenSet = false; Aws::String m_keyId; bool m_keyIdHasBeenSet = false; MacAlgorithmSpec m_macAlgorithm; bool m_macAlgorithmHasBeenSet = false; Aws::Utils::ByteBuffer m_mac; bool m_macHasBeenSet = false; Aws::Vector m_grantTokens; bool m_grantTokensHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; }; } // namespace Model } // namespace KMS } // namespace Aws