Table of Contents

Class LiveConnectConstraints

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

Config for LiveConnectConstraints for Auth Token creation.

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

Properties

Config

Configuration specific to Live API connections created using this token.

[JsonPropertyName("config")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveConnectConfig? Config { get; set; }

Property Value

LiveConnectConfig

Model

ID of the model to configure in the ephemeral token for Live API. For a list of models, see Gemini models <https://ai.google.dev/gemini-api/docs/models>.

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

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a LiveConnectConstraints object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

LiveConnectConstraints

The deserialized LiveConnectConstraints object, or null if deserialization fails.