Table of Contents

Class BatchJob

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Config for batches.create return value.

public record BatchJob : IEquatable<BatchJob>
Inheritance
BatchJob
Implements
Inherited Members

Properties

CompletionStats

Statistics on completed and failed prediction instances. This field is for Gemini Enterprise Agent Platform only.

[JsonPropertyName("completionStats")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public CompletionStats? CompletionStats { get; set; }

Property Value

CompletionStats

CreateTime

The time when the BatchJob was created.

[JsonPropertyName("createTime")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? CreateTime { get; set; }

Property Value

DateTime?

Dest

Configuration for the output data.

[JsonPropertyName("dest")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public BatchJobDestination? Dest { get; set; }

Property Value

BatchJobDestination

DisplayName

The display name of the BatchJob.

[JsonPropertyName("displayName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? DisplayName { get; set; }

Property Value

string

EndTime

The time when the BatchJob was completed. This field is for Gemini Enterprise Agent Platform only.

[JsonPropertyName("endTime")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? EndTime { get; set; }

Property Value

DateTime?

Error

Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.

[JsonPropertyName("error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public JobError? Error { get; set; }

Property Value

JobError

Model

The name of the model that produces the predictions via the BatchJob.

[JsonPropertyName("model")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Model { get; set; }

Property Value

string

Name

The resource name of the BatchJob. Output only.".

[JsonPropertyName("name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Name { get; set; }

Property Value

string

OutputInfo

Information further describing the output of this job. Output only.

[JsonPropertyName("outputInfo")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public BatchJobOutputInfo? OutputInfo { get; set; }

Property Value

BatchJobOutputInfo

Src

Configuration for the input data. This field is for Gemini Enterprise Agent Platform only.

[JsonPropertyName("src")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public BatchJobSource? Src { get; set; }

Property Value

BatchJobSource

StartTime

Output only. Time when the Job for the first time entered the JOB_STATE_RUNNING state.

[JsonPropertyName("startTime")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? StartTime { get; set; }

Property Value

DateTime?

State

The state of the BatchJob.

[JsonPropertyName("state")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public JobState? State { get; set; }

Property Value

JobState?

UpdateTime

The time when the BatchJob was last updated.

[JsonPropertyName("updateTime")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? UpdateTime { get; set; }

Property Value

DateTime?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a BatchJob object.

public static BatchJob? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

BatchJob

The deserialized BatchJob object, or null if deserialization fails.