Table of Contents

Class ControlReferenceConfig

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

Configuration for a Control reference image.

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

Properties

ControlType

The type of control reference image to use.

[JsonPropertyName("controlType")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ControlReferenceType? ControlType { get; set; }

Property Value

ControlReferenceType?

EnableControlImageComputation

Defaults to False. When set to True, the control image will be computed by the model based on the control type. When set to False, the control image must be provided by the user.

[JsonPropertyName("enableControlImageComputation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? EnableControlImageComputation { get; set; }

Property Value

bool?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a ControlReferenceConfig object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

ControlReferenceConfig

The deserialized ControlReferenceConfig object, or null if deserialization fails.