# Interface CertificateOrBuilder (2.95.0)

2.95.0 (latest) 2.93.0 2.90.0 2.89.0 2.87.0 2.85.0 2.84.0 2.82.0 2.80.0 2.78.0 2.77.0 2.76.0 2.75.0 2.74.0 2.72.0 2.70.0 2.69.0 2.66.0 2.65.0 2.64.0 2.62.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.0 2.56.0 2.55.0 2.54.0 2.53.0 2.51.0 2.50.0 2.49.0 2.48.0 2.47.0 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.26.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.4 2.4.0 2.3.0 2.2.5

    public interface CertificateOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsLabels(String key)

    public abstract boolean containsLabels(String key)

Optional. Labels with user-defined metadata.

`map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getCertificateConfigCase()

    public abstract Certificate.CertificateConfigCase getCertificateConfigCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-security-private-ca/latest/com.google.cloud.security.privateca.v1beta1.Certificate.CertificateConfigCase` |   |

### getCertificateDescription()

    public abstract CertificateDescription getCertificateDescription()

Output only. A structured description of the issued X.509 certificate.

`
.google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-security-private-ca/latest/com.google.cloud.security.privateca.v1beta1.CertificateDescription` | The certificateDescription. |

### getCertificateDescriptionOrBuilder()

    public abstract CertificateDescriptionOrBuilder getCertificateDescriptionOrBuilder()

Output only. A structured description of the issued X.509 certificate.

`
.google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-security-private-ca/latest/com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder` |   |

### getConfig()

    public abstract CertificateConfig getConfig()

Immutable. A description of the certificate and key that does not require X.509 or
ASN.1.

`
.google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-security-private-ca/latest/com.google.cloud.security.privateca.v1beta1.CertificateConfig` | The config. |

### getConfigOrBuilder()

    public abstract CertificateConfigOrBuilder getConfigOrBuilder()

Immutable. A description of the certificate and key that does not require X.509 or
ASN.1.

`
.google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-security-private-ca/latest/com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder` |   |

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. The time at which this Certificate was created.

`.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time at which this Certificate was created.

`.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getLabels() (deprecated)

    public abstract Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-security-private-ca/latest/com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder#com_google_cloud_security_privateca_v1beta1_CertificateOrBuilder_getLabelsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsCount()

    public abstract int getLabelsCount()

Optional. Labels with user-defined metadata.

`map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getLabelsMap()

    public abstract Map<String,String> getLabelsMap()

Optional. Labels with user-defined metadata.

`map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsOrDefault(String key, String defaultValue)

    public abstract String getLabelsOrDefault(String key, String defaultValue)

Optional. Labels with user-defined metadata.

`map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLabelsOrThrow(String key)

    public abstract String getLabelsOrThrow(String key)

Optional. Labels with user-defined metadata.

`map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLifetime()

    public abstract Duration getLifetime()

Required. Immutable. The desired lifetime of a certificate. Used to create the
"not_before_time" and "not_after_time" fields inside an X.509
certificate. Note that the lifetime may be truncated if it would extend
past the life of any certificate authority in the issuing chain.

`
.google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Duration.html` | The lifetime. |

### getLifetimeOrBuilder()

    public abstract DurationOrBuilder getLifetimeOrBuilder()

Required. Immutable. The desired lifetime of a certificate. Used to create the
"not_before_time" and "not_after_time" fields inside an X.509
certificate. Note that the lifetime may be truncated if it would extend
past the life of any certificate authority in the issuing chain.

`
.google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DurationOrBuilder.html` |   |

### getName()

    public abstract String getName()

Output only. The resource path for this Certificate in the format
`projects/*/locations/*/certificateAuthorities/*/certificates/*`.

`string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

Output only. The resource path for this Certificate in the format
`projects/*/locations/*/certificateAuthorities/*/certificates/*`.

`string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getPemCertificate()

    public abstract String getPemCertificate()

Output only. The pem-encoded, signed X.509 certificate.

`string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The pemCertificate. |

### getPemCertificateBytes()

    public abstract ByteString getPemCertificateBytes()

Output only. The pem-encoded, signed X.509 certificate.

`string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for pemCertificate. |

### getPemCertificateChain(int index)

    public abstract String getPemCertificateChain(int index)

Output only. The chain that may be used to verify the X.509 certificate. Expected to be
in issuer-to-root order according to RFC 5246.

`repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The pemCertificateChain at the given index. |

### getPemCertificateChainBytes(int index)

    public abstract ByteString getPemCertificateChainBytes(int index)

Output only. The chain that may be used to verify the X.509 certificate. Expected to be
in issuer-to-root order according to RFC 5246.

`repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the pemCertificateChain at the given index. |

### getPemCertificateChainCount()

    public abstract int getPemCertificateChainCount()

Output only. The chain that may be used to verify the X.509 certificate. Expected to be
in issuer-to-root order according to RFC 5246.

`repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of pemCertificateChain. |

### getPemCertificateChainList()

    public abstract List<String> getPemCertificateChainList()

Output only. The chain that may be used to verify the X.509 certificate. Expected to be
in issuer-to-root order according to RFC 5246.

`repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the pemCertificateChain. |

### getPemCsr()

    public abstract String getPemCsr()

Immutable. A pem-encoded X.509 certificate signing request (CSR).

`string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The pemCsr. |

### getPemCsrBytes()

    public abstract ByteString getPemCsrBytes()

Immutable. A pem-encoded X.509 certificate signing request (CSR).

`string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for pemCsr. |

### getRevocationDetails()

    public abstract Certificate.RevocationDetails getRevocationDetails()

Output only. Details regarding the revocation of this Certificate. This
Certificate is considered revoked if and only if this field is present.

`
.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-security-private-ca/latest/com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails` | The revocationDetails. |

### getRevocationDetailsOrBuilder()

    public abstract Certificate.RevocationDetailsOrBuilder getRevocationDetailsOrBuilder()

Output only. Details regarding the revocation of this Certificate. This
Certificate is considered revoked if and only if this field is present.

`
.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-security-private-ca/latest/com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetailsOrBuilder` |   |

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

Output only. The time at which this Certificate was updated.

`.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time at which this Certificate was updated.

`.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### hasCertificateDescription()

    public abstract boolean hasCertificateDescription()

Output only. A structured description of the issued X.509 certificate.

`
.google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the certificateDescription field is set. |

### hasConfig()

    public abstract boolean hasConfig()

Immutable. A description of the certificate and key that does not require X.509 or
ASN.1.

`
.google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the config field is set. |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. The time at which this Certificate was created.

`.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasLifetime()

    public abstract boolean hasLifetime()

Required. Immutable. The desired lifetime of a certificate. Used to create the
"not_before_time" and "not_after_time" fields inside an X.509
certificate. Note that the lifetime may be truncated if it would extend
past the life of any certificate authority in the issuing chain.

`
.google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the lifetime field is set. |

### hasPemCsr()

    public abstract boolean hasPemCsr()

Immutable. A pem-encoded X.509 certificate signing request (CSR).

`string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the pemCsr field is set. |

### hasRevocationDetails()

    public abstract boolean hasRevocationDetails()

Output only. Details regarding the revocation of this Certificate. This
Certificate is considered revoked if and only if this field is present.

`
.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the revocationDetails field is set. |

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

Output only. The time at which this Certificate was updated.

`.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |