Class ImageTransformationsParam
-
- All Implemented Interfaces:
public final class ImageTransformationsParamConfigures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classImageTransformationsParam.BuilderA builder for ImageTransformationsParam.
public final classImageTransformationsParam.OversizedImageWhat the server does when this image exceeds the model's maximum image size.
"downsize"(the default) scales the image down to fit, which changes the dimensions the model observes without telling you."error"instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.
-
Method Summary
Modifier and Type Method Description final Optional<ImageTransformationsParam.OversizedImage>oversizedImage()What the server does when this image exceeds the model's maximum image size. final JsonField<ImageTransformationsParam.OversizedImage>_oversizedImage()Returns the raw JSON value of oversizedImage. final Map<String, JsonValue>_additionalProperties()final ImageTransformationsParam.BuildertoBuilder()final ImageTransformationsParamvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ImageTransformationsParam.Builderbuilder()Returns a mutable builder for constructing an instance of ImageTransformationsParam. -
-
Method Detail
-
oversizedImage
final Optional<ImageTransformationsParam.OversizedImage> oversizedImage()
What the server does when this image exceeds the model's maximum image size.
"downsize"(the default) scales the image down to fit, which changes the dimensions the model observes without telling you."error"instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.
-
_oversizedImage
final JsonField<ImageTransformationsParam.OversizedImage> _oversizedImage()
Returns the raw JSON value of oversizedImage.
Unlike oversizedImage, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ImageTransformationsParam.Builder toBuilder()
-
validate
final ImageTransformationsParam validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static ImageTransformationsParam.Builder builder()
Returns a mutable builder for constructing an instance of ImageTransformationsParam.
-
-
-
-