# Google Cloud Shell V1 Client - Class StartEnvironmentRequest (2.2.0)

2.2.0 (latest) 2.1.2 2.0.5 1.3.5 1.2.2 1.1.1 1.0.4 Reference documentation and code samples for the Google Cloud Shell V1 Client class StartEnvironmentRequest.

Request message for
[StartEnvironment](https://docs.cloud.google.com/php/docs/reference/cloud-shell/latest/V1.Client.CloudShellServiceClient#_Google_Cloud_Shell_V1_Client_CloudShellServiceClient__startEnvironment__).

Generated from protobuf message `google.cloud.shell.v1.StartEnvironmentRequest`

## Namespace

Google \\ Cloud \\ Shell \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Name of the resource that should be started, for example `users/me/environments/default` or `users/someone\@example.com/environments/default`. |
| `↳ access_token` | `string` The initial access token passed to the environment. If this is present and valid, the environment will be pre-authenticated with gcloud so that the user can run gcloud commands in Cloud Shell without having to log in. This code can be updated later by calling AuthorizeEnvironment. |
| `↳ public_keys` | `string[]` Public keys that should be added to the environment before it is started. |

### getName

Name of the resource that should be started, for example
`users/me/environments/default` or
`users/someone\@example.com/environments/default`.

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

### setName

Name of the resource that should be started, for example
`users/me/environments/default` or
`users/someone\@example.com/environments/default`.

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

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

### getAccessToken

The initial access token passed to the environment. If this is present and
valid, the environment will be pre-authenticated with gcloud so that the
user can run gcloud commands in Cloud Shell without having to log in. This
code can be updated later by calling AuthorizeEnvironment.

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

### setAccessToken

The initial access token passed to the environment. If this is present and
valid, the environment will be pre-authenticated with gcloud so that the
user can run gcloud commands in Cloud Shell without having to log in. This
code can be updated later by calling AuthorizeEnvironment.

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

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

### getPublicKeys

Public keys that should be added to the environment before it is started.

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

### setPublicKeys

Public keys that should be added to the environment before it is started.

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

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