Class SubjectAltNames.Builder (2.48.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
Type Description
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
Name Description
values Iterable<? extends com.google.cloud.security.privateca.v1beta1.X509Extension>
Returns
Type Description
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
Name Description
values Iterable<String>

The dnsNames to add.

Returns
Type Description
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
Name Description
values Iterable<String>

The emailAddresses to add.

Returns
Type Description
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
Name Description
values Iterable<String>

The ipAddresses to add.

Returns
Type Description
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
Name Description
values Iterable<String>

The uris to add.

Returns
Type Description
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
Name Description
value X509Extension
Returns
Type Description
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
Name Description
builderForValue X509Extension.Builder
Returns
Type Description
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
Name Description
index int
value X509Extension
Returns
Type Description
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
Name Description
index int
builderForValue X509Extension.Builder
Returns
Type Description
SubjectAltNames.Builder

addCustomSansBuilder()

public X509Extension.Builder addCustomSansBuilder()

Contains additional subject alternative name values.

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

Returns
Type Description
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
Name Description
index int
Returns
Type Description
X509Extension.Builder

addDnsNames(String value)

public SubjectAltNames.Builder addDnsNames(String value)

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Parameter
Name Description
value String

The dnsNames to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the dnsNames to add.

Returns
Type Description
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
Name Description
value String

The emailAddresses to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the emailAddresses to add.

Returns
Type Description
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
Name Description
value String

The ipAddresses to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the ipAddresses to add.

Returns
Type Description
SubjectAltNames.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SubjectAltNames.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SubjectAltNames.Builder
Overrides

addUris(String value)

public SubjectAltNames.Builder addUris(String value)

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Parameter
Name Description
value String

The uris to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the uris to add.

Returns
Type Description
SubjectAltNames.Builder

This builder for chaining.

build()

public SubjectAltNames build()
Returns
Type Description
SubjectAltNames

buildPartial()

public SubjectAltNames buildPartial()
Returns
Type Description
SubjectAltNames

clear()

public SubjectAltNames.Builder clear()
Returns
Type Description
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
Type Description
SubjectAltNames.Builder

clearDnsNames()

public SubjectAltNames.Builder clearDnsNames()

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Returns
Type Description
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
Type Description
SubjectAltNames.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SubjectAltNames.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
SubjectAltNames.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SubjectAltNames.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SubjectAltNames.Builder
Overrides

clearUris()

public SubjectAltNames.Builder clearUris()

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Returns
Type Description
SubjectAltNames.Builder

This builder for chaining.

clone()

public SubjectAltNames.Builder clone()
Returns
Type Description
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
Name Description
index int
Returns
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
List<Builder>

getCustomSansCount()

public int getCustomSansCount()

Contains additional subject alternative name values.

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

Returns
Type Description
int

getCustomSansList()

public List<X509Extension> getCustomSansList()

Contains additional subject alternative name values.

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

Returns
Type Description
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
Name Description
index int
Returns
Type Description
X509ExtensionOrBuilder

getCustomSansOrBuilderList()

public List<? extends X509ExtensionOrBuilder> getCustomSansOrBuilderList()

Contains additional subject alternative name values.

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

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

getDefaultInstanceForType()

public SubjectAltNames getDefaultInstanceForType()
Returns
Type Description
SubjectAltNames

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDnsNames(int index)

public String getDnsNames(int index)

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
int

The count of dnsNames.

getDnsNamesList()

public ProtocolStringList getDnsNamesList()

Contains only valid, fully-qualified host names.

repeated string dns_names = 1;

Returns
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
int

The count of emailAddresses.

getEmailAddressesList()

public ProtocolStringList getEmailAddressesList()

Contains only valid RFC 2822 E-mail addresses.

repeated string email_addresses = 3;

Returns
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
int

The count of uris.

getUrisList()

public ProtocolStringList getUrisList()

Contains only valid RFC 3986 URIs.

repeated string uris = 2;

Returns
Type Description
ProtocolStringList

A list containing the uris.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SubjectAltNames other)

public SubjectAltNames.Builder mergeFrom(SubjectAltNames other)
Parameter
Name Description
other SubjectAltNames
Returns
Type Description
SubjectAltNames.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SubjectAltNames.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SubjectAltNames.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SubjectAltNames.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SubjectAltNames.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SubjectAltNames.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
index int
Returns
Type Description
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
Name Description
index int
value X509Extension
Returns
Type Description
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
Name Description
index int
builderForValue X509Extension.Builder
Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The dnsNames to set.

Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The emailAddresses to set.

Returns
Type Description
SubjectAltNames.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SubjectAltNames.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The ipAddresses to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SubjectAltNames.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SubjectAltNames.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The uris to set.

Returns
Type Description
SubjectAltNames.Builder

This builder for chaining.