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

[SubjectAltNames](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.SubjectAltNames)
corresponds to a more modern way of listing what the asserted identity is in
a certificate (i.e., compared to the "common name" in the distinguished
name).

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ dns_names` | `string[]` Contains only valid, fully-qualified host names. |
| `↳ uris` | `string[]` Contains only valid RFC 3986 URIs. |
| `↳ email_addresses` | `string[]` Contains only valid RFC 2822 E-mail addresses. |
| `↳ ip_addresses` | `string[]` Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses. |
| `↳ custom_sans` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.X509Extension>` Contains additional subject alternative name values. For each custom_san, the `value` field must contain an ASN.1 encoded UTF8String. |

### getDnsNames

Contains only valid, fully-qualified host names.

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

### setDnsNames

Contains only valid, fully-qualified host names.

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

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

### getUris

Contains only valid RFC 3986 URIs.

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

### setUris

Contains only valid RFC 3986 URIs.

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

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

### getEmailAddresses

Contains only valid RFC 2822 E-mail addresses.

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

### setEmailAddresses

Contains only valid RFC 2822 E-mail addresses.

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

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

### getIpAddresses

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

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

### setIpAddresses

Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.

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

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

### getCustomSans

Contains additional subject alternative name values.

For each custom_san, the `value` field must contain an ASN.1 encoded
UTF8String.

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

### setCustomSans

Contains additional subject alternative name values.

For each custom_san, the `value` field must contain an ASN.1 encoded
UTF8String.

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

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