Class Certificate.Builder (2.11.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
TypeDescription
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
NameDescription
valuesIterable<String>

The subjectAlternativeDnsNames to add.

Returns
TypeDescription
Certificate.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Certificate.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The subjectAlternativeDnsNames to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the subjectAlternativeDnsNames to add.

Returns
TypeDescription
Certificate.Builder

This builder for chaining.

build()

public Certificate build()
Returns
TypeDescription
Certificate

buildPartial()

public Certificate buildPartial()
Returns
TypeDescription
Certificate

clear()

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

clearField(Descriptors.FieldDescriptor field)

public Certificate.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Certificate.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Certificate.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Certificate.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Certificate getDefaultInstanceForType()
Returns
TypeDescription
Certificate

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getParsed()

public boolean getParsed()

Output only. True if the certificate was parsed successfully.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the notBeforeTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Certificate other)

public Certificate.Builder mergeFrom(Certificate other)
Parameter
NameDescription
otherCertificate
Returns
TypeDescription
Certificate.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Certificate.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
Certificate.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public Certificate.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The issuer to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for issuer to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueboolean

The parsed to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The rawDer to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The serialNumber to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for serialNumber to set.

Returns
TypeDescription
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
NameDescription
valueString

The sha256Fingerprint to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for sha256Fingerprint to set.

Returns
TypeDescription
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
NameDescription
valueString

The subject to set.

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The subjectAlternativeDnsNames to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for subject to set.

Returns
TypeDescription
Certificate.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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