Table of Contents

Class VideoGenerationMask

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

A mask for video generation.

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

Properties

Image

The image mask to use for generating videos.

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

Property Value

Image

MaskMode

Describes how the mask will be used. Inpainting masks must match the aspect ratio of the input video. Outpainting masks can be either 9:16 or 16:9.

[JsonPropertyName("maskMode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public VideoGenerationMaskMode? MaskMode { get; set; }

Property Value

VideoGenerationMaskMode?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a VideoGenerationMask object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

VideoGenerationMask

The deserialized VideoGenerationMask object, or null if deserialization fails.