# Cloud KMS V1 Client - Class Certificate (2.9.0)

2.9.0 (latest) 2.8.0 2.7.0 2.6.0 2.5.2 2.4.0 2.3.1 2.2.0 2.1.6 2.0.0 1.23.0 1.22.1 1.21.4 1.20.3 1.19.0 1.18.1 1.17.0 1.16.4 1.15.3 Reference documentation and code samples for the Cloud KMS V1 Client class Certificate.

A [Certificate](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate) represents an X.509
certificate used to authenticate HTTPS connections to EKM replicas.

Generated from protobuf message `google.cloud.kms.v1.Certificate`

## Namespace

Google \\ Cloud \\ Kms \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ raw_der` | `string` Required. The raw certificate bytes in DER format. |
| `↳ parsed` | `bool` Output only. True if the certificate was parsed successfully. |
| `↳ issuer` | `string` Output only. The issuer distinguished name in RFC 2253 format. Only present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true. |
| `↳ subject` | `string` Output only. The subject distinguished name in RFC 2253 format. Only present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true. |
| `↳ subject_alternative_dns_names` | `string[]` Output only. The subject Alternative DNS names. Only present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true. |
| `↳ not_before_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The certificate is not valid before this time. Only present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true. |
| `↳ not_after_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The certificate is not valid after this time. Only present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true. |
| `↳ serial_number` | `string` Output only. The certificate serial number as a hex string. Only present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true. |
| `↳ sha256_fingerprint` | `string` Output only. The SHA-256 certificate fingerprint as a hex string. Only present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true. |

### getRawDer

Required. The raw certificate bytes in DER format.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setRawDer

Required. The raw certificate bytes in DER format.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getParsed

Output only. True if the certificate was parsed successfully.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setParsed

Output only. True if the certificate was parsed successfully.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getIssuer

Output only. The issuer distinguished name in RFC 2253 format. Only present
if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setIssuer

Output only. The issuer distinguished name in RFC 2253 format. Only present
if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSubject

Output only. The subject distinguished name in RFC 2253 format. Only
present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSubject

Output only. The subject distinguished name in RFC 2253 format. Only
present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSubjectAlternativeDnsNames

Output only. The subject Alternative DNS names. Only present if
[parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setSubjectAlternativeDnsNames

Output only. The subject Alternative DNS names. Only present if
[parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNotBeforeTime

Output only. The certificate is not valid before this time. Only present if
[parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasNotBeforeTime

### clearNotBeforeTime

### setNotBeforeTime

Output only. The certificate is not valid before this time. Only present if
[parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNotAfterTime

Output only. The certificate is not valid after this time. Only present if
[parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasNotAfterTime

### clearNotAfterTime

### setNotAfterTime

Output only. The certificate is not valid after this time. Only present if
[parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSerialNumber

Output only. The certificate serial number as a hex string. Only present if
[parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSerialNumber

Output only. The certificate serial number as a hex string. Only present if
[parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSha256Fingerprint

Output only. The SHA-256 certificate fingerprint as a hex string. Only
present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSha256Fingerprint

Output only. The SHA-256 certificate fingerprint as a hex string. Only
present if [parsed](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate#_Google_Cloud_Kms_V1_Certificate__getParsed__) is true.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |