Class Certificate.Builder (2.47.0)

public static final class Certificate.Builder extends GeneratedMessageV3.Builder<Certificate.Builder> implements CertificateOrBuilder

A Certificate represents an X.509 certificate used to authenticate HTTPS connections to EKM replicas.

Protobuf type google.cloud.kms.v1.Certificate

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllSubjectAlternativeDnsNames(Iterable<String> values)

public Certificate.Builder addAllSubjectAlternativeDnsNames(Iterable<String> values)

Output only. The subject Alternative DNS names. Only present if parsed is true.

repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<String>

The subjectAlternativeDnsNames to add.

Returns
Type Description
Certificate.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addSubjectAlternativeDnsNames(String value)

public Certificate.Builder addSubjectAlternativeDnsNames(String value)

Output only. The subject Alternative DNS names. Only present if parsed is true.

repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The subjectAlternativeDnsNames to add.

Returns
Type Description
Certificate.Builder

This builder for chaining.

addSubjectAlternativeDnsNamesBytes(ByteString value)

public Certificate.Builder addSubjectAlternativeDnsNamesBytes(ByteString value)

Output only. The subject Alternative DNS names. Only present if parsed is true.

repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes of the subjectAlternativeDnsNames to add.

Returns
Type Description
Certificate.Builder

This builder for chaining.

build()

public Certificate build()
Returns
Type Description
Certificate

buildPartial()

public Certificate buildPartial()
Returns
Type Description
Certificate

clear()

public Certificate.Builder clear()
Returns
Type Description
Certificate.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Certificate.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Certificate.Builder
Overrides

clearIssuer()

public Certificate.Builder clearIssuer()

Output only. The issuer distinguished name in RFC 2253 format. Only present if parsed is true.

string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Certificate.Builder

This builder for chaining.

clearNotAfterTime()

public Certificate.Builder clearNotAfterTime()

Output only. The certificate is not valid after this time. Only present if parsed is true.

.google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Certificate.Builder

clearNotBeforeTime()

public Certificate.Builder clearNotBeforeTime()

Output only. The certificate is not valid before this time. Only present if parsed is true.

.google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Certificate.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearParsed()

public Certificate.Builder clearParsed()

Output only. True if the certificate was parsed successfully.

bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Certificate.Builder

This builder for chaining.

clearRawDer()

public Certificate.Builder clearRawDer()

Required. The raw certificate bytes in DER format.

bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Certificate.Builder

This builder for chaining.

clearSerialNumber()

public Certificate.Builder clearSerialNumber()

Output only. The certificate serial number as a hex string. Only present if parsed is true.

string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Certificate.Builder

This builder for chaining.

clearSha256Fingerprint()

public Certificate.Builder clearSha256Fingerprint()

Output only. The SHA-256 certificate fingerprint as a hex string. Only present if parsed is true.

string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Certificate.Builder

This builder for chaining.

clearSubject()

public Certificate.Builder clearSubject()

Output only. The subject distinguished name in RFC 2253 format. Only present if parsed is true.

string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Certificate.Builder

This builder for chaining.

clearSubjectAlternativeDnsNames()

public Certificate.Builder clearSubjectAlternativeDnsNames()

Output only. The subject Alternative DNS names. Only present if parsed is true.

repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Certificate.Builder

This builder for chaining.

clone()

public Certificate.Builder clone()
Returns
Type Description
Certificate.Builder
Overrides

getDefaultInstanceForType()

public Certificate getDefaultInstanceForType()
Returns
Type Description
Certificate

getDescriptorForType()

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

getIssuer()

public String getIssuer()

Output only. The issuer distinguished name in RFC 2253 format. Only present if parsed is true.

string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The issuer.

getIssuerBytes()

public ByteString getIssuerBytes()

Output only. The issuer distinguished name in RFC 2253 format. Only present if parsed is true.

string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for issuer.

getNotAfterTime()

public Timestamp getNotAfterTime()

Output only. The certificate is not valid after this time. Only present if parsed is true.

.google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The notAfterTime.

getNotAfterTimeBuilder()

public Timestamp.Builder getNotAfterTimeBuilder()

Output only. The certificate is not valid after this time. Only present if parsed is true.

.google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getNotAfterTimeOrBuilder()

public TimestampOrBuilder getNotAfterTimeOrBuilder()

Output only. The certificate is not valid after this time. Only present if parsed is true.

.google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getNotBeforeTime()

public Timestamp getNotBeforeTime()

Output only. The certificate is not valid before this time. Only present if parsed is true.

.google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The notBeforeTime.

getNotBeforeTimeBuilder()

public Timestamp.Builder getNotBeforeTimeBuilder()

Output only. The certificate is not valid before this time. Only present if parsed is true.

.google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getNotBeforeTimeOrBuilder()

public TimestampOrBuilder getNotBeforeTimeOrBuilder()

Output only. The certificate is not valid before this time. Only present if parsed is true.

.google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getParsed()

public boolean getParsed()

Output only. True if the certificate was parsed successfully.

bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The parsed.

getRawDer()

public ByteString getRawDer()

Required. The raw certificate bytes in DER format.

bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The rawDer.

getSerialNumber()

public String getSerialNumber()

Output only. The certificate serial number as a hex string. Only present if parsed is true.

string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The serialNumber.

getSerialNumberBytes()

public ByteString getSerialNumberBytes()

Output only. The certificate serial number as a hex string. Only present if parsed is true.

string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for serialNumber.

getSha256Fingerprint()

public String getSha256Fingerprint()

Output only. The SHA-256 certificate fingerprint as a hex string. Only present if parsed is true.

string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The sha256Fingerprint.

getSha256FingerprintBytes()

public ByteString getSha256FingerprintBytes()

Output only. The SHA-256 certificate fingerprint as a hex string. Only present if parsed is true.

string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for sha256Fingerprint.

getSubject()

public String getSubject()

Output only. The subject distinguished name in RFC 2253 format. Only present if parsed is true.

string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The subject.

getSubjectAlternativeDnsNames(int index)

public String getSubjectAlternativeDnsNames(int index)

Output only. The subject Alternative DNS names. Only present if parsed is true.

repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The subjectAlternativeDnsNames at the given index.

getSubjectAlternativeDnsNamesBytes(int index)

public ByteString getSubjectAlternativeDnsNamesBytes(int index)

Output only. The subject Alternative DNS names. Only present if parsed is true.

repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the subjectAlternativeDnsNames at the given index.

getSubjectAlternativeDnsNamesCount()

public int getSubjectAlternativeDnsNamesCount()

Output only. The subject Alternative DNS names. Only present if parsed is true.

repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The count of subjectAlternativeDnsNames.

getSubjectAlternativeDnsNamesList()

public ProtocolStringList getSubjectAlternativeDnsNamesList()

Output only. The subject Alternative DNS names. Only present if parsed is true.

repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the subjectAlternativeDnsNames.

getSubjectBytes()

public ByteString getSubjectBytes()

Output only. The subject distinguished name in RFC 2253 format. Only present if parsed is true.

string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for subject.

hasNotAfterTime()

public boolean hasNotAfterTime()

Output only. The certificate is not valid after this time. Only present if parsed is true.

.google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the notAfterTime field is set.

hasNotBeforeTime()

public boolean hasNotBeforeTime()

Output only. The certificate is not valid before this time. Only present if parsed is true.

.google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the notBeforeTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Certificate other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeNotAfterTime(Timestamp value)

public Certificate.Builder mergeNotAfterTime(Timestamp value)

Output only. The certificate is not valid after this time. Only present if parsed is true.

.google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Certificate.Builder

mergeNotBeforeTime(Timestamp value)

public Certificate.Builder mergeNotBeforeTime(Timestamp value)

Output only. The certificate is not valid before this time. Only present if parsed is true.

.google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Certificate.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Certificate.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Certificate.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

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

setIssuer(String value)

public Certificate.Builder setIssuer(String value)

Output only. The issuer distinguished name in RFC 2253 format. Only present if parsed is true.

string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The issuer to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

setIssuerBytes(ByteString value)

public Certificate.Builder setIssuerBytes(ByteString value)

Output only. The issuer distinguished name in RFC 2253 format. Only present if parsed is true.

string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for issuer to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

setNotAfterTime(Timestamp value)

public Certificate.Builder setNotAfterTime(Timestamp value)

Output only. The certificate is not valid after this time. Only present if parsed is true.

.google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Certificate.Builder

setNotAfterTime(Timestamp.Builder builderForValue)

public Certificate.Builder setNotAfterTime(Timestamp.Builder builderForValue)

Output only. The certificate is not valid after this time. Only present if parsed is true.

.google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Certificate.Builder

setNotBeforeTime(Timestamp value)

public Certificate.Builder setNotBeforeTime(Timestamp value)

Output only. The certificate is not valid before this time. Only present if parsed is true.

.google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Certificate.Builder

setNotBeforeTime(Timestamp.Builder builderForValue)

public Certificate.Builder setNotBeforeTime(Timestamp.Builder builderForValue)

Output only. The certificate is not valid before this time. Only present if parsed is true.

.google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Certificate.Builder

setParsed(boolean value)

public Certificate.Builder setParsed(boolean value)

Output only. True if the certificate was parsed successfully.

bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The parsed to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

setRawDer(ByteString value)

public Certificate.Builder setRawDer(ByteString value)

Required. The raw certificate bytes in DER format.

bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The rawDer to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

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

public Certificate.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Certificate.Builder
Overrides

setSerialNumber(String value)

public Certificate.Builder setSerialNumber(String value)

Output only. The certificate serial number as a hex string. Only present if parsed is true.

string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The serialNumber to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

setSerialNumberBytes(ByteString value)

public Certificate.Builder setSerialNumberBytes(ByteString value)

Output only. The certificate serial number as a hex string. Only present if parsed is true.

string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for serialNumber to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

setSha256Fingerprint(String value)

public Certificate.Builder setSha256Fingerprint(String value)

Output only. The SHA-256 certificate fingerprint as a hex string. Only present if parsed is true.

string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The sha256Fingerprint to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

setSha256FingerprintBytes(ByteString value)

public Certificate.Builder setSha256FingerprintBytes(ByteString value)

Output only. The SHA-256 certificate fingerprint as a hex string. Only present if parsed is true.

string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for sha256Fingerprint to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

setSubject(String value)

public Certificate.Builder setSubject(String value)

Output only. The subject distinguished name in RFC 2253 format. Only present if parsed is true.

string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The subject to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

setSubjectAlternativeDnsNames(int index, String value)

public Certificate.Builder setSubjectAlternativeDnsNames(int index, String value)

Output only. The subject Alternative DNS names. Only present if parsed is true.

repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int

The index to set the value at.

value String

The subjectAlternativeDnsNames to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

setSubjectBytes(ByteString value)

public Certificate.Builder setSubjectBytes(ByteString value)

Output only. The subject distinguished name in RFC 2253 format. Only present if parsed is true.

string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for subject to set.

Returns
Type Description
Certificate.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Certificate.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Certificate.Builder
Overrides