/** * 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 ACMPCA { namespace Model { /** *

Describes an ASN.1 X.400 GeneralName as defined in RFC 5280. Only one of * the following naming options should be provided. Providing more than one option * results in an InvalidArgsException error.

See Also:

* AWS * API Reference

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

Represents GeneralName using an OtherName * object.

*/ inline const OtherName& GetOtherName() const{ return m_otherName; } /** *

Represents GeneralName using an OtherName * object.

*/ inline bool OtherNameHasBeenSet() const { return m_otherNameHasBeenSet; } /** *

Represents GeneralName using an OtherName * object.

*/ inline void SetOtherName(const OtherName& value) { m_otherNameHasBeenSet = true; m_otherName = value; } /** *

Represents GeneralName using an OtherName * object.

*/ inline void SetOtherName(OtherName&& value) { m_otherNameHasBeenSet = true; m_otherName = std::move(value); } /** *

Represents GeneralName using an OtherName * object.

*/ inline GeneralName& WithOtherName(const OtherName& value) { SetOtherName(value); return *this;} /** *

Represents GeneralName using an OtherName * object.

*/ inline GeneralName& WithOtherName(OtherName&& value) { SetOtherName(std::move(value)); return *this;} /** *

Represents GeneralName as an RFC 822 email * address.

*/ inline const Aws::String& GetRfc822Name() const{ return m_rfc822Name; } /** *

Represents GeneralName as an RFC 822 email * address.

*/ inline bool Rfc822NameHasBeenSet() const { return m_rfc822NameHasBeenSet; } /** *

Represents GeneralName as an RFC 822 email * address.

*/ inline void SetRfc822Name(const Aws::String& value) { m_rfc822NameHasBeenSet = true; m_rfc822Name = value; } /** *

Represents GeneralName as an RFC 822 email * address.

*/ inline void SetRfc822Name(Aws::String&& value) { m_rfc822NameHasBeenSet = true; m_rfc822Name = std::move(value); } /** *

Represents GeneralName as an RFC 822 email * address.

*/ inline void SetRfc822Name(const char* value) { m_rfc822NameHasBeenSet = true; m_rfc822Name.assign(value); } /** *

Represents GeneralName as an RFC 822 email * address.

*/ inline GeneralName& WithRfc822Name(const Aws::String& value) { SetRfc822Name(value); return *this;} /** *

Represents GeneralName as an RFC 822 email * address.

*/ inline GeneralName& WithRfc822Name(Aws::String&& value) { SetRfc822Name(std::move(value)); return *this;} /** *

Represents GeneralName as an RFC 822 email * address.

*/ inline GeneralName& WithRfc822Name(const char* value) { SetRfc822Name(value); return *this;} /** *

Represents GeneralName as a DNS name.

*/ inline const Aws::String& GetDnsName() const{ return m_dnsName; } /** *

Represents GeneralName as a DNS name.

*/ inline bool DnsNameHasBeenSet() const { return m_dnsNameHasBeenSet; } /** *

Represents GeneralName as a DNS name.

*/ inline void SetDnsName(const Aws::String& value) { m_dnsNameHasBeenSet = true; m_dnsName = value; } /** *

Represents GeneralName as a DNS name.

*/ inline void SetDnsName(Aws::String&& value) { m_dnsNameHasBeenSet = true; m_dnsName = std::move(value); } /** *

Represents GeneralName as a DNS name.

*/ inline void SetDnsName(const char* value) { m_dnsNameHasBeenSet = true; m_dnsName.assign(value); } /** *

Represents GeneralName as a DNS name.

*/ inline GeneralName& WithDnsName(const Aws::String& value) { SetDnsName(value); return *this;} /** *

Represents GeneralName as a DNS name.

*/ inline GeneralName& WithDnsName(Aws::String&& value) { SetDnsName(std::move(value)); return *this;} /** *

Represents GeneralName as a DNS name.

*/ inline GeneralName& WithDnsName(const char* value) { SetDnsName(value); return *this;} inline const ASN1Subject& GetDirectoryName() const{ return m_directoryName; } inline bool DirectoryNameHasBeenSet() const { return m_directoryNameHasBeenSet; } inline void SetDirectoryName(const ASN1Subject& value) { m_directoryNameHasBeenSet = true; m_directoryName = value; } inline void SetDirectoryName(ASN1Subject&& value) { m_directoryNameHasBeenSet = true; m_directoryName = std::move(value); } inline GeneralName& WithDirectoryName(const ASN1Subject& value) { SetDirectoryName(value); return *this;} inline GeneralName& WithDirectoryName(ASN1Subject&& value) { SetDirectoryName(std::move(value)); return *this;} /** *

Represents GeneralName as an EdiPartyName * object.

*/ inline const EdiPartyName& GetEdiPartyName() const{ return m_ediPartyName; } /** *

Represents GeneralName as an EdiPartyName * object.

*/ inline bool EdiPartyNameHasBeenSet() const { return m_ediPartyNameHasBeenSet; } /** *

Represents GeneralName as an EdiPartyName * object.

*/ inline void SetEdiPartyName(const EdiPartyName& value) { m_ediPartyNameHasBeenSet = true; m_ediPartyName = value; } /** *

Represents GeneralName as an EdiPartyName * object.

*/ inline void SetEdiPartyName(EdiPartyName&& value) { m_ediPartyNameHasBeenSet = true; m_ediPartyName = std::move(value); } /** *

Represents GeneralName as an EdiPartyName * object.

*/ inline GeneralName& WithEdiPartyName(const EdiPartyName& value) { SetEdiPartyName(value); return *this;} /** *

Represents GeneralName as an EdiPartyName * object.

*/ inline GeneralName& WithEdiPartyName(EdiPartyName&& value) { SetEdiPartyName(std::move(value)); return *this;} /** *

Represents GeneralName as a URI.

*/ inline const Aws::String& GetUniformResourceIdentifier() const{ return m_uniformResourceIdentifier; } /** *

Represents GeneralName as a URI.

*/ inline bool UniformResourceIdentifierHasBeenSet() const { return m_uniformResourceIdentifierHasBeenSet; } /** *

Represents GeneralName as a URI.

*/ inline void SetUniformResourceIdentifier(const Aws::String& value) { m_uniformResourceIdentifierHasBeenSet = true; m_uniformResourceIdentifier = value; } /** *

Represents GeneralName as a URI.

*/ inline void SetUniformResourceIdentifier(Aws::String&& value) { m_uniformResourceIdentifierHasBeenSet = true; m_uniformResourceIdentifier = std::move(value); } /** *

Represents GeneralName as a URI.

*/ inline void SetUniformResourceIdentifier(const char* value) { m_uniformResourceIdentifierHasBeenSet = true; m_uniformResourceIdentifier.assign(value); } /** *

Represents GeneralName as a URI.

*/ inline GeneralName& WithUniformResourceIdentifier(const Aws::String& value) { SetUniformResourceIdentifier(value); return *this;} /** *

Represents GeneralName as a URI.

*/ inline GeneralName& WithUniformResourceIdentifier(Aws::String&& value) { SetUniformResourceIdentifier(std::move(value)); return *this;} /** *

Represents GeneralName as a URI.

*/ inline GeneralName& WithUniformResourceIdentifier(const char* value) { SetUniformResourceIdentifier(value); return *this;} /** *

Represents GeneralName as an IPv4 or IPv6 address.

*/ inline const Aws::String& GetIpAddress() const{ return m_ipAddress; } /** *

Represents GeneralName as an IPv4 or IPv6 address.

*/ inline bool IpAddressHasBeenSet() const { return m_ipAddressHasBeenSet; } /** *

Represents GeneralName as an IPv4 or IPv6 address.

*/ inline void SetIpAddress(const Aws::String& value) { m_ipAddressHasBeenSet = true; m_ipAddress = value; } /** *

Represents GeneralName as an IPv4 or IPv6 address.

*/ inline void SetIpAddress(Aws::String&& value) { m_ipAddressHasBeenSet = true; m_ipAddress = std::move(value); } /** *

Represents GeneralName as an IPv4 or IPv6 address.

*/ inline void SetIpAddress(const char* value) { m_ipAddressHasBeenSet = true; m_ipAddress.assign(value); } /** *

Represents GeneralName as an IPv4 or IPv6 address.

*/ inline GeneralName& WithIpAddress(const Aws::String& value) { SetIpAddress(value); return *this;} /** *

Represents GeneralName as an IPv4 or IPv6 address.

*/ inline GeneralName& WithIpAddress(Aws::String&& value) { SetIpAddress(std::move(value)); return *this;} /** *

Represents GeneralName as an IPv4 or IPv6 address.

*/ inline GeneralName& WithIpAddress(const char* value) { SetIpAddress(value); return *this;} /** *

Represents GeneralName as an object identifier (OID).

*/ inline const Aws::String& GetRegisteredId() const{ return m_registeredId; } /** *

Represents GeneralName as an object identifier (OID).

*/ inline bool RegisteredIdHasBeenSet() const { return m_registeredIdHasBeenSet; } /** *

Represents GeneralName as an object identifier (OID).

*/ inline void SetRegisteredId(const Aws::String& value) { m_registeredIdHasBeenSet = true; m_registeredId = value; } /** *

Represents GeneralName as an object identifier (OID).

*/ inline void SetRegisteredId(Aws::String&& value) { m_registeredIdHasBeenSet = true; m_registeredId = std::move(value); } /** *

Represents GeneralName as an object identifier (OID).

*/ inline void SetRegisteredId(const char* value) { m_registeredIdHasBeenSet = true; m_registeredId.assign(value); } /** *

Represents GeneralName as an object identifier (OID).

*/ inline GeneralName& WithRegisteredId(const Aws::String& value) { SetRegisteredId(value); return *this;} /** *

Represents GeneralName as an object identifier (OID).

*/ inline GeneralName& WithRegisteredId(Aws::String&& value) { SetRegisteredId(std::move(value)); return *this;} /** *

Represents GeneralName as an object identifier (OID).

*/ inline GeneralName& WithRegisteredId(const char* value) { SetRegisteredId(value); return *this;} private: OtherName m_otherName; bool m_otherNameHasBeenSet = false; Aws::String m_rfc822Name; bool m_rfc822NameHasBeenSet = false; Aws::String m_dnsName; bool m_dnsNameHasBeenSet = false; ASN1Subject m_directoryName; bool m_directoryNameHasBeenSet = false; EdiPartyName m_ediPartyName; bool m_ediPartyNameHasBeenSet = false; Aws::String m_uniformResourceIdentifier; bool m_uniformResourceIdentifierHasBeenSet = false; Aws::String m_ipAddress; bool m_ipAddressHasBeenSet = false; Aws::String m_registeredId; bool m_registeredIdHasBeenSet = false; }; } // namespace Model } // namespace ACMPCA } // namespace Aws