Package com.google.genai.types
Class ContentReferenceImage
-
- All Implemented Interfaces:
-
com.google.genai.types.ReferenceImage
public abstract class ContentReferenceImage extends JsonSerializable implements ReferenceImage
A content reference image.
A content reference image represents a subject to reference (ex. person, product, animal) provided by the user. It can optionally be provided in addition to a style reference image (ex. background, style reference).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classContentReferenceImage.BuilderBuilder for ContentReferenceImage.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description ContentReferenceImage()
-
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. static ContentReferenceImage.Builderbuilder()Instantiates a builder for ContentReferenceImage. abstract ContentReferenceImage.BuildertoBuilder()Creates a builder with the same values as this instance. static ContentReferenceImagefromJson(String jsonString)Deserializes a JSON string to a ContentReferenceImage 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.
-
builder
static ContentReferenceImage.Builder builder()
Instantiates a builder for ContentReferenceImage.
-
toBuilder
abstract ContentReferenceImage.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static ContentReferenceImage fromJson(String jsonString)
Deserializes a JSON string to a ContentReferenceImage object.
-
toReferenceImageAPI
ReferenceImageAPI toReferenceImageAPI()
-
-
-
-