/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ACMPCA { namespace Model { /** *

Defines one or more purposes for which the key contained in the certificate * can be used. Default value for each option is false.

See Also:

* AWS * API Reference

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

Key can be used for digital signing.

*/ inline bool GetDigitalSignature() const{ return m_digitalSignature; } /** *

Key can be used for digital signing.

*/ inline bool DigitalSignatureHasBeenSet() const { return m_digitalSignatureHasBeenSet; } /** *

Key can be used for digital signing.

*/ inline void SetDigitalSignature(bool value) { m_digitalSignatureHasBeenSet = true; m_digitalSignature = value; } /** *

Key can be used for digital signing.

*/ inline KeyUsage& WithDigitalSignature(bool value) { SetDigitalSignature(value); return *this;} /** *

Key can be used for non-repudiation.

*/ inline bool GetNonRepudiation() const{ return m_nonRepudiation; } /** *

Key can be used for non-repudiation.

*/ inline bool NonRepudiationHasBeenSet() const { return m_nonRepudiationHasBeenSet; } /** *

Key can be used for non-repudiation.

*/ inline void SetNonRepudiation(bool value) { m_nonRepudiationHasBeenSet = true; m_nonRepudiation = value; } /** *

Key can be used for non-repudiation.

*/ inline KeyUsage& WithNonRepudiation(bool value) { SetNonRepudiation(value); return *this;} /** *

Key can be used to encipher data.

*/ inline bool GetKeyEncipherment() const{ return m_keyEncipherment; } /** *

Key can be used to encipher data.

*/ inline bool KeyEnciphermentHasBeenSet() const { return m_keyEnciphermentHasBeenSet; } /** *

Key can be used to encipher data.

*/ inline void SetKeyEncipherment(bool value) { m_keyEnciphermentHasBeenSet = true; m_keyEncipherment = value; } /** *

Key can be used to encipher data.

*/ inline KeyUsage& WithKeyEncipherment(bool value) { SetKeyEncipherment(value); return *this;} /** *

Key can be used to decipher data.

*/ inline bool GetDataEncipherment() const{ return m_dataEncipherment; } /** *

Key can be used to decipher data.

*/ inline bool DataEnciphermentHasBeenSet() const { return m_dataEnciphermentHasBeenSet; } /** *

Key can be used to decipher data.

*/ inline void SetDataEncipherment(bool value) { m_dataEnciphermentHasBeenSet = true; m_dataEncipherment = value; } /** *

Key can be used to decipher data.

*/ inline KeyUsage& WithDataEncipherment(bool value) { SetDataEncipherment(value); return *this;} /** *

Key can be used in a key-agreement protocol.

*/ inline bool GetKeyAgreement() const{ return m_keyAgreement; } /** *

Key can be used in a key-agreement protocol.

*/ inline bool KeyAgreementHasBeenSet() const { return m_keyAgreementHasBeenSet; } /** *

Key can be used in a key-agreement protocol.

*/ inline void SetKeyAgreement(bool value) { m_keyAgreementHasBeenSet = true; m_keyAgreement = value; } /** *

Key can be used in a key-agreement protocol.

*/ inline KeyUsage& WithKeyAgreement(bool value) { SetKeyAgreement(value); return *this;} /** *

Key can be used to sign certificates.

*/ inline bool GetKeyCertSign() const{ return m_keyCertSign; } /** *

Key can be used to sign certificates.

*/ inline bool KeyCertSignHasBeenSet() const { return m_keyCertSignHasBeenSet; } /** *

Key can be used to sign certificates.

*/ inline void SetKeyCertSign(bool value) { m_keyCertSignHasBeenSet = true; m_keyCertSign = value; } /** *

Key can be used to sign certificates.

*/ inline KeyUsage& WithKeyCertSign(bool value) { SetKeyCertSign(value); return *this;} /** *

Key can be used to sign CRLs.

*/ inline bool GetCRLSign() const{ return m_cRLSign; } /** *

Key can be used to sign CRLs.

*/ inline bool CRLSignHasBeenSet() const { return m_cRLSignHasBeenSet; } /** *

Key can be used to sign CRLs.

*/ inline void SetCRLSign(bool value) { m_cRLSignHasBeenSet = true; m_cRLSign = value; } /** *

Key can be used to sign CRLs.

*/ inline KeyUsage& WithCRLSign(bool value) { SetCRLSign(value); return *this;} /** *

Key can be used only to encipher data.

*/ inline bool GetEncipherOnly() const{ return m_encipherOnly; } /** *

Key can be used only to encipher data.

*/ inline bool EncipherOnlyHasBeenSet() const { return m_encipherOnlyHasBeenSet; } /** *

Key can be used only to encipher data.

*/ inline void SetEncipherOnly(bool value) { m_encipherOnlyHasBeenSet = true; m_encipherOnly = value; } /** *

Key can be used only to encipher data.

*/ inline KeyUsage& WithEncipherOnly(bool value) { SetEncipherOnly(value); return *this;} /** *

Key can be used only to decipher data.

*/ inline bool GetDecipherOnly() const{ return m_decipherOnly; } /** *

Key can be used only to decipher data.

*/ inline bool DecipherOnlyHasBeenSet() const { return m_decipherOnlyHasBeenSet; } /** *

Key can be used only to decipher data.

*/ inline void SetDecipherOnly(bool value) { m_decipherOnlyHasBeenSet = true; m_decipherOnly = value; } /** *

Key can be used only to decipher data.

*/ inline KeyUsage& WithDecipherOnly(bool value) { SetDecipherOnly(value); return *this;} private: bool m_digitalSignature; bool m_digitalSignatureHasBeenSet = false; bool m_nonRepudiation; bool m_nonRepudiationHasBeenSet = false; bool m_keyEncipherment; bool m_keyEnciphermentHasBeenSet = false; bool m_dataEncipherment; bool m_dataEnciphermentHasBeenSet = false; bool m_keyAgreement; bool m_keyAgreementHasBeenSet = false; bool m_keyCertSign; bool m_keyCertSignHasBeenSet = false; bool m_cRLSign; bool m_cRLSignHasBeenSet = false; bool m_encipherOnly; bool m_encipherOnlyHasBeenSet = false; bool m_decipherOnly; bool m_decipherOnlyHasBeenSet = false; }; } // namespace Model } // namespace ACMPCA } // namespace Aws