Table of Contents

Class Operations

Namespace
Google.GenAI
Assembly
Google.GenAI.dll
public sealed class Operations
Inheritance
Operations
Inherited Members

Constructors

Operations(ApiClient)

public Operations(ApiClient apiClient)

Parameters

apiClient ApiClient

Methods

GetAsync<TOperation>(TOperation, GetOperationConfig?, CancellationToken)

Gets the status of a long-running operation.

public Task<TOperation> GetAsync<TOperation>(TOperation operation, GetOperationConfig? config, CancellationToken cancellationToken = default) where TOperation : Operation<TOperation>

Parameters

operation TOperation

An operation instance to get the status for.

config GetOperationConfig

A GetOperationConfig instance that specifies the optional configurations.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the operation.

Returns

Task<TOperation>

A Task<TResult> that represents the asynchronous operation. The task result contains the updated TOperation instance with the latest status or result.

Type Parameters

TOperation

The type of the operation.