# Cloud KMS V1 Client - Class ServiceResolver (2.9.0)

2.9.0 (latest) 2.8.0 2.7.0 2.6.0 2.5.2 2.4.0 2.3.1 2.2.0 2.1.6 2.0.0 1.23.0 1.22.1 1.21.4 1.20.3 1.19.0 1.18.1 1.17.0 1.16.4 1.15.3 Reference documentation and code samples for the Cloud KMS V1 Client class ServiceResolver.

A [ServiceResolver](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.EkmConnection.ServiceResolver)
represents an EKM replica that can be reached within an
[EkmConnection](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.EkmConnection).

Generated from protobuf message `google.cloud.kms.v1.EkmConnection.ServiceResolver`

## Namespace

Google \\ Cloud \\ Kms \\ V1 \\ EkmConnection

## Methods

### __construct

Constructor.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `mixed` |

### getServiceDirectoryService

Required. The resource name of the Service Directory service pointing to
an EKM replica, in the format
`projects/*/locations/*/namespaces/*/services/*`.

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

### setServiceDirectoryService

Required. The resource name of the Service Directory service pointing to
an EKM replica, in the format
`projects/*/locations/*/namespaces/*/services/*`.

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

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

### getEndpointFilter

Optional. The filter applied to the endpoints of the resolved service. If
no filter is specified, all endpoints will be considered. An endpoint
will be chosen arbitrarily from the filtered list for each request.

For endpoint filter syntax and examples, see
<https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest>.

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

### setEndpointFilter

Optional. The filter applied to the endpoints of the resolved service. If
no filter is specified, all endpoints will be considered. An endpoint
will be chosen arbitrarily from the filtered list for each request.

For endpoint filter syntax and examples, see
<https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest>.

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

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

### getHostname

Required. The hostname of the EKM replica used at TLS and HTTP layers.

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

### setHostname

Required. The hostname of the EKM replica used at TLS and HTTP layers.

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

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

### getServerCertificates

Required. A list of leaf server certificates used to authenticate HTTPS
connections to the EKM replica. Currently, a maximum of 10
[Certificate](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate) is supported.

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

### setServerCertificates

Required. A list of leaf server certificates used to authenticate HTTPS
connections to the EKM replica. Currently, a maximum of 10
[Certificate](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate) is supported.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Certificate>` |

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