# BigQuery Migration v2 API - Class MigrationTask (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 MigrationTask : IMessage<MigrationTask>, IEquatable<MigrationTask>, IDeepCloneable<MigrationTask>, IBufferMessage, IMessage

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

A single task for a migration which has details about the configuration of
the task.

## Inheritance

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

## Implements

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

### MigrationTask()

    public MigrationTask()

### MigrationTask(MigrationTask)

    public MigrationTask(MigrationTask other)

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

## Properties

### AssessmentTaskDetails

    public AssessmentTaskDetails AssessmentTaskDetails { get; set; }

Task configuration for Assessment.

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

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. Time when the task was created.

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

### Id

    public string Id { get; set; }

Output only. Immutable. The unique identifier for the migration task. The
ID is server-generated.

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

### LastUpdateTime

    public Timestamp LastUpdateTime { get; set; }

Output only. Time when the task 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 task.

| **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` |   |

### 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 task. Presence of error details does not mean that the task
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 MigrationTask.Types.State State { get; set; }

Output only. The current state of the task.

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

### TaskDetailsCase

    public MigrationTask.TaskDetailsOneofCase TaskDetailsCase { get; }

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

### TaskResult

    public MigrationTaskResult TaskResult { get; set; }

Output only. The result of the task.

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

### TotalProcessingErrorCount

    public int TotalProcessingErrorCount { get; set; }

Output only. Count of all the processing errors in this task and its
subtasks.

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

### TotalResourceErrorCount

    public int TotalResourceErrorCount { get; set; }

Output only. Count of all the resource errors in this task and its
subtasks.

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

### TranslationConfigDetails

    public TranslationConfigDetails TranslationConfigDetails { get; set; }

Task configuration for CW Batch/Offline SQL Translation.

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

### TranslationDetails

    public TranslationDetails TranslationDetails { get; set; }

Task details for unified SQL Translation.

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

### Type

    public string Type { get; set; }

The type of the task. This must be one of the supported task types.

Assessment:

- `Assessment_Hive` - Assessment for Hive.
- `Assessment_Redshift` - Assessment for Redshift.
- `Assessment_Snowflake` - Assessment for Snowflake.
- `Assessment_Teradata_v2` - Assessment for Teradata.
- `Assessment_Oracle` - Assessment for Oracle.
- `Assessment_Hadoop` - Assessment for Hadoop.
- `Assessment_Informatica` - Assessment for Informatica.

Translation:
See [Supported Task
Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types)
for a list of supported task types.

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