# Google Cloud Tasks v2 API - Class Attempt (3.6.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [3.6.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Attempt)
- [3.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.5.0/Google.Cloud.Tasks.V2.Attempt)
- [3.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.4.0/Google.Cloud.Tasks.V2.Attempt)
- [3.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.3.0/Google.Cloud.Tasks.V2.Attempt)
- [3.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.2.0/Google.Cloud.Tasks.V2.Attempt)
- [3.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.1.0/Google.Cloud.Tasks.V2.Attempt)
- [3.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.0.0/Google.Cloud.Tasks.V2.Attempt)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/2.5.0/Google.Cloud.Tasks.V2.Attempt)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/2.4.0/Google.Cloud.Tasks.V2.Attempt)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/2.3.0/Google.Cloud.Tasks.V2.Attempt)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/2.2.0/Google.Cloud.Tasks.V2.Attempt)

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

Reference documentation and code samples for the Google Cloud Tasks v2 API class Attempt.

The status of a task attempt.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.Tasks.V2.dll

## Constructors

### Attempt()

    public Attempt()

### Attempt(Attempt)

    public Attempt(Attempt other)

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

## Properties

### DispatchTime

    public Timestamp DispatchTime { get; set; }

Output only. The time that this attempt was dispatched.

`dispatch_time` will be truncated to the nearest microsecond.

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

### ResponseStatus

    public Status ResponseStatus { get; set; }

Output only. The response from the worker for this attempt.

If `response_time` is unset, then the task has not been attempted or is
currently running and the `response_status` field is meaningless.

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

### ResponseTime

    public Timestamp ResponseTime { get; set; }

Output only. The time that this attempt response was received.

`response_time` will be truncated to the nearest microsecond.

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

### ScheduleTime

    public Timestamp ScheduleTime { get; set; }

Output only. The time that this attempt was scheduled.

`schedule_time` will be truncated to the nearest microsecond.

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