Class BetaImageTransformationsParam
-
- All Implemented Interfaces:
public final class BetaImageTransformationsParamConfigures 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 classBetaImageTransformationsParam.BuilderA builder for BetaImageTransformationsParam.
public final classBetaImageTransformationsParam.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<BetaImageTransformationsParam.OversizedImage>oversizedImage()What the server does when this image exceeds the model's maximum image size. final JsonField<BetaImageTransformationsParam.OversizedImage>_oversizedImage()Returns the raw JSON value of oversizedImage. final Map<String, JsonValue>_additionalProperties()final BetaImageTransformationsParam.BuildertoBuilder()final BetaImageTransformationsParamvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaImageTransformationsParam.Builderbuilder()Returns a mutable builder for constructing an instance of BetaImageTransformationsParam. -
-
Method Detail
-
oversizedImage
final Optional<BetaImageTransformationsParam.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<BetaImageTransformationsParam.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 BetaImageTransformationsParam.Builder toBuilder()
-
validate
final BetaImageTransformationsParam 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 BetaImageTransformationsParam.Builder builder()
Returns a mutable builder for constructing an instance of BetaImageTransformationsParam.
-
-
-
-