Table of Contents

Class CompletionStats

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

Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. This data type is not supported in Gemini API.

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

Properties

FailedCount

Output only. The number of entities for which any error was encountered.

[JsonPropertyName("failedCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? FailedCount { get; set; }

Property Value

long?

IncompleteCount

Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected).

[JsonPropertyName("incompleteCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? IncompleteCount { get; set; }

Property Value

long?

SuccessfulCount

Output only. The number of entities that had been processed successfully.

[JsonPropertyName("successfulCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? SuccessfulCount { get; set; }

Property Value

long?

SuccessfulForecastPointCount

Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction.

[JsonPropertyName("successfulForecastPointCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? SuccessfulForecastPointCount { get; set; }

Property Value

long?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a CompletionStats object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

CompletionStats

The deserialized CompletionStats object, or null if deserialization fails.