Table of Contents

Class EntityLabel

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

An entity representing the segmented area.

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

Properties

Label

The label of the segmented entity.

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

Property Value

string

Score

The confidence score of the detected label.

[JsonPropertyName("score")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableDoubleConverter))]
public double? Score { get; set; }

Property Value

double?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a EntityLabel object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

EntityLabel

The deserialized EntityLabel object, or null if deserialization fails.