BatchJob

@Serializable
data class BatchJob(val name: String, val metadata: BatchJobMetadata? = null, val done: Boolean? = null, val error: GeminiError? = null, val response: BatchJobResponse? = null)

Represents the response from a batch job creation or retrieval. This corresponds to the Operation resource in the API.

Constructors

Link copied to clipboard
constructor(name: String, metadata: BatchJobMetadata? = null, done: Boolean? = null, error: GeminiError? = null, response: BatchJobResponse? = null)

Properties

Link copied to clipboard
val done: Boolean?

If the value is false, it means the operation is still in progress.

Link copied to clipboard

The error result of the operation in case of failure or cancellation.

Link copied to clipboard

Service-specific metadata associated with the operation.

Link copied to clipboard
val name: String

The server-assigned name of the operation (e.g., "operations/..."). Note: In some contexts, this might be "batches/..." if the API returns the resource directly, but the documentation suggests it returns an Operation.

Link copied to clipboard

The normal, successful response of the operation.