Share via


TaskResource Class

Definition

The TaskResource.

public class TaskResource : System.ClientModel.Primitives.IJsonModel<Azure.Analytics.Defender.Easm.TaskResource>, System.ClientModel.Primitives.IPersistableModel<Azure.Analytics.Defender.Easm.TaskResource>
type TaskResource = class
    interface IJsonModel<TaskResource>
    interface IPersistableModel<TaskResource>
Public Class TaskResource
Implements IJsonModel(Of TaskResource), IPersistableModel(Of TaskResource)
Inheritance
TaskResource
Implements

Properties

CompletedAt

The time the task completed.

Id

The unique identifier of the task.

LastPolledAt

The last time the status of the task was updated.

Metadata

Attributes unique to the task. This differs by task type.

To assign an object to the value of this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"): Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""): Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }): Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"): Creates a payload of { "key": "value" }.

Phase

The phase the task is in.

Reason

The reason the task was moved into its current state, if the task wasn't completed.

StartedAt

The time the task started.

State

The state the task is in.

Explicit Interface Implementations

IJsonModel<TaskResource>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<TaskResource>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<TaskResource>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<TaskResource>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<TaskResource>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to