Table of Contents

Class GeneratedImageMask

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

A generated image mask.

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

Properties

Labels

The detected entities on the segmented area.

[JsonPropertyName("labels")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<EntityLabel>? Labels { get; set; }

Property Value

List<EntityLabel>

Mask

The generated image mask.

[JsonPropertyName("mask")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Image? Mask { get; set; }

Property Value

Image

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a GeneratedImageMask object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

GeneratedImageMask

The deserialized GeneratedImageMask object, or null if deserialization fails.