# Workload Manager v1 API - Class Command (1.0.0-beta01)

    public sealed class Command : IMessage<Command>, IEquatable<Command>, IDeepCloneable<Command>, IBufferMessage, IMessage

Reference documentation and code samples for the Workload Manager v1 API class Command.

Command specifies the type of command to execute.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Command

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Command](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.Command), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Command](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.Command), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Command](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.Command), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.WorkloadManager.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1)

## Assembly

Google.Cloud.WorkloadManager.V1.dll

## Constructors

### Command()

    public Command()

### Command(Command)

    public Command(Command other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.Command` |

## Properties

### AgentCommand

    public AgentCommand AgentCommand { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.AgentCommand` |   |

### CommandTypeCase

    public Command.CommandTypeOneofCase CommandTypeCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.Commandhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.Command.CommandTypeOneofCase` |   |

### ShellCommand

    public ShellCommand ShellCommand { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.WorkloadManager.V1/latest/Google.Cloud.WorkloadManager.V1.ShellCommand` |   |