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

Contains X.509 extension information for a certificate.

See * Also:

AWS * API Reference

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

Contains a sequence of one or more policy information terms, each of which * consists of an object identifier (OID) and optional qualifiers. For more * information, see NIST's definition of Object Identifier * (OID).

In an end-entity certificate, these terms indicate the policy * under which the certificate was issued and the purposes for which it may be * used. In a CA certificate, these terms limit the set of policies for * certification paths that include this certificate.

*/ inline const Aws::Vector& GetCertificatePolicies() const{ return m_certificatePolicies; } /** *

Contains a sequence of one or more policy information terms, each of which * consists of an object identifier (OID) and optional qualifiers. For more * information, see NIST's definition of Object Identifier * (OID).

In an end-entity certificate, these terms indicate the policy * under which the certificate was issued and the purposes for which it may be * used. In a CA certificate, these terms limit the set of policies for * certification paths that include this certificate.

*/ inline bool CertificatePoliciesHasBeenSet() const { return m_certificatePoliciesHasBeenSet; } /** *

Contains a sequence of one or more policy information terms, each of which * consists of an object identifier (OID) and optional qualifiers. For more * information, see NIST's definition of Object Identifier * (OID).

In an end-entity certificate, these terms indicate the policy * under which the certificate was issued and the purposes for which it may be * used. In a CA certificate, these terms limit the set of policies for * certification paths that include this certificate.

*/ inline void SetCertificatePolicies(const Aws::Vector& value) { m_certificatePoliciesHasBeenSet = true; m_certificatePolicies = value; } /** *

Contains a sequence of one or more policy information terms, each of which * consists of an object identifier (OID) and optional qualifiers. For more * information, see NIST's definition of Object Identifier * (OID).

In an end-entity certificate, these terms indicate the policy * under which the certificate was issued and the purposes for which it may be * used. In a CA certificate, these terms limit the set of policies for * certification paths that include this certificate.

*/ inline void SetCertificatePolicies(Aws::Vector&& value) { m_certificatePoliciesHasBeenSet = true; m_certificatePolicies = std::move(value); } /** *

Contains a sequence of one or more policy information terms, each of which * consists of an object identifier (OID) and optional qualifiers. For more * information, see NIST's definition of Object Identifier * (OID).

In an end-entity certificate, these terms indicate the policy * under which the certificate was issued and the purposes for which it may be * used. In a CA certificate, these terms limit the set of policies for * certification paths that include this certificate.

*/ inline Extensions& WithCertificatePolicies(const Aws::Vector& value) { SetCertificatePolicies(value); return *this;} /** *

Contains a sequence of one or more policy information terms, each of which * consists of an object identifier (OID) and optional qualifiers. For more * information, see NIST's definition of Object Identifier * (OID).

In an end-entity certificate, these terms indicate the policy * under which the certificate was issued and the purposes for which it may be * used. In a CA certificate, these terms limit the set of policies for * certification paths that include this certificate.

*/ inline Extensions& WithCertificatePolicies(Aws::Vector&& value) { SetCertificatePolicies(std::move(value)); return *this;} /** *

Contains a sequence of one or more policy information terms, each of which * consists of an object identifier (OID) and optional qualifiers. For more * information, see NIST's definition of Object Identifier * (OID).

In an end-entity certificate, these terms indicate the policy * under which the certificate was issued and the purposes for which it may be * used. In a CA certificate, these terms limit the set of policies for * certification paths that include this certificate.

*/ inline Extensions& AddCertificatePolicies(const PolicyInformation& value) { m_certificatePoliciesHasBeenSet = true; m_certificatePolicies.push_back(value); return *this; } /** *

Contains a sequence of one or more policy information terms, each of which * consists of an object identifier (OID) and optional qualifiers. For more * information, see NIST's definition of Object Identifier * (OID).

In an end-entity certificate, these terms indicate the policy * under which the certificate was issued and the purposes for which it may be * used. In a CA certificate, these terms limit the set of policies for * certification paths that include this certificate.

*/ inline Extensions& AddCertificatePolicies(PolicyInformation&& value) { m_certificatePoliciesHasBeenSet = true; m_certificatePolicies.push_back(std::move(value)); return *this; } /** *

Specifies additional purposes for which the certified public key may be used * other than basic purposes indicated in the KeyUsage extension.

*/ inline const Aws::Vector& GetExtendedKeyUsage() const{ return m_extendedKeyUsage; } /** *

Specifies additional purposes for which the certified public key may be used * other than basic purposes indicated in the KeyUsage extension.

*/ inline bool ExtendedKeyUsageHasBeenSet() const { return m_extendedKeyUsageHasBeenSet; } /** *

Specifies additional purposes for which the certified public key may be used * other than basic purposes indicated in the KeyUsage extension.

*/ inline void SetExtendedKeyUsage(const Aws::Vector& value) { m_extendedKeyUsageHasBeenSet = true; m_extendedKeyUsage = value; } /** *

Specifies additional purposes for which the certified public key may be used * other than basic purposes indicated in the KeyUsage extension.

*/ inline void SetExtendedKeyUsage(Aws::Vector&& value) { m_extendedKeyUsageHasBeenSet = true; m_extendedKeyUsage = std::move(value); } /** *

Specifies additional purposes for which the certified public key may be used * other than basic purposes indicated in the KeyUsage extension.

*/ inline Extensions& WithExtendedKeyUsage(const Aws::Vector& value) { SetExtendedKeyUsage(value); return *this;} /** *

Specifies additional purposes for which the certified public key may be used * other than basic purposes indicated in the KeyUsage extension.

*/ inline Extensions& WithExtendedKeyUsage(Aws::Vector&& value) { SetExtendedKeyUsage(std::move(value)); return *this;} /** *

Specifies additional purposes for which the certified public key may be used * other than basic purposes indicated in the KeyUsage extension.

*/ inline Extensions& AddExtendedKeyUsage(const ExtendedKeyUsage& value) { m_extendedKeyUsageHasBeenSet = true; m_extendedKeyUsage.push_back(value); return *this; } /** *

Specifies additional purposes for which the certified public key may be used * other than basic purposes indicated in the KeyUsage extension.

*/ inline Extensions& AddExtendedKeyUsage(ExtendedKeyUsage&& value) { m_extendedKeyUsageHasBeenSet = true; m_extendedKeyUsage.push_back(std::move(value)); return *this; } inline const KeyUsage& GetKeyUsage() const{ return m_keyUsage; } inline bool KeyUsageHasBeenSet() const { return m_keyUsageHasBeenSet; } inline void SetKeyUsage(const KeyUsage& value) { m_keyUsageHasBeenSet = true; m_keyUsage = value; } inline void SetKeyUsage(KeyUsage&& value) { m_keyUsageHasBeenSet = true; m_keyUsage = std::move(value); } inline Extensions& WithKeyUsage(const KeyUsage& value) { SetKeyUsage(value); return *this;} inline Extensions& WithKeyUsage(KeyUsage&& value) { SetKeyUsage(std::move(value)); return *this;} /** *

The subject alternative name extension allows identities to be bound to the * subject of the certificate. These identities may be included in addition to or * in place of the identity in the subject field of the certificate.

*/ inline const Aws::Vector& GetSubjectAlternativeNames() const{ return m_subjectAlternativeNames; } /** *

The subject alternative name extension allows identities to be bound to the * subject of the certificate. These identities may be included in addition to or * in place of the identity in the subject field of the certificate.

*/ inline bool SubjectAlternativeNamesHasBeenSet() const { return m_subjectAlternativeNamesHasBeenSet; } /** *

The subject alternative name extension allows identities to be bound to the * subject of the certificate. These identities may be included in addition to or * in place of the identity in the subject field of the certificate.

*/ inline void SetSubjectAlternativeNames(const Aws::Vector& value) { m_subjectAlternativeNamesHasBeenSet = true; m_subjectAlternativeNames = value; } /** *

The subject alternative name extension allows identities to be bound to the * subject of the certificate. These identities may be included in addition to or * in place of the identity in the subject field of the certificate.

*/ inline void SetSubjectAlternativeNames(Aws::Vector&& value) { m_subjectAlternativeNamesHasBeenSet = true; m_subjectAlternativeNames = std::move(value); } /** *

The subject alternative name extension allows identities to be bound to the * subject of the certificate. These identities may be included in addition to or * in place of the identity in the subject field of the certificate.

*/ inline Extensions& WithSubjectAlternativeNames(const Aws::Vector& value) { SetSubjectAlternativeNames(value); return *this;} /** *

The subject alternative name extension allows identities to be bound to the * subject of the certificate. These identities may be included in addition to or * in place of the identity in the subject field of the certificate.

*/ inline Extensions& WithSubjectAlternativeNames(Aws::Vector&& value) { SetSubjectAlternativeNames(std::move(value)); return *this;} /** *

The subject alternative name extension allows identities to be bound to the * subject of the certificate. These identities may be included in addition to or * in place of the identity in the subject field of the certificate.

*/ inline Extensions& AddSubjectAlternativeNames(const GeneralName& value) { m_subjectAlternativeNamesHasBeenSet = true; m_subjectAlternativeNames.push_back(value); return *this; } /** *

The subject alternative name extension allows identities to be bound to the * subject of the certificate. These identities may be included in addition to or * in place of the identity in the subject field of the certificate.

*/ inline Extensions& AddSubjectAlternativeNames(GeneralName&& value) { m_subjectAlternativeNamesHasBeenSet = true; m_subjectAlternativeNames.push_back(std::move(value)); return *this; } /** *

Contains a sequence of one or more X.509 extensions, each of which * consists of an object identifier (OID), a base64-encoded value, and the critical * flag. For more information, see the Global * OID reference database.

*/ inline const Aws::Vector& GetCustomExtensions() const{ return m_customExtensions; } /** *

Contains a sequence of one or more X.509 extensions, each of which * consists of an object identifier (OID), a base64-encoded value, and the critical * flag. For more information, see the Global * OID reference database.

*/ inline bool CustomExtensionsHasBeenSet() const { return m_customExtensionsHasBeenSet; } /** *

Contains a sequence of one or more X.509 extensions, each of which * consists of an object identifier (OID), a base64-encoded value, and the critical * flag. For more information, see the Global * OID reference database.

*/ inline void SetCustomExtensions(const Aws::Vector& value) { m_customExtensionsHasBeenSet = true; m_customExtensions = value; } /** *

Contains a sequence of one or more X.509 extensions, each of which * consists of an object identifier (OID), a base64-encoded value, and the critical * flag. For more information, see the Global * OID reference database.

*/ inline void SetCustomExtensions(Aws::Vector&& value) { m_customExtensionsHasBeenSet = true; m_customExtensions = std::move(value); } /** *

Contains a sequence of one or more X.509 extensions, each of which * consists of an object identifier (OID), a base64-encoded value, and the critical * flag. For more information, see the Global * OID reference database.

*/ inline Extensions& WithCustomExtensions(const Aws::Vector& value) { SetCustomExtensions(value); return *this;} /** *

Contains a sequence of one or more X.509 extensions, each of which * consists of an object identifier (OID), a base64-encoded value, and the critical * flag. For more information, see the Global * OID reference database.

*/ inline Extensions& WithCustomExtensions(Aws::Vector&& value) { SetCustomExtensions(std::move(value)); return *this;} /** *

Contains a sequence of one or more X.509 extensions, each of which * consists of an object identifier (OID), a base64-encoded value, and the critical * flag. For more information, see the Global * OID reference database.

*/ inline Extensions& AddCustomExtensions(const CustomExtension& value) { m_customExtensionsHasBeenSet = true; m_customExtensions.push_back(value); return *this; } /** *

Contains a sequence of one or more X.509 extensions, each of which * consists of an object identifier (OID), a base64-encoded value, and the critical * flag. For more information, see the Global * OID reference database.

*/ inline Extensions& AddCustomExtensions(CustomExtension&& value) { m_customExtensionsHasBeenSet = true; m_customExtensions.push_back(std::move(value)); return *this; } private: Aws::Vector m_certificatePolicies; bool m_certificatePoliciesHasBeenSet = false; Aws::Vector m_extendedKeyUsage; bool m_extendedKeyUsageHasBeenSet = false; KeyUsage m_keyUsage; bool m_keyUsageHasBeenSet = false; Aws::Vector m_subjectAlternativeNames; bool m_subjectAlternativeNamesHasBeenSet = false; Aws::Vector m_customExtensions; bool m_customExtensionsHasBeenSet = false; }; } // namespace Model } // namespace ACMPCA } // namespace Aws