# Google Certificate Authority Service V1 Client - Class X509Parameters (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 X509Parameters.

An \[X509Parameters\]\[google.cloud.security.privateca.v1.X509Parameters\] is
used to describe certain fields of an X.509 certificate, such as the key
usage fields, fields specific to CA certificates, certificate policy
extensions and custom extensions.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ key_usage` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.KeyUsage` Optional. Indicates the intended use for keys that correspond to a certificate. |
| `↳ ca_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.X509Parameters.CaOptions` Optional. Describes options in this \[X509Parameters\]\[google.cloud.security.privateca.v1.X509Parameters\] that are relevant in a CA certificate. If not specified, a default basic constraints extension with `is_ca=false` will be added for leaf certificates. |
| `↳ policy_ids` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.ObjectId>` Optional. Describes the X.509 certificate policy object identifiers, per <https://tools.ietf.org/html/rfc5280#section-4.2.1.4>. |
| `↳ aia_ocsp_servers` | `string[]` Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses that appear in the "Authority Information Access" extension in the certificate. |
| `↳ name_constraints` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.X509Parameters.NameConstraints` Optional. Describes the X.509 name constraints extension. |
| `↳ additional_extensions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.X509Extension>` Optional. Describes custom X.509 extensions. |

### getKeyUsage

Optional. Indicates the intended use for keys that correspond to a
certificate.

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

### hasKeyUsage

### clearKeyUsage

### setKeyUsage

Optional. Indicates the intended use for keys that correspond to a
certificate.

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

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

### getCaOptions

Optional. Describes options in this
\[X509Parameters\]\[google.cloud.security.privateca.v1.X509Parameters\] that
are relevant in a CA certificate. If not specified, a default basic
constraints extension with `is_ca=false` will be added for leaf
certificates.

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

### hasCaOptions

### clearCaOptions

### setCaOptions

Optional. Describes options in this
\[X509Parameters\]\[google.cloud.security.privateca.v1.X509Parameters\] that
are relevant in a CA certificate. If not specified, a default basic
constraints extension with `is_ca=false` will be added for leaf
certificates.

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

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

### getPolicyIds

Optional. Describes the X.509 certificate policy object identifiers, per
<https://tools.ietf.org/html/rfc5280#section-4.2.1.4>.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.ObjectId>` |   |

### setPolicyIds

Optional. Describes the X.509 certificate policy object identifiers, per
<https://tools.ietf.org/html/rfc5280#section-4.2.1.4>.

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

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

### getAiaOcspServers

Optional. Describes Online Certificate Status Protocol (OCSP) endpoint
addresses that appear in the "Authority Information Access" extension in
the certificate.

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

### setAiaOcspServers

Optional. Describes Online Certificate Status Protocol (OCSP) endpoint
addresses that appear in the "Authority Information Access" extension in
the certificate.

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

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

### getNameConstraints

Optional. Describes the X.509 name constraints extension.

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

### hasNameConstraints

### clearNameConstraints

### setNameConstraints

Optional. Describes the X.509 name constraints extension.

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

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

### getAdditionalExtensions

Optional. Describes custom X.509 extensions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.X509Extension>` |   |

### setAdditionalExtensions

Optional. Describes custom X.509 extensions.

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

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