Package com.google.genai.types
Class RawReferenceImage
-
- All Implemented Interfaces:
-
com.google.genai.types.ReferenceImage
public abstract class RawReferenceImage extends JsonSerializable implements ReferenceImage
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classRawReferenceImage.BuilderBuilder for RawReferenceImage.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description RawReferenceImage()
-
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 RawReferenceImage.Builderbuilder()Instantiates a builder for RawReferenceImage. abstract RawReferenceImage.BuildertoBuilder()Creates a builder with the same values as this instance. static RawReferenceImagefromJson(String jsonString)Deserializes a JSON string to a RawReferenceImage 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 RawReferenceImage.Builder builder()
Instantiates a builder for RawReferenceImage.
-
toBuilder
abstract RawReferenceImage.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static RawReferenceImage fromJson(String jsonString)
Deserializes a JSON string to a RawReferenceImage object.
-
toReferenceImageAPI
ReferenceImageAPI toReferenceImageAPI()
-
-
-
-