# Google Cloud Workload Manager V1 Client - Class Command (0.2.0)

0.2.0 (latest) 0.1.0 Reference documentation and code samples for the Google Cloud Workload Manager V1 Client class Command.

Command specifies the type of command to execute.

Generated from protobuf message `google.cloud.workloadmanager.v1.Command`

## Namespace

Google \\ Cloud \\ WorkloadManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ agent_command` | `https://docs.cloud.google.com/php/docs/reference/cloud-workloadmanager/latest/V1.AgentCommand` AgentCommand specifies a one-time executable program for the agent to run. |
| `↳ shell_command` | `https://docs.cloud.google.com/php/docs/reference/cloud-workloadmanager/latest/V1.ShellCommand` ShellCommand is invoked via the agent's command line executor. |

### getAgentCommand

AgentCommand specifies a one-time executable program for the agent to
run.

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

### hasAgentCommand

### setAgentCommand

AgentCommand specifies a one-time executable program for the agent to
run.

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

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

### getShellCommand

ShellCommand is invoked via the agent's command line executor.

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

### hasShellCommand

### setShellCommand

ShellCommand is invoked via the agent's command line executor.

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

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

### getCommandType

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