Class Certificate (2.5.3) 
  
      
     
  
  
  
   
  
    
  
  
    
    
    
  Version 2.5.3keyboard_arrow_down  
  
 
    
    
     
    
    
    
    
    
      
  
  
  
    
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 
  
  NOT_AFTER_TIME_FIELD_NUMBER 
  
    
public   static   final   int   NOT_AFTER_TIME_FIELD_NUMBER  
   
  Field Value 
  
  NOT_BEFORE_TIME_FIELD_NUMBER 
  
    
public   static   final   int   NOT_BEFORE_TIME_FIELD_NUMBER  
   
  Field Value 
  
  PARSED_FIELD_NUMBER 
  
    
public   static   final   int   PARSED_FIELD_NUMBER  
   
  Field Value 
  
  RAW_DER_FIELD_NUMBER 
  
    
public   static   final   int   RAW_DER_FIELD_NUMBER  
   
  Field Value 
  
  SERIAL_NUMBER_FIELD_NUMBER 
  
    
public   static   final   int   SERIAL_NUMBER_FIELD_NUMBER  
   
  Field Value 
  
  SHA256_FINGERPRINT_FIELD_NUMBER 
  
    
public   static   final   int   SHA256_FINGERPRINT_FIELD_NUMBER  
   
  Field Value 
  
  SUBJECT_ALTERNATIVE_DNS_NAMES_FIELD_NUMBER 
  
    
public   static   final   int   SUBJECT_ALTERNATIVE_DNS_NAMES_FIELD_NUMBER  
   
  Field Value 
  
  SUBJECT_FIELD_NUMBER 
  
    
public   static   final   int   SUBJECT_FIELD_NUMBER  
   
  Field Value 
  
  Static Methods
   
   
  getDefaultInstance() 
  
    
public   static   Certificate   getDefaultInstance ()  
   
  Returns 
  
   
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
   
  Returns 
  
   
  newBuilder() 
  
    
public   static   Certificate . Builder   newBuilder ()  
   
  Returns 
  
   
  newBuilder(Certificate prototype) 
  
    
public   static   Certificate . Builder   newBuilder ( Certificate   prototype )  
   
  Parameter 
  
  Returns 
  
   
  
  
    
public   static   Certificate   parseDelimitedFrom ( InputStream   input )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  
  
    
public   static   Certificate   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(byte[] data) 
  
    
public   static   Certificate   parseFrom ( byte []   data )  
   
  Parameter 
  
    
      
        Name  
        Description  
       
      
        data  
        byte [] 
       
     
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Certificate   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteString data) 
  
    
public   static   Certificate   parseFrom ( ByteString   data )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Certificate   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  
  
    
public   static   Certificate   parseFrom ( CodedInputStream   input )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  
  
    
public   static   Certificate   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  
  
    
public   static   Certificate   parseFrom ( InputStream   input )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  
  
    
public   static   Certificate   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteBuffer data) 
  
    
public   static   Certificate   parseFrom ( ByteBuffer   data )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Certificate   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parser() 
  
    
public   static   Parser<Certificate>   parser ()  
   
  Returns 
  
  Methods
   
   
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  getDefaultInstanceForType() 
  
    
public   Certificate   getDefaultInstanceForType ()  
   
  Returns 
  
   
  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 
  
   
  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 
  
   
  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 
  
   
  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 
  
   
  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 
  
  Overrides 
  
   
  getRawDer() 
  
    
public   ByteString   getRawDer ()  
   
   Required. The raw certificate bytes in DER format.
 bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED];
 
  Returns 
  
   
  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 
  
  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 
  
   
  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.
 
       
     
  
   
  getUnknownFields() 
  
    
public   final   UnknownFieldSet   getUnknownFields ()  
   
  Returns 
  
  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 
  
    
      
        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() 
  
  Returns 
  
  Overrides 
  
   
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
   
  Returns 
  
  Overrides 
  
   
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
   
  Returns 
  
  Overrides 
  
   
  newBuilderForType() 
  
    
public   Certificate . Builder   newBuilderForType ()  
   
  Returns 
  
   
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   Certificate . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  toBuilder() 
  
    
public   Certificate . Builder   toBuilder ()  
   
  Returns 
  
   
  writeTo(CodedOutputStream output) 
  
    
public   void   writeTo ( CodedOutputStream   output )  
   
  Parameter 
  
  Overrides 
  
  Exceptions 
  
 
     
    
  
  
  
     
  
 
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-30 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]