Table of Contents

Class RawReferenceImage

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

A raw reference image. A raw reference image represents the base image to edit, provided by the user. It can optionally be provided in addition to a mask reference image or a style reference image.

public record RawReferenceImage : IReferenceImage, IEquatable<RawReferenceImage>
Inheritance
RawReferenceImage
Implements
Inherited Members

Properties

ReferenceId

The id of the reference image.

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

Property Value

int?

ReferenceImage

The reference image for the editing operation.

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

Property Value

Image

ReferenceType

The type of the reference image. Only set by the SDK.

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

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a RawReferenceImage object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

RawReferenceImage

The deserialized RawReferenceImage object, or null if deserialization fails.