# Google Cloud IoT Core V1 Client - Class PublicKeyCertificate (1.7.5)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.7.5 (latest)](https://docs.cloud.google.com/php/docs/reference/cloud-iot/latest/V1.PublicKeyCertificate)
- [1.7.4](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.7.4/V1.PublicKeyCertificate)
- [1.6.4](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.6.4/V1.PublicKeyCertificate)
- [1.5.12](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.5.12/V1.PublicKeyCertificate)
Reference documentation and code samples for the Google Cloud IoT Core V1 Client class PublicKeyCertificate.

A public key certificate format and data.

Generated from protobuf message `google.cloud.iot.v1.PublicKeyCertificate`

## Namespace

Google \\ Cloud \\ Iot \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ format` | `int` The certificate format. |
| `↳ certificate` | `string` The certificate data. |
| `↳ x509_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-iot/latest/V1.X509CertificateDetails` \[Output only\] The certificate details. Used only for X.509 certificates. |

### getFormat

The certificate format.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setFormat

The certificate format.

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

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

### getCertificate

The certificate data.

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

### setCertificate

The certificate data.

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

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

### getX509Details

\[Output only\] The certificate details. Used only for X.509 certificates.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-iot/latest/V1.X509CertificateDetails|null` |   |

### hasX509Details

### clearX509Details

### setX509Details

\[Output only\] The certificate details. Used only for X.509 certificates.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-iot/latest/V1.X509CertificateDetails` |

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