# Memorystore for Memcached V1 Client - Class GetInstanceRequest (2.1.2)

2.1.2 (latest) 2.1.1 2.0.4 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Memorystore for Memcached V1 Client class GetInstanceRequest.

Request for [GetInstance](https://docs.cloud.google.com/php/docs/reference/cloud-memcache/latest/V1.Client.CloudMemcacheClient#_Google_Cloud_Memcache_V1_Client_CloudMemcacheClient__getInstance__).

Generated from protobuf message `google.cloud.memcache.v1.GetInstanceRequest`

## Namespace

Google \\ Cloud \\ Memcache \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. Memcached instance resource name in the format: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region |

### getName

Required. Memcached instance resource name in the format:
`projects/{project_id}/locations/{location_id}/instances/{instance_id}`
where `location_id` refers to a GCP region

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

### setName

Required. Memcached instance resource name in the format:
`projects/{project_id}/locations/{location_id}/instances/{instance_id}`
where `location_id` refers to a GCP region

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

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

### static::build

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Memcached instance resource name in the format: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region Please see CloudMemcacheClient::instanceName() for help formatting this field. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-memcache/latest/V1.GetInstanceRequest` |   |