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

These values are used to create the distinguished name and subject
alternative name fields in an X.509 certificate.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ subject` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Subject` Optional. Contains distinguished name fields such as the common name, location and organization. |
| `↳ subject_alt_name` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.SubjectAltNames` Optional. The subject alternative name fields. |

### getSubject

Optional. Contains distinguished name fields such as the common name,
location and organization.

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

### hasSubject

### clearSubject

### setSubject

Optional. Contains distinguished name fields such as the common name,
location and organization.

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

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

### getSubjectAltName

Optional. The subject alternative name fields.

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

### hasSubjectAltName

### clearSubjectAltName

### setSubjectAltName

Optional. The subject alternative name fields.

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

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