Class SubjectAltNames.Builder (2.18.0)

public static final class SubjectAltNames.Builder extends GeneratedMessageV3.Builder<SubjectAltNames.Builder> implements SubjectAltNamesOrBuilder

SubjectAltNames corresponds to a more modern way of listing what the asserted identity is in a certificate (i.e., compared to the "common name" in the distinguished name).

Protobuf type google.cloud.security.privateca.v1beta1.SubjectAltNames

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllCustomSans(Iterable<? extends X509Extension> values)

public SubjectAltNames.Builder addAllCustomSans(Iterable<? extends X509Extension> values)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.security.privateca.v1beta1.X509Extension>
Returns
TypeDescription
SubjectAltNames.Builder

addAllDnsNames(Iterable<String> values)

public SubjectAltNames.Builder addAllDnsNames(Iterable<String> values)

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Parameter
NameDescription
valuesIterable<String>

The dnsNames to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addAllEmailAddresses(Iterable<String> values)

public SubjectAltNames.Builder addAllEmailAddresses(Iterable<String> values)

Contains only valid RFC 2822 E-mail addresses.

repeated string email_addresses = 3;

Parameter
NameDescription
valuesIterable<String>

The emailAddresses to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addAllIpAddresses(Iterable<String> values)

public SubjectAltNames.Builder addAllIpAddresses(Iterable<String> values)

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

repeated string ip_addresses = 4;

Parameter
NameDescription
valuesIterable<String>

The ipAddresses to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addAllUris(Iterable<String> values)

public SubjectAltNames.Builder addAllUris(Iterable<String> values)

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Parameter
NameDescription
valuesIterable<String>

The uris to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addCustomSans(X509Extension value)

public SubjectAltNames.Builder addCustomSans(X509Extension value)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameter
NameDescription
valueX509Extension
Returns
TypeDescription
SubjectAltNames.Builder

addCustomSans(X509Extension.Builder builderForValue)

public SubjectAltNames.Builder addCustomSans(X509Extension.Builder builderForValue)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameter
NameDescription
builderForValueX509Extension.Builder
Returns
TypeDescription
SubjectAltNames.Builder

addCustomSans(int index, X509Extension value)

public SubjectAltNames.Builder addCustomSans(int index, X509Extension value)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameters
NameDescription
indexint
valueX509Extension
Returns
TypeDescription
SubjectAltNames.Builder

addCustomSans(int index, X509Extension.Builder builderForValue)

public SubjectAltNames.Builder addCustomSans(int index, X509Extension.Builder builderForValue)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameters
NameDescription
indexint
builderForValueX509Extension.Builder
Returns
TypeDescription
SubjectAltNames.Builder

addCustomSansBuilder()

public X509Extension.Builder addCustomSansBuilder()

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Returns
TypeDescription
X509Extension.Builder

addCustomSansBuilder(int index)

public X509Extension.Builder addCustomSansBuilder(int index)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
X509Extension.Builder

addDnsNames(String value)

public SubjectAltNames.Builder addDnsNames(String value)

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Parameter
NameDescription
valueString

The dnsNames to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addDnsNamesBytes(ByteString value)

public SubjectAltNames.Builder addDnsNamesBytes(ByteString value)

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Parameter
NameDescription
valueByteString

The bytes of the dnsNames to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addEmailAddresses(String value)

public SubjectAltNames.Builder addEmailAddresses(String value)

Contains only valid RFC 2822 E-mail addresses.

repeated string email_addresses = 3;

Parameter
NameDescription
valueString

The emailAddresses to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addEmailAddressesBytes(ByteString value)

public SubjectAltNames.Builder addEmailAddressesBytes(ByteString value)

Contains only valid RFC 2822 E-mail addresses.

repeated string email_addresses = 3;

Parameter
NameDescription
valueByteString

The bytes of the emailAddresses to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addIpAddresses(String value)

public SubjectAltNames.Builder addIpAddresses(String value)

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

repeated string ip_addresses = 4;

Parameter
NameDescription
valueString

The ipAddresses to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addIpAddressesBytes(ByteString value)

public SubjectAltNames.Builder addIpAddressesBytes(ByteString value)

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

repeated string ip_addresses = 4;

Parameter
NameDescription
valueByteString

The bytes of the ipAddresses to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SubjectAltNames.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SubjectAltNames.Builder
Overrides

addUris(String value)

public SubjectAltNames.Builder addUris(String value)

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Parameter
NameDescription
valueString

The uris to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

addUrisBytes(ByteString value)

public SubjectAltNames.Builder addUrisBytes(ByteString value)

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Parameter
NameDescription
valueByteString

The bytes of the uris to add.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

build()

public SubjectAltNames build()
Returns
TypeDescription
SubjectAltNames

buildPartial()

public SubjectAltNames buildPartial()
Returns
TypeDescription
SubjectAltNames

clear()

public SubjectAltNames.Builder clear()
Returns
TypeDescription
SubjectAltNames.Builder
Overrides

clearCustomSans()

public SubjectAltNames.Builder clearCustomSans()

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Returns
TypeDescription
SubjectAltNames.Builder

clearDnsNames()

public SubjectAltNames.Builder clearDnsNames()

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

clearEmailAddresses()

public SubjectAltNames.Builder clearEmailAddresses()

Contains only valid RFC 2822 E-mail addresses.

repeated string email_addresses = 3;

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SubjectAltNames.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SubjectAltNames.Builder
Overrides

clearIpAddresses()

public SubjectAltNames.Builder clearIpAddresses()

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

