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