# Google Cloud Functions V2 Client - Class GetFunctionRequest (2.1.3)

2.1.3 (latest) 2.1.2 2.0.6 1.7.0 1.6.5 1.5.0 1.4.2 1.3.1 1.2.0 1.1.2 1.0.3 Reference documentation and code samples for the Google Cloud Functions V2 Client class GetFunctionRequest.

Request for the `GetFunction` method.

Generated from protobuf message `google.cloud.functions.v2.GetFunctionRequest`

## Namespace

Google \\ Cloud \\ Functions \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The name of the function which details should be obtained. |
| `↳ revision` | `string` Optional. The optional version of the 1st gen function whose details should be obtained. The version of a 1st gen function is an integer that starts from 1 and gets incremented on redeployments. GCF may keep historical configs for old versions of 1st gen function. This field can be specified to fetch the historical configs. This field is valid only for GCF 1st gen function. |

### getName

Required. The name of the function which details should be obtained.

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

### setName

Required. The name of the function which details should be obtained.

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

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

### getRevision

Optional. The optional version of the 1st gen function whose details should
be obtained. The version of a 1st gen function is an integer that starts
from 1 and gets incremented on redeployments. GCF may keep historical
configs for old versions of 1st gen function. This field can be specified
to fetch the historical configs. This field is valid only for GCF 1st gen
function.

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

### setRevision

Optional. The optional version of the 1st gen function whose details should
be obtained. The version of a 1st gen function is an integer that starts
from 1 and gets incremented on redeployments. GCF may keep historical
configs for old versions of 1st gen function. This field can be specified
to fetch the historical configs. This field is valid only for GCF 1st gen
function.

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

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

### static::build

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the function which details should be obtained. Please see FunctionServiceClient::functionName() for help formatting this field. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.GetFunctionRequest` |   |