java.lang.Object
software.amazon.awssdk.services.acmpca.model.ASN1Subject
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<ASN1Subject.Builder,ASN1Subject>

@Generated("software.amazon.awssdk:codegen") public final class ASN1Subject extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ASN1Subject.Builder,ASN1Subject>

Contains information about the certificate subject. The Subject field in the certificate identifies the entity that owns or controls the public key in the certificate. The entity can be a user, computer, device, or service. The Subject must contain an X.500 distinguished name (DN). A DN is a sequence of relative distinguished names (RDNs). The RDNs are separated by commas in the certificate.

See Also:
  • Method Details

    • country

      public final String country()

      Two-digit code that specifies the country in which the certificate subject located.

      Returns:
      Two-digit code that specifies the country in which the certificate subject located.
    • organization

      public final String organization()

      Legal name of the organization with which the certificate subject is affiliated.

      Returns:
      Legal name of the organization with which the certificate subject is affiliated.
    • organizationalUnit

      public final String organizationalUnit()

      A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.

      Returns:
      A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.
    • distinguishedNameQualifier

      public final String distinguishedNameQualifier()

      Disambiguating information for the certificate subject.

      Returns:
      Disambiguating information for the certificate subject.
    • state

      public final String state()

      State in which the subject of the certificate is located.

      Returns:
      State in which the subject of the certificate is located.
    • commonName

      public final String commonName()

      For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the length limit.

      Note: In publicly trusted certificates, the common name must be a fully qualified domain name (FQDN) associated with the certificate subject.

      Returns:
      For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the length limit.

      Note: In publicly trusted certificates, the common name must be a fully qualified domain name (FQDN) associated with the certificate subject.

    • serialNumber

      public final String serialNumber()

      The certificate serial number.

      Returns:
      The certificate serial number.
    • locality

      public final String locality()

      The locality (such as a city or town) in which the certificate subject is located.

      Returns:
      The locality (such as a city or town) in which the certificate subject is located.
    • title

      public final String title()

      A title such as Mr. or Ms., which is pre-pended to the name to refer formally to the certificate subject.

      Returns:
      A title such as Mr. or Ms., which is pre-pended to the name to refer formally to the certificate subject.
    • surname

      public final String surname()

      Family name. In the US and the UK, for example, the surname of an individual is ordered last. In Asian cultures the surname is typically ordered first.

      Returns:
      Family name. In the US and the UK, for example, the surname of an individual is ordered last. In Asian cultures the surname is typically ordered first.
    • givenName

      public final String givenName()

      First name.

      Returns:
      First name.
    • initials

      public final String initials()

      Concatenation that typically contains the first letter of the GivenName, the first letter of the middle name if one exists, and the first letter of the Surname.

      Returns:
      Concatenation that typically contains the first letter of the GivenName, the first letter of the middle name if one exists, and the first letter of the Surname.
    • pseudonym

      public final String pseudonym()

      Typically a shortened version of a longer GivenName. For example, Jonathan is often shortened to John. Elizabeth is often shortened to Beth, Liz, or Eliza.

      Returns:
      Typically a shortened version of a longer GivenName. For example, Jonathan is often shortened to John. Elizabeth is often shortened to Beth, Liz, or Eliza.
    • generationQualifier

      public final String generationQualifier()

      Typically a qualifier appended to the name of an individual. Examples include Jr. for junior, Sr. for senior, and III for third.

      Returns:
      Typically a qualifier appended to the name of an individual. Examples include Jr. for junior, Sr. for senior, and III for third.
    • hasCustomAttributes

      public final boolean hasCustomAttributes()
      For responses, this returns true if the service returned a value for the CustomAttributes property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • customAttributes

      public final List<CustomAttribute> customAttributes()

      Contains a sequence of one or more X.500 relative distinguished names (RDNs), each of which consists of an object identifier (OID) and a value. For more information, see NIST’s definition of Object Identifier (OID).

      Custom attributes cannot be used in combination with standard attributes.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasCustomAttributes() method.

      Returns:

      Contains a sequence of one or more X.500 relative distinguished names (RDNs), each of which consists of an object identifier (OID) and a value. For more information, see NIST’s definition of Object Identifier (OID).

      Custom attributes cannot be used in combination with standard attributes.

    • toBuilder

      public ASN1Subject.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<ASN1Subject.Builder,ASN1Subject>
      Returns:
      a builder for type T
    • builder

      public static ASN1Subject.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ASN1Subject.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.