Class Transformation.AiDropShadow
-
- All Implemented Interfaces:
public final class Transformation.AiDropShadowAdds an AI-based drop shadow around a foreground object on a transparent or removed background. Optionally, control the direction, elevation, and saturation of the light source (e.g.,
az-45to change light direction). Passtruefor the default drop shadow, or provide a string for a custom drop shadow. Supported inside overlay. See AI Drop Shadow.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceTransformation.AiDropShadow.VisitorAn interface that defines how to map each variant of AiDropShadow to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<JsonValue>true_()final Optional<String>string()final BooleanisTrue()final BooleanisString()final JsonValueasTrue()final StringasString()final Optional<JsonValue>_json()final <T extends Any> Taccept(Transformation.AiDropShadow.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final Transformation.AiDropShadowvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Transformation.AiDropShadowofTrue()final static Transformation.AiDropShadowofString(String string)-
-
Method Detail
-
accept
final <T extends Any> T accept(Transformation.AiDropShadow.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import io.imagekit.core.JsonValue; import java.util.Optional; Optional<String> result = aiDropShadow.accept(new AiDropShadow.Visitor<Optional<String>>() { @Override public Optional<String> visitTrue(JsonValue true_) { return Optional.of(true_.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final Transformation.AiDropShadow 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.
-
ofTrue
final static Transformation.AiDropShadow ofTrue()
-
ofString
final static Transformation.AiDropShadow ofString(String string)
-
-
-
-