Class ASN1Subject
- 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
Subjectfield 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. TheSubjectmust 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceASN1Subject.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ASN1Subject.Builderbuilder()StringcommonName()For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the length limit.Stringcountry()Two-digit code that specifies the country in which the certificate subject located.List<CustomAttribute>customAttributes()StringdistinguishedNameQualifier()Disambiguating information for the certificate subject.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)StringgenerationQualifier()Typically a qualifier appended to the name of an individual.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)StringgivenName()First name.booleanhasCustomAttributes()For responses, this returns true if the service returned a value for the CustomAttributes property.inthashCode()Stringinitials()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.Stringlocality()The locality (such as a city or town) in which the certificate subject is located.Stringorganization()Legal name of the organization with which the certificate subject is affiliated.StringorganizationalUnit()A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.Stringpseudonym()Typically a shortened version of a longer GivenName.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends ASN1Subject.Builder>serializableBuilderClass()StringserialNumber()The certificate serial number.Stringstate()State in which the subject of the certificate is located.Stringsurname()Family name.Stringtitle()A title such as Mr.ASN1Subject.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
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 theisEmpty()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()
- Specified by:
toBuilderin interfaceToCopyableBuilder<ASN1Subject.Builder,ASN1Subject>
-
builder
public static ASN1Subject.Builder builder()
-
serializableBuilderClass
public static Class<? extends ASN1Subject.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
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.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-