# Google Certificate Authority Service V1 Client - Class X509Extension (2.4.0)

2.4.0 (latest) 2.3.0 2.2.2 2.1.1 2.0.3 1.7.3 1.5.0 1.4.2 1.3.1 1.2.2 1.1.0 1.0.3 Reference documentation and code samples for the Google Certificate Authority Service V1 Client class X509Extension.

An \[X509Extension\]\[google.cloud.security.privateca.v1.X509Extension\]
specifies an X.509 extension, which may be used in different parts of X.509
objects like certificates, CSRs, and CRLs.

Generated from protobuf message `google.cloud.security.privateca.v1.X509Extension`

## Namespace

Google \\ Cloud \\ Security \\ PrivateCA \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ object_id` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.ObjectId` Required. The OID for this X.509 extension. |
| `↳ critical` | `bool` Optional. Indicates whether or not this extension is critical (i.e., if the client does not know how to handle this extension, the client should consider this to be an error). |
| `↳ value` | `string` Required. The value of this X.509 extension. |

### getObjectId

Required. The OID for this X.509 extension.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.ObjectId|null` |   |

### hasObjectId

### clearObjectId

### setObjectId

Required. The OID for this X.509 extension.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.ObjectId` |

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

### getCritical

Optional. Indicates whether or not this extension is critical (i.e., if the
client does not know how to handle this extension, the client should
consider this to be an error).

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

### setCritical

Optional. Indicates whether or not this extension is critical (i.e., if the
client does not know how to handle this extension, the client should
consider this to be an error).

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

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

### getValue

Required. The value of this X.509 extension.

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

### setValue

Required. The value of this X.509 extension.

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

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