Package com.google.genai.types
Class RecontextImageSource
-
- All Implemented Interfaces:
public abstract class RecontextImageSource extends JsonSerializable
A set of source input(s) for image recontextualization.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classRecontextImageSource.BuilderBuilder for RecontextImageSource.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description RecontextImageSource()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>prompt()A text prompt for guiding the model during image recontextualization. abstract Optional<Image>personImage()Image of the person or subject who will be wearing the product(s). abstract Optional<List<ProductImage>>productImages()A list of product images. static RecontextImageSource.Builderbuilder()Instantiates a builder for RecontextImageSource. abstract RecontextImageSource.BuildertoBuilder()Creates a builder with the same values as this instance. static RecontextImageSourcefromJson(String jsonString)Deserializes a JSON string to a RecontextImageSource 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
-
prompt
abstract Optional<String> prompt()
A text prompt for guiding the model during image recontextualization. Not supported for Virtual Try-On.
-
personImage
abstract Optional<Image> personImage()
Image of the person or subject who will be wearing the product(s).
-
productImages
abstract Optional<List<ProductImage>> productImages()
A list of product images.
-
builder
static RecontextImageSource.Builder builder()
Instantiates a builder for RecontextImageSource.
-
toBuilder
abstract RecontextImageSource.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static RecontextImageSource fromJson(String jsonString)
Deserializes a JSON string to a RecontextImageSource object.
-
-
-
-