Class UpscaleImageAPIConfig
-
- All Implemented Interfaces:
@InternalApi() public abstract class UpscaleImageAPIConfig extends JsonSerializable
Internal API config for UpscaleImage.
These fields require default values sent to the API which are not intended to be modifiable or exposed to users in the SDK method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classUpscaleImageAPIConfig.BuilderBuilder for UpscaleImageAPIConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description UpscaleImageAPIConfig()
-
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. abstract Optional<Integer>numberOfImages()abstract Optional<String>mode()static UpscaleImageAPIConfig.Builderbuilder()Instantiates a builder for UpscaleImageAPIConfig. abstract UpscaleImageAPIConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static UpscaleImageAPIConfigfromJson(String jsonString)Deserializes a JSON string to a UpscaleImageAPIConfig 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.
-
numberOfImages
abstract Optional<Integer> numberOfImages()
-
builder
static UpscaleImageAPIConfig.Builder builder()
Instantiates a builder for UpscaleImageAPIConfig.
-
toBuilder
abstract UpscaleImageAPIConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static UpscaleImageAPIConfig fromJson(String jsonString)
Deserializes a JSON string to a UpscaleImageAPIConfig object.
-
-
-
-