Class Certificate

  • All Implemented Interfaces:
    CertificateOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Certificate
    extends com.google.protobuf.GeneratedMessageV3
    implements CertificateOrBuilder
     A [Certificate][google.cloud.kms.v1.Certificate] represents an X.509
     certificate used to authenticate HTTPS connections to EKM replicas.
     
    Protobuf type google.cloud.kms.v1.Certificate
    See Also:
    Serialized Form
    • Field Detail

      • SUBJECT_ALTERNATIVE_DNS_NAMES_FIELD_NUMBER

        public static final int SUBJECT_ALTERNATIVE_DNS_NAMES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • NOT_BEFORE_TIME_FIELD_NUMBER

        public static final int NOT_BEFORE_TIME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • NOT_AFTER_TIME_FIELD_NUMBER

        public static final int NOT_AFTER_TIME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SERIAL_NUMBER_FIELD_NUMBER

        public static final int SERIAL_NUMBER_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SHA256_FINGERPRINT_FIELD_NUMBER

        public static final int SHA256_FINGERPRINT_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getRawDer

        public com.google.protobuf.ByteString getRawDer()
         Required. The raw certificate bytes in DER format.
         
        bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getRawDer in interface CertificateOrBuilder
        Returns:
        The rawDer.
      • getParsed

        public boolean getParsed()
         Output only. True if the certificate was parsed successfully.
         
        bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getParsed in interface CertificateOrBuilder
        Returns:
        The parsed.
      • getIssuer

        public String getIssuer()
         Output only. The issuer distinguished name in RFC 2253 format. Only present
         if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getIssuer in interface CertificateOrBuilder
        Returns:
        The issuer.
      • getIssuerBytes

        public com.google.protobuf.ByteString getIssuerBytes()
         Output only. The issuer distinguished name in RFC 2253 format. Only present
         if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getIssuerBytes in interface CertificateOrBuilder
        Returns:
        The bytes for issuer.
      • getSubject

        public String getSubject()
         Output only. The subject distinguished name in RFC 2253 format. Only
         present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSubject in interface CertificateOrBuilder
        Returns:
        The subject.
      • getSubjectBytes

        public com.google.protobuf.ByteString getSubjectBytes()
         Output only. The subject distinguished name in RFC 2253 format. Only
         present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSubjectBytes in interface CertificateOrBuilder
        Returns:
        The bytes for subject.
      • getSubjectAlternativeDnsNamesList

        public com.google.protobuf.ProtocolStringList getSubjectAlternativeDnsNamesList()
         Output only. The subject Alternative DNS names. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSubjectAlternativeDnsNamesList in interface CertificateOrBuilder
        Returns:
        A list containing the subjectAlternativeDnsNames.
      • getSubjectAlternativeDnsNamesCount

        public int getSubjectAlternativeDnsNamesCount()
         Output only. The subject Alternative DNS names. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSubjectAlternativeDnsNamesCount in interface CertificateOrBuilder
        Returns:
        The count of subjectAlternativeDnsNames.
      • getSubjectAlternativeDnsNames

        public String getSubjectAlternativeDnsNames​(int index)
         Output only. The subject Alternative DNS names. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSubjectAlternativeDnsNames in interface CertificateOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The subjectAlternativeDnsNames at the given index.
      • getSubjectAlternativeDnsNamesBytes

        public com.google.protobuf.ByteString getSubjectAlternativeDnsNamesBytes​(int index)
         Output only. The subject Alternative DNS names. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSubjectAlternativeDnsNamesBytes in interface CertificateOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the subjectAlternativeDnsNames at the given index.
      • hasNotBeforeTime

        public boolean hasNotBeforeTime()
         Output only. The certificate is not valid before this time. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasNotBeforeTime in interface CertificateOrBuilder
        Returns:
        Whether the notBeforeTime field is set.
      • getNotBeforeTime

        public com.google.protobuf.Timestamp getNotBeforeTime()
         Output only. The certificate is not valid before this time. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNotBeforeTime in interface CertificateOrBuilder
        Returns:
        The notBeforeTime.
      • getNotBeforeTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getNotBeforeTimeOrBuilder()
         Output only. The certificate is not valid before this time. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNotBeforeTimeOrBuilder in interface CertificateOrBuilder
      • hasNotAfterTime

        public boolean hasNotAfterTime()
         Output only. The certificate is not valid after this time. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasNotAfterTime in interface CertificateOrBuilder
        Returns:
        Whether the notAfterTime field is set.
      • getNotAfterTime

        public com.google.protobuf.Timestamp getNotAfterTime()
         Output only. The certificate is not valid after this time. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNotAfterTime in interface CertificateOrBuilder
        Returns:
        The notAfterTime.
      • getNotAfterTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getNotAfterTimeOrBuilder()
         Output only. The certificate is not valid after this time. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNotAfterTimeOrBuilder in interface CertificateOrBuilder
      • getSerialNumber

        public String getSerialNumber()
         Output only. The certificate serial number as a hex string. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSerialNumber in interface CertificateOrBuilder
        Returns:
        The serialNumber.
      • getSerialNumberBytes

        public com.google.protobuf.ByteString getSerialNumberBytes()
         Output only. The certificate serial number as a hex string. Only present if
         [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSerialNumberBytes in interface CertificateOrBuilder
        Returns:
        The bytes for serialNumber.
      • getSha256Fingerprint

        public String getSha256Fingerprint()
         Output only. The SHA-256 certificate fingerprint as a hex string. Only
         present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSha256Fingerprint in interface CertificateOrBuilder
        Returns:
        The sha256Fingerprint.
      • getSha256FingerprintBytes

        public com.google.protobuf.ByteString getSha256FingerprintBytes()
         Output only. The SHA-256 certificate fingerprint as a hex string. Only
         present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
         
        string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSha256FingerprintBytes in interface CertificateOrBuilder
        Returns:
        The bytes for sha256Fingerprint.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Certificate parseFrom​(ByteBuffer data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Certificate parseFrom​(ByteBuffer data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Certificate parseFrom​(com.google.protobuf.ByteString data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Certificate parseFrom​(com.google.protobuf.ByteString data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Certificate parseFrom​(byte[] data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Certificate parseFrom​(byte[] data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Certificate parseFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Certificate.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Certificate.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Certificate.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Certificate getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Certificate> parser()
      • getParserForType

        public com.google.protobuf.Parser<Certificate> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Certificate getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder