# Grafeas V1 Client - Class Command (1.7.0)

1.7.0 (latest) 1.6.0 1.5.0 1.4.0 1.3.2 1.2.2 1.1.3 1.0.0 0.10.3 0.9.0 0.8.3 0.7.1 0.6.0 0.5.0 0.4.4 Reference documentation and code samples for the Grafeas V1 Client class Command.

Command describes a step performed as part of the build pipeline.

Generated from protobuf message `grafeas.v1.Command`

## Namespace

Grafeas \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. Name of the command, as presented on the command line, or if the command is packaged as a Docker container, as presented to `docker pull`. |
| `↳ env` | `string[]` Environment variables set before running this command. |
| `↳ args` | `string[]` Command-line arguments used when executing this command. |
| `↳ dir` | `string` Working directory (relative to project source root) used when running this command. |
| `↳ id` | `string` Optional unique identifier for this command, used in wait_for to reference this command as a dependency. |
| `↳ wait_for` | `string[]` The ID(s) of the command(s) that this command depends on. |

### getName

Required. Name of the command, as presented on the command line, or if the
command is packaged as a Docker container, as presented to `docker pull`.

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

### setName

Required. Name of the command, as presented on the command line, or if the
command is packaged as a Docker container, as presented to `docker pull`.

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

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

### getEnv

Environment variables set before running this command.

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

### setEnv

Environment variables set before running this command.

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

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

### getArgs

Command-line arguments used when executing this command.

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

### setArgs

Command-line arguments used when executing this command.

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

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

### getDir

Working directory (relative to project source root) used when running this
command.

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

### setDir

Working directory (relative to project source root) used when running this
command.

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

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

### getId

Optional unique identifier for this command, used in wait_for to reference
this command as a dependency.

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

### setId

Optional unique identifier for this command, used in wait_for to reference
this command as a dependency.

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

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

### getWaitFor

The ID(s) of the command(s) that this command depends on.

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

### setWaitFor

The ID(s) of the command(s) that this command depends on.

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

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