# Google Cloud OsConfig V1 Client - Class ExecStepConfig (2.2.3)

2.2.3 (latest) 2.2.2 2.1.0 2.0.5 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud OsConfig V1 Client class ExecStepConfig.

Common configurations for an ExecStep.

Generated from protobuf message `google.cloud.osconfig.v1.ExecStepConfig`

## Namespace

Google \\ Cloud \\ OsConfig \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ local_path` | `string` An absolute path to the executable on the VM. |
| `↳ gcs_object` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.GcsObject` A Cloud Storage object containing the executable. |
| `↳ allowed_success_codes` | `int[]` Defaults to \[0\]. A list of possible return values that the execution can return to indicate a success. |
| `↳ interpreter` | `int` The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines](https://en.wikipedia.org/wiki/Shebang_(Unix)). |

### getLocalPath

An absolute path to the executable on the VM.

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

### hasLocalPath

### setLocalPath

An absolute path to the executable on the VM.

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

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

### getGcsObject

A Cloud Storage object containing the executable.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.GcsObject|null` |   |

### hasGcsObject

### setGcsObject

A Cloud Storage object containing the executable.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.GcsObject` |

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

### getAllowedSuccessCodes

Defaults to \[0\]. A list of possible return values that the
execution can return to indicate a success.

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

### setAllowedSuccessCodes

Defaults to \[0\]. A list of possible return values that the
execution can return to indicate a success.

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

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

### getInterpreter

The script interpreter to use to run the script. If no interpreter is
specified the script will be executed directly, which will likely
only succeed for scripts with [shebang lines](https://en.wikipedia.org/wiki/Shebang_(Unix)).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Interpreter](https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.ExecStepConfig.Interpreter). |

### setInterpreter

The script interpreter to use to run the script. If no interpreter is
specified the script will be executed directly, which will likely
only succeed for scripts with [shebang lines](https://en.wikipedia.org/wiki/Shebang_(Unix)).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Interpreter](https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.ExecStepConfig.Interpreter). |

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

### getExecutable

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