Table of Contents

Class FileStatus

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

Status of a File that uses a common error model.

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

Properties

Code

The status code. 0 for OK, 1 for CANCELLED

[JsonPropertyName("code")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? Code { get; set; }

Property Value

int?

Details

A list of messages that carry the error details. There is a common set of message types for APIs to use.

[JsonPropertyName("details")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<Dictionary<string, object>>? Details { get; set; }

Property Value

List<Dictionary<string, object>>

Message

A list of messages that carry the error details. There is a common set of message types for APIs to use.

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

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a FileStatus object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

FileStatus

The deserialized FileStatus object, or null if deserialization fails.