/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace AccessAnalyzer { namespace Model { /** *

A proposed grant configuration for a KMS key. For more information, see CreateGrant.

See * Also:

AWS * API Reference

*/ class KmsGrantConfiguration { public: AWS_ACCESSANALYZER_API KmsGrantConfiguration(); AWS_ACCESSANALYZER_API KmsGrantConfiguration(Aws::Utils::Json::JsonView jsonValue); AWS_ACCESSANALYZER_API KmsGrantConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A list of operations that the grant permits.

*/ inline const Aws::Vector& GetOperations() const{ return m_operations; } /** *

A list of operations that the grant permits.

*/ inline bool OperationsHasBeenSet() const { return m_operationsHasBeenSet; } /** *

A list of operations that the grant permits.

*/ inline void SetOperations(const Aws::Vector& value) { m_operationsHasBeenSet = true; m_operations = value; } /** *

A list of operations that the grant permits.

*/ inline void SetOperations(Aws::Vector&& value) { m_operationsHasBeenSet = true; m_operations = std::move(value); } /** *

A list of operations that the grant permits.

*/ inline KmsGrantConfiguration& WithOperations(const Aws::Vector& value) { SetOperations(value); return *this;} /** *

A list of operations that the grant permits.

*/ inline KmsGrantConfiguration& WithOperations(Aws::Vector&& value) { SetOperations(std::move(value)); return *this;} /** *

A list of operations that the grant permits.

*/ inline KmsGrantConfiguration& AddOperations(const KmsGrantOperation& value) { m_operationsHasBeenSet = true; m_operations.push_back(value); return *this; } /** *

A list of operations that the grant permits.

*/ inline KmsGrantConfiguration& AddOperations(KmsGrantOperation&& value) { m_operationsHasBeenSet = true; m_operations.push_back(std::move(value)); return *this; } /** *

The principal that is given permission to perform the operations that the * grant permits.

*/ inline const Aws::String& GetGranteePrincipal() const{ return m_granteePrincipal; } /** *

The principal that is given permission to perform the operations that the * grant permits.

*/ inline bool GranteePrincipalHasBeenSet() const { return m_granteePrincipalHasBeenSet; } /** *

The principal that is given permission to perform the operations that the * grant permits.

*/ inline void SetGranteePrincipal(const Aws::String& value) { m_granteePrincipalHasBeenSet = true; m_granteePrincipal = value; } /** *

The principal that is given permission to perform the operations that the * grant permits.

*/ inline void SetGranteePrincipal(Aws::String&& value) { m_granteePrincipalHasBeenSet = true; m_granteePrincipal = std::move(value); } /** *

The principal that is given permission to perform the operations that the * grant permits.

*/ inline void SetGranteePrincipal(const char* value) { m_granteePrincipalHasBeenSet = true; m_granteePrincipal.assign(value); } /** *

The principal that is given permission to perform the operations that the * grant permits.

*/ inline KmsGrantConfiguration& WithGranteePrincipal(const Aws::String& value) { SetGranteePrincipal(value); return *this;} /** *

The principal that is given permission to perform the operations that the * grant permits.

*/ inline KmsGrantConfiguration& WithGranteePrincipal(Aws::String&& value) { SetGranteePrincipal(std::move(value)); return *this;} /** *

The principal that is given permission to perform the operations that the * grant permits.

*/ inline KmsGrantConfiguration& WithGranteePrincipal(const char* value) { SetGranteePrincipal(value); return *this;} /** *

The principal that is given permission to retire the grant by using RetireGrant * operation.

*/ inline const Aws::String& GetRetiringPrincipal() const{ return m_retiringPrincipal; } /** *

The principal that is given permission to retire the grant by using RetireGrant * operation.

*/ inline bool RetiringPrincipalHasBeenSet() const { return m_retiringPrincipalHasBeenSet; } /** *

The principal that is given permission to retire the grant by using RetireGrant * operation.

*/ inline void SetRetiringPrincipal(const Aws::String& value) { m_retiringPrincipalHasBeenSet = true; m_retiringPrincipal = value; } /** *

The principal that is given permission to retire the grant by using RetireGrant * operation.

*/ inline void SetRetiringPrincipal(Aws::String&& value) { m_retiringPrincipalHasBeenSet = true; m_retiringPrincipal = std::move(value); } /** *

The principal that is given permission to retire the grant by using RetireGrant * operation.

*/ inline void SetRetiringPrincipal(const char* value) { m_retiringPrincipalHasBeenSet = true; m_retiringPrincipal.assign(value); } /** *

The principal that is given permission to retire the grant by using RetireGrant * operation.

*/ inline KmsGrantConfiguration& WithRetiringPrincipal(const Aws::String& value) { SetRetiringPrincipal(value); return *this;} /** *

The principal that is given permission to retire the grant by using RetireGrant * operation.

*/ inline KmsGrantConfiguration& WithRetiringPrincipal(Aws::String&& value) { SetRetiringPrincipal(std::move(value)); return *this;} /** *

The principal that is given permission to retire the grant by using RetireGrant * operation.

*/ inline KmsGrantConfiguration& WithRetiringPrincipal(const char* value) { SetRetiringPrincipal(value); return *this;} /** *

Use this structure to propose allowing cryptographic * operations in the grant only when the operation request includes the * specified encryption * context.

*/ inline const KmsGrantConstraints& GetConstraints() const{ return m_constraints; } /** *

Use this structure to propose allowing cryptographic * operations in the grant only when the operation request includes the * specified encryption * context.

*/ inline bool ConstraintsHasBeenSet() const { return m_constraintsHasBeenSet; } /** *

Use this structure to propose allowing cryptographic * operations in the grant only when the operation request includes the * specified encryption * context.

*/ inline void SetConstraints(const KmsGrantConstraints& value) { m_constraintsHasBeenSet = true; m_constraints = value; } /** *

Use this structure to propose allowing cryptographic * operations in the grant only when the operation request includes the * specified encryption * context.

*/ inline void SetConstraints(KmsGrantConstraints&& value) { m_constraintsHasBeenSet = true; m_constraints = std::move(value); } /** *

Use this structure to propose allowing cryptographic * operations in the grant only when the operation request includes the * specified encryption * context.

*/ inline KmsGrantConfiguration& WithConstraints(const KmsGrantConstraints& value) { SetConstraints(value); return *this;} /** *

Use this structure to propose allowing cryptographic * operations in the grant only when the operation request includes the * specified encryption * context.

*/ inline KmsGrantConfiguration& WithConstraints(KmsGrantConstraints&& value) { SetConstraints(std::move(value)); return *this;} /** *

The Amazon Web Services account under which the grant was issued. The * account is used to propose KMS grants issued by accounts other than the owner of * the key.

*/ inline const Aws::String& GetIssuingAccount() const{ return m_issuingAccount; } /** *

The Amazon Web Services account under which the grant was issued. The * account is used to propose KMS grants issued by accounts other than the owner of * the key.

*/ inline bool IssuingAccountHasBeenSet() const { return m_issuingAccountHasBeenSet; } /** *

The Amazon Web Services account under which the grant was issued. The * account is used to propose KMS grants issued by accounts other than the owner of * the key.

*/ inline void SetIssuingAccount(const Aws::String& value) { m_issuingAccountHasBeenSet = true; m_issuingAccount = value; } /** *

The Amazon Web Services account under which the grant was issued. The * account is used to propose KMS grants issued by accounts other than the owner of * the key.

*/ inline void SetIssuingAccount(Aws::String&& value) { m_issuingAccountHasBeenSet = true; m_issuingAccount = std::move(value); } /** *

The Amazon Web Services account under which the grant was issued. The * account is used to propose KMS grants issued by accounts other than the owner of * the key.

*/ inline void SetIssuingAccount(const char* value) { m_issuingAccountHasBeenSet = true; m_issuingAccount.assign(value); } /** *

The Amazon Web Services account under which the grant was issued. The * account is used to propose KMS grants issued by accounts other than the owner of * the key.

*/ inline KmsGrantConfiguration& WithIssuingAccount(const Aws::String& value) { SetIssuingAccount(value); return *this;} /** *

The Amazon Web Services account under which the grant was issued. The * account is used to propose KMS grants issued by accounts other than the owner of * the key.

*/ inline KmsGrantConfiguration& WithIssuingAccount(Aws::String&& value) { SetIssuingAccount(std::move(value)); return *this;} /** *

The Amazon Web Services account under which the grant was issued. The * account is used to propose KMS grants issued by accounts other than the owner of * the key.

*/ inline KmsGrantConfiguration& WithIssuingAccount(const char* value) { SetIssuingAccount(value); return *this;} private: Aws::Vector m_operations; bool m_operationsHasBeenSet = false; Aws::String m_granteePrincipal; bool m_granteePrincipalHasBeenSet = false; Aws::String m_retiringPrincipal; bool m_retiringPrincipalHasBeenSet = false; KmsGrantConstraints m_constraints; bool m_constraintsHasBeenSet = false; Aws::String m_issuingAccount; bool m_issuingAccountHasBeenSet = false; }; } // namespace Model } // namespace AccessAnalyzer } // namespace Aws