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

[Subject](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.Subject) describes parts of a
distinguished name that, in turn, describes the subject of the certificate.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ common_name` | `string` The "common name" of the subject. |
| `↳ country_code` | `string` The country code of the subject. |
| `↳ organization` | `string` The organization of the subject. |
| `↳ organizational_unit` | `string` The organizational_unit of the subject. |
| `↳ locality` | `string` The locality or city of the subject. |
| `↳ province` | `string` The province, territory, or regional state of the subject. |
| `↳ street_address` | `string` The street address of the subject. |
| `↳ postal_code` | `string` The postal code of the subject. |
| `↳ rdn_sequence` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.RelativeDistinguishedName>` This field can be used in place of the named subject fields. |

### getCommonName

The "common name" of the subject.

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

### setCommonName

The "common name" of the subject.

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

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

### getCountryCode

The country code of the subject.

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

### setCountryCode

The country code of the subject.

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

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

### getOrganization

The organization of the subject.

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

### setOrganization

The organization of the subject.

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

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

### getOrganizationalUnit

The organizational_unit of the subject.

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

### setOrganizationalUnit

The organizational_unit of the subject.

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

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

### getLocality

The locality or city of the subject.

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

### setLocality

The locality or city of the subject.

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

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

### getProvince

The province, territory, or regional state of the subject.

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

### setProvince

The province, territory, or regional state of the subject.

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

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

### getStreetAddress

The street address of the subject.

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

### setStreetAddress

The street address of the subject.

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

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

### getPostalCode

The postal code of the subject.

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

### setPostalCode

The postal code of the subject.

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

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

### getRdnSequence

This field can be used in place of the named subject fields.

| **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.RelativeDistinguishedName>` |   |

### setRdnSequence

This field can be used in place of the named subject fields.

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

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