# BigQuery Migration v2 API - Class MigrationSubtask (1.7.0)

1.7.0 (latest) 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

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

Reference documentation and code samples for the BigQuery Migration v2 API class MigrationSubtask.

A subtask for a migration which carries details about the configuration of
the subtask. The content of the details should not matter to the end user,
but is a contract between the subtask creator and subtask worker.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[MigrationSubtask](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.MigrationSubtask), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[MigrationSubtask](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.MigrationSubtask), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[MigrationSubtask](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.MigrationSubtask), [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.BigQuery.Migration.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2)

## Assembly

Google.Cloud.BigQuery.Migration.V2.dll

## Constructors

### MigrationSubtask()

    public MigrationSubtask()

### MigrationSubtask(MigrationSubtask)

    public MigrationSubtask(MigrationSubtask other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.MigrationSubtask` |

## Properties

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. Time when the subtask was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### LastUpdateTime

    public Timestamp LastUpdateTime { get; set; }

Output only. Time when the subtask was last updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### Metrics

    public RepeatedField<TimeSeries> Metrics { get; }

Output only. The metrics for the subtask.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.TimeSeries` |   |

### MigrationSubtaskName

    public MigrationSubtaskName MigrationSubtaskName { get; set; }

[MigrationSubtaskName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.MigrationSubtaskName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.MigrationSubtask#Google_Cloud_BigQuery_Migration_V2_MigrationSubtask_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.MigrationSubtaskName` |   |

### Name

    public string Name { get; set; }

Output only. Immutable. The resource name for the migration subtask. The ID
is server-generated.

Example: `projects/123/locations/us/workflows/345/subtasks/678`

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ProcessingError

    public ErrorInfo ProcessingError { get; set; }

Output only. An explanation that may be populated when the task is in
FAILED state.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.ErrorInfo.html` |   |

### ResourceErrorCount

    public int ResourceErrorCount { get; set; }

Output only. The number or resources with errors. Note: This is not the
total number of errors as each resource can have more than one error. This
is used to indicate truncation by having a `resource_error_count` that is
higher than the size of `resource_error_details`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### ResourceErrorDetails

    public RepeatedField<ResourceErrorDetail> ResourceErrorDetails { get; }

Output only. Provides details to errors and issues encountered while
processing the subtask. Presence of error details does not mean that the
subtask failed.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.ResourceErrorDetail` |   |

### State

    public MigrationSubtask.Types.State State { get; set; }

Output only. The current state of the subtask.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.MigrationSubtaskhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.MigrationSubtask.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Migration.V2/latest/Google.Cloud.BigQuery.Migration.V2.MigrationSubtask.Types.State` |   |

### TaskId

    public string TaskId { get; set; }

The unique ID of the task to which this subtask belongs.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Type

    public string Type { get; set; }

The type of the Subtask. The migration service does not check whether this
is a known type. It is up to the task creator (i.e. orchestrator or worker)
to ensure it only creates subtasks for which there are compatible workers
polling for Subtasks.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |