Package com.google.genai.types
Class ReferenceImageAPI
-
- All Implemented Interfaces:
@InternalApi() public abstract class ReferenceImageAPI extends JsonSerializable
Private class that represents a Reference image that is sent to API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classReferenceImageAPI.BuilderBuilder for ReferenceImageAPI.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description ReferenceImageAPI()
-
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<MaskReferenceConfig>maskImageConfig()Configuration for the mask reference image. abstract Optional<ControlReferenceConfig>controlImageConfig()Configuration for the control reference image. abstract Optional<StyleReferenceConfig>styleImageConfig()Configuration for the style reference image. abstract Optional<SubjectReferenceConfig>subjectImageConfig()Configuration for the subject reference image. static ReferenceImageAPI.Builderbuilder()Instantiates a builder for ReferenceImageAPI. abstract ReferenceImageAPI.BuildertoBuilder()Creates a builder with the same values as this instance. static ReferenceImageAPIfromJson(String jsonString)Deserializes a JSON string to a ReferenceImageAPI object. -
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.
-
maskImageConfig
abstract Optional<MaskReferenceConfig> maskImageConfig()
Configuration for the mask reference image.
-
controlImageConfig
abstract Optional<ControlReferenceConfig> controlImageConfig()
Configuration for the control reference image.
-
styleImageConfig
abstract Optional<StyleReferenceConfig> styleImageConfig()
Configuration for the style reference image.
-
subjectImageConfig
abstract Optional<SubjectReferenceConfig> subjectImageConfig()
Configuration for the subject reference image.
-
builder
static ReferenceImageAPI.Builder builder()
Instantiates a builder for ReferenceImageAPI.
-
toBuilder
abstract ReferenceImageAPI.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static ReferenceImageAPI fromJson(String jsonString)
Deserializes a JSON string to a ReferenceImageAPI object.
-
-
-
-