Class UpscaleImageConfig
-
- All Implemented Interfaces:
public abstract class UpscaleImageConfig extends JsonSerializable
Configuration for upscaling an image.
For more information on this configuration, refer to the `Imagen API reference documentation `_.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classUpscaleImageConfig.BuilderBuilder for UpscaleImageConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description UpscaleImageConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<HttpOptions>httpOptions()Used to override HTTP request options. abstract Optional<String>outputGcsUri()Cloud Storage URI used to store the generated images. abstract Optional<SafetyFilterLevel>safetyFilterLevel()Filter level for safety filtering. abstract Optional<PersonGeneration>personGeneration()Allows generation of people by the model. abstract Optional<Boolean>includeRaiReason()Whether to include a reason for filtered-out images in the response. abstract Optional<String>outputMimeType()The image format that the output should be saved as. abstract Optional<Integer>outputCompressionQuality()The level of compression. abstract Optional<Boolean>enhanceInputImage()Whether to add an image enhancing step before upscaling. abstract Optional<Float>imagePreservationFactor()With a higher image preservation factor, the original image pixels are more respected. abstract Optional<Map<String, String>>labels()User specified labels to track billing usage. static UpscaleImageConfig.Builderbuilder()Instantiates a builder for UpscaleImageConfig. abstract UpscaleImageConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static UpscaleImageConfigfromJson(String jsonString)Deserializes a JSON string to a UpscaleImageConfig 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.
-
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()
Allows generation of people by the model.
-
includeRaiReason
abstract Optional<Boolean> includeRaiReason()
Whether to include a reason for filtered-out images in the response.
-
outputMimeType
abstract Optional<String> outputMimeType()
The image format that the output should be saved as.
-
outputCompressionQuality
abstract Optional<Integer> outputCompressionQuality()
The level of compression. Only applicable if the ``output_mime_type`` is ``image/jpeg``.
-
enhanceInputImage
abstract Optional<Boolean> enhanceInputImage()
Whether to add an image enhancing step before upscaling. It is expected to suppress the noise and JPEG compression artifacts from the input image.
-
imagePreservationFactor
abstract Optional<Float> imagePreservationFactor()
With a higher image preservation factor, the original image pixels are more respected. With a lower image preservation factor, the output image will have be more different from the input image, but with finer details and less noise.
-
labels
abstract Optional<Map<String, String>> labels()
User specified labels to track billing usage.
-
builder
static UpscaleImageConfig.Builder builder()
Instantiates a builder for UpscaleImageConfig.
-
toBuilder
abstract UpscaleImageConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static UpscaleImageConfig fromJson(String jsonString)
Deserializes a JSON string to a UpscaleImageConfig object.
-
-
-
-