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

A [CertificateConfig](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateConfig)
describes an X.509 certificate or CSR that is to be created, as an
alternative to using ASN.1.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ subject_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateConfig.SubjectConfig` Required. Specifies some of the values in a certificate that are related to the subject. |
| `↳ x509_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.X509Parameters` Required. Describes how some of the technical X.509 fields in a certificate should be populated. |
| `↳ public_key` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.PublicKey` Optional. The public key that corresponds to this config. This is, for example, used when issuing [Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate), but not when creating a self-signed [CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority) or [CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority) CSR. |
| `↳ subject_key_id` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateConfig.KeyId` Optional. When specified this provides a custom SKI to be used in the certificate. This should only be used to maintain a SKI of an existing CA originally created outside CA service, which was not generated using method (1) described in RFC 5280 section 4.2.1.2. |

### getSubjectConfig

Required. Specifies some of the values in a certificate that are related to
the subject.

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

### hasSubjectConfig

### clearSubjectConfig

### setSubjectConfig

Required. Specifies some of the values in a certificate that are related to
the subject.

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

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

### getX509Config

Required. Describes how some of the technical X.509 fields in a certificate
should be populated.

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

### hasX509Config

### clearX509Config

### setX509Config

Required. Describes how some of the technical X.509 fields in a certificate
should be populated.

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

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

### getPublicKey

Optional. The public key that corresponds to this config. This is, for
example, used when issuing
[Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate), but not
when creating a self-signed
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
or
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
CSR.

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

### hasPublicKey

### clearPublicKey

### setPublicKey

Optional. The public key that corresponds to this config. This is, for
example, used when issuing
[Certificates](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate), but not
when creating a self-signed
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
or
[CertificateAuthority](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)
CSR.

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

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

### getSubjectKeyId

Optional. When specified this provides a custom SKI to be used in the
certificate. This should only be used to maintain a SKI of an existing CA
originally created outside CA service, which was not generated using method
(1) described in RFC 5280 section 4.2.1.2.

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

### hasSubjectKeyId

### clearSubjectKeyId

### setSubjectKeyId

Optional. When specified this provides a custom SKI to be used in the
certificate. This should only be used to maintain a SKI of an existing CA
originally created outside CA service, which was not generated using method
(1) described in RFC 5280 section 4.2.1.2.

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

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