Class Certificate (2.57.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
Type Description
int

NOT_AFTER_TIME_FIELD_NUMBER

public static final int NOT_AFTER_TIME_FIELD_NUMBER
Field Value
Type Description
int

NOT_BEFORE_TIME_FIELD_NUMBER

public static final int NOT_BEFORE_TIME_FIELD_NUMBER
Field Value
Type Description
int

PARSED_FIELD_NUMBER

public static final int PARSED_FIELD_NUMBER
Field Value
Type Description
int

RAW_DER_FIELD_NUMBER

public static final int RAW_DER_FIELD_NUMBER
Field Value
Type Description
int

SERIAL_NUMBER_FIELD_NUMBER

public static final int SERIAL_NUMBER_FIELD_NUMBER
Field Value
Type Description
int

SHA256_FINGERPRINT_FIELD_NUMBER

public static final int SHA256_FINGERPRINT_FIELD_NUMBER
Field Value
Type Description
int

SUBJECT_ALTERNATIVE_DNS_NAMES_FIELD_NUMBER

public static final int SUBJECT_ALTERNATIVE_DNS_NAMES_FIELD_NUMBER
Field Value
Type Description
int

SUBJECT_FIELD_NUMBER

public static final int SUBJECT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Certificate getDefaultInstance()
Returns
Type Description
Certificate

getDescriptor()

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

newBuilder()

public static Certificate.Builder newBuilder()
Returns
Type Description
Certificate.Builder

newBuilder(Certificate prototype)

public static Certificate.Builder newBuilder(Certificate prototype)
Parameter
Name Description
prototype Certificate
Returns
Type Description
Certificate.Builder

parseDelimitedFrom(InputStream input)

public static Certificate parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Certificate
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Certificate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Certificate
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Certificate parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Certificate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Certificate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Certificate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Certificate parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Certificate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Certificate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Certificate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Certificate parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Certificate
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Certificate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Certificate
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Certificate parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Certificate
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Certificate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Certificate
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Certificate parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Certificate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Certificate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Certificate
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Certificate> parser()
Returns
Type Description
Parser<Certificate>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Certificate getDefaultInstanceForType()
Returns
Type Description
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
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.

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.

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.

getParserForType()

public Parser<Certificate> getParserForType()
Returns
Type Description
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
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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
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
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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Certificate.Builder newBuilderForType()
Returns
Type Description
Certificate.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Certificate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Certificate.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Certificate.Builder toBuilder()
Returns
Type Description
Certificate.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException