Class RecontextImageConfig
-
- All Implemented Interfaces:
public abstract class RecontextImageConfig extends JsonSerializable
Configuration for recontextualizing an image.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classRecontextImageConfig.BuilderBuilder for RecontextImageConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description RecontextImageConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<HttpOptions>httpOptions()Used to override HTTP request options. abstract Optional<Integer>numberOfImages()Number of images to generate. abstract Optional<Integer>baseSteps()The number of sampling steps. abstract Optional<String>outputGcsUri()Cloud Storage URI used to store the generated images. abstract Optional<Integer>seed()Random seed for image generation. abstract Optional<SafetyFilterLevel>safetyFilterLevel()Filter level for safety filtering. abstract Optional<PersonGeneration>personGeneration()Whether allow to generate person images, and restrict to specific ages. abstract Optional<Boolean>addWatermark()Whether to add a SynthID watermark to the generated images. abstract Optional<String>outputMimeType()MIME type of the generated image. abstract Optional<Integer>outputCompressionQuality()Compression quality of the generated image (for ``image/jpeg`` only). abstract Optional<Boolean>enhancePrompt()Whether to use the prompt rewriting logic. abstract Optional<Map<String, String>>labels()User specified labels to track billing usage. static RecontextImageConfig.Builderbuilder()Instantiates a builder for RecontextImageConfig. abstract RecontextImageConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static RecontextImageConfigfromJson(String jsonString)Deserializes a JSON string to a RecontextImageConfig 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
-
httpOptions
abstract Optional<HttpOptions> httpOptions()
Used to override HTTP request options.
-
numberOfImages
abstract Optional<Integer> numberOfImages()
Number of images to generate.
-
baseSteps
abstract Optional<Integer> baseSteps()
The number of sampling steps. A higher value has better image quality, while a lower value has better latency.
-
outputGcsUri
abstract Optional<String> outputGcsUri()
Cloud Storage URI used to store the generated images.
-
safetyFilterLevel
abstract Optional<SafetyFilterLevel> safetyFilterLevel()
Filter level for safety filtering.
-
personGeneration
abstract Optional<PersonGeneration> personGeneration()
Whether allow to generate person images, and restrict to specific ages.
-
addWatermark
abstract Optional<Boolean> addWatermark()
Whether to add a SynthID watermark to the generated images.
-
outputMimeType
abstract Optional<String> outputMimeType()
MIME type of the generated image.
-
outputCompressionQuality
abstract Optional<Integer> outputCompressionQuality()
Compression quality of the generated image (for ``image/jpeg`` only).
-
enhancePrompt
abstract Optional<Boolean> enhancePrompt()
Whether to use the prompt rewriting logic.
-
labels
abstract Optional<Map<String, String>> labels()
User specified labels to track billing usage.
-
builder
static RecontextImageConfig.Builder builder()
Instantiates a builder for RecontextImageConfig.
-
toBuilder
abstract RecontextImageConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static RecontextImageConfig fromJson(String jsonString)
Deserializes a JSON string to a RecontextImageConfig object.
-
-
-
-