Table of Contents

Class SubjectReferenceImage

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

A subject reference image. This encapsulates a subject reference image provided by the user, and additionally optional config parameters for the subject reference image. A raw reference image can also be provided as a destination for the subject to be applied to.

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

Properties

Config

Configuration for the subject reference image.

[JsonPropertyName("config")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SubjectReferenceConfig? Config { get; set; }

Property Value

SubjectReferenceConfig

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 SubjectReferenceImage object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

SubjectReferenceImage

The deserialized SubjectReferenceImage object, or null if deserialization fails.