Class Certificate (2.21.0)

public final class Certificate extends GeneratedMessageV3 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 Fields

ISSUER_FIELD_NUMBER

public static final int ISSUER_FIELD_NUMBER
Field Value
TypeDescription
int

NOT_AFTER_TIME_FIELD_NUMBER

public static final int NOT_AFTER_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

NOT_BEFORE_TIME_FIELD_NUMBER

public static final int NOT_BEFORE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

PARSED_FIELD_NUMBER

public static final int PARSED_FIELD_NUMBER
Field Value
TypeDescription
int

RAW_DER_FIELD_NUMBER

public static final int RAW_DER_FIELD_NUMBER
Field Value
TypeDescription
int

SERIAL_NUMBER_FIELD_NUMBER

public static final int SERIAL_NUMBER_FIELD_NUMBER
Field Value
TypeDescription
int

SHA256_FINGERPRINT_FIELD_NUMBER

public static final int SHA256_FINGERPRINT_FIELD_NUMBER
Field Value
TypeDescription
int

SUBJECT_ALTERNATIVE_DNS_NAMES_FIELD_NUMBER

public static final int SUBJECT_ALTERNATIVE_DNS_NAMES_FIELD_NUMBER
Field Value
TypeDescription
int

SUBJECT_FIELD_NUMBER

public static final int SUBJECT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Certificate getDefaultInstance()
Returns
TypeDescription
Certificate

getDescriptor()

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

newBuilder()

public static Certificate.Builder newBuilder()
Returns
TypeDescription
Certificate.Builder

newBuilder(Certificate prototype)

public static Certificate.Builder newBuilder(Certificate prototype)
Parameter
NameDescription
prototypeCertificate
Returns
TypeDescription
Certificate.Builder

parseDelimitedFrom(InputStream input)

public static Certificate parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Certificate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Certificate parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Certificate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Certificate parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Certificate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Certificate parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Certificate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Certificate parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Certificate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Certificate parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Certificate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Certificate
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Certificate> parser()
Returns
TypeDescription
Parser<Certificate>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Certificate getDefaultInstanceForType()
Returns
TypeDescription
Certificate

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.

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.

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.

getParserForType()

public Parser<Certificate> getParserForType()
Returns
TypeDescription
Parser<Certificate>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Certificate.Builder newBuilderForType()
Returns
TypeDescription
Certificate.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Certificate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Certificate.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Certificate.Builder toBuilder()
Returns
TypeDescription
Certificate.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException