Class ControlReferenceImage
-
- All Implemented Interfaces:
-
com.google.genai.types.ReferenceImage
public abstract class ControlReferenceImage extends JsonSerializable implements ReferenceImage
A control reference image.
The image of the control reference image is either a control image provided by the user, or a regular image which the backend will use to generate a control image of. In the case of the latter, the enable_control_image_computation field in the config should be set to True.
A control image is an image that represents a sketch image of areas for the model to fill in based on the prompt.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classControlReferenceImage.BuilderBuilder for ControlReferenceImage.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description ControlReferenceImage()
-
Method Summary
Modifier and Type Method Description abstract Optional<Image>referenceImage()The reference image for the editing operation. abstract Optional<Integer>referenceId()The id of the reference image. abstract Optional<String>referenceType()The type of the reference image. abstract Optional<ControlReferenceConfig>config()Configuration for the control reference image. static ControlReferenceImage.Builderbuilder()Instantiates a builder for ControlReferenceImage. abstract ControlReferenceImage.BuildertoBuilder()Creates a builder with the same values as this instance. static ControlReferenceImagefromJson(String jsonString)Deserializes a JSON string to a ControlReferenceImage object. ReferenceImageAPItoReferenceImageAPI()-
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
referenceImage
abstract Optional<Image> referenceImage()
The reference image for the editing operation.
-
referenceId
abstract Optional<Integer> referenceId()
The id of the reference image.
-
referenceType
abstract Optional<String> referenceType()
The type of the reference image. Only set by the SDK.
-
config
abstract Optional<ControlReferenceConfig> config()
Configuration for the control reference image.
-
builder
static ControlReferenceImage.Builder builder()
Instantiates a builder for ControlReferenceImage.
-
toBuilder
abstract ControlReferenceImage.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static ControlReferenceImage fromJson(String jsonString)
Deserializes a JSON string to a ControlReferenceImage object.
-
toReferenceImageAPI
ReferenceImageAPI toReferenceImageAPI()
-
-
-
-