repeated string ip_addresses = 4;

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SubjectAltNames.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SubjectAltNames.Builder
Overrides

clearUris()

public SubjectAltNames.Builder clearUris()

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

clone()

public SubjectAltNames.Builder clone()
Returns
TypeDescription
SubjectAltNames.Builder
Overrides

getCustomSans(int index)

public X509Extension getCustomSans(int index)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
X509Extension

getCustomSansBuilder(int index)

public X509Extension.Builder getCustomSansBuilder(int index)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
X509Extension.Builder

getCustomSansBuilderList()

public List<X509Extension.Builder> getCustomSansBuilderList()

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Returns
TypeDescription
List<Builder>

getCustomSansCount()

public int getCustomSansCount()

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Returns
TypeDescription
int

getCustomSansList()

public List<X509Extension> getCustomSansList()

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Returns
TypeDescription
List<X509Extension>

getCustomSansOrBuilder(int index)

public X509ExtensionOrBuilder getCustomSansOrBuilder(int index)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
X509ExtensionOrBuilder

getCustomSansOrBuilderList()

public List<? extends X509ExtensionOrBuilder> getCustomSansOrBuilderList()

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Returns
TypeDescription
List<? extends com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder>

getDefaultInstanceForType()

public SubjectAltNames getDefaultInstanceForType()
Returns
TypeDescription
SubjectAltNames

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDnsNames(int index)

public String getDnsNames(int index)

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The dnsNames at the given index.

getDnsNamesBytes(int index)

public ByteString getDnsNamesBytes(int index)

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the dnsNames at the given index.

getDnsNamesCount()

public int getDnsNamesCount()

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Returns
TypeDescription
int

The count of dnsNames.

getDnsNamesList()

public ProtocolStringList getDnsNamesList()

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the dnsNames.

getEmailAddresses(int index)

public String getEmailAddresses(int index)

Contains only valid RFC 2822 E-mail addresses.

repeated string email_addresses = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The emailAddresses at the given index.

getEmailAddressesBytes(int index)

public ByteString getEmailAddressesBytes(int index)

Contains only valid RFC 2822 E-mail addresses.

repeated string email_addresses = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the emailAddresses at the given index.

getEmailAddressesCount()

public int getEmailAddressesCount()

Contains only valid RFC 2822 E-mail addresses.

repeated string email_addresses = 3;

Returns
TypeDescription
int

The count of emailAddresses.

getEmailAddressesList()

public ProtocolStringList getEmailAddressesList()

Contains only valid RFC 2822 E-mail addresses.

repeated string email_addresses = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the emailAddresses.

getIpAddresses(int index)

public String getIpAddresses(int index)

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

repeated string ip_addresses = 4;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The ipAddresses at the given index.

getIpAddressesBytes(int index)

public ByteString getIpAddressesBytes(int index)

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

repeated string ip_addresses = 4;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the ipAddresses at the given index.

getIpAddressesCount()

public int getIpAddressesCount()

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

repeated string ip_addresses = 4;

Returns
TypeDescription
int

The count of ipAddresses.

getIpAddressesList()

public ProtocolStringList getIpAddressesList()

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

repeated string ip_addresses = 4;

Returns
TypeDescription
ProtocolStringList

A list containing the ipAddresses.

getUris(int index)

public String getUris(int index)

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The uris at the given index.

getUrisBytes(int index)

public ByteString getUrisBytes(int index)

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the uris at the given index.

getUrisCount()

public int getUrisCount()

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Returns
TypeDescription
int

The count of uris.

getUrisList()

public ProtocolStringList getUrisList()

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the uris.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SubjectAltNames other)

public SubjectAltNames.Builder mergeFrom(SubjectAltNames other)
Parameter
NameDescription
otherSubjectAltNames
Returns
TypeDescription
SubjectAltNames.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SubjectAltNames.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SubjectAltNames.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SubjectAltNames.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SubjectAltNames.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SubjectAltNames.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SubjectAltNames.Builder
Overrides

removeCustomSans(int index)

public SubjectAltNames.Builder removeCustomSans(int index)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
SubjectAltNames.Builder

setCustomSans(int index, X509Extension value)

public SubjectAltNames.Builder setCustomSans(int index, X509Extension value)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameters
NameDescription
indexint
valueX509Extension
Returns
TypeDescription
SubjectAltNames.Builder

setCustomSans(int index, X509Extension.Builder builderForValue)

public SubjectAltNames.Builder setCustomSans(int index, X509Extension.Builder builderForValue)

Contains additional subject alternative name values.

repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5;

Parameters
NameDescription
indexint
builderForValueX509Extension.Builder
Returns
TypeDescription
SubjectAltNames.Builder

setDnsNames(int index, String value)

public SubjectAltNames.Builder setDnsNames(int index, String value)

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The dnsNames to set.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

setEmailAddresses(int index, String value)

public SubjectAltNames.Builder setEmailAddresses(int index, String value)

Contains only valid RFC 2822 E-mail addresses.

repeated string email_addresses = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The emailAddresses to set.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SubjectAltNames.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SubjectAltNames.Builder
Overrides

setIpAddresses(int index, String value)

public SubjectAltNames.Builder setIpAddresses(int index, String value)

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

repeated string ip_addresses = 4;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The ipAddresses to set.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SubjectAltNames.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SubjectAltNames.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SubjectAltNames.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SubjectAltNames.Builder
Overrides

setUris(int index, String value)

public SubjectAltNames.Builder setUris(int index, String value)

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The uris to set.

Returns
TypeDescription
SubjectAltNames.Builder

This builder for chaining.