Table of Contents

Class PartMediaResolution

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

Media resolution for the input media.

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

Properties

Level

The tokenization quality used for given media.

[JsonPropertyName("level")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PartMediaResolutionLevel? Level { get; set; }

Property Value

PartMediaResolutionLevel?

NumTokens

Specifies the required sequence length for media tokenization.

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

Property Value

int?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a PartMediaResolution object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

PartMediaResolution

The deserialized PartMediaResolution object, or null if deserialization fails.