Class CustomMetadataField.Schema.MinValue
-
- All Implemented Interfaces:
public final class CustomMetadataField.Schema.MinValueMinimum value of the field. Only set if field type is
DateorNumber. ForDatetype field, the value will be in ISO8601 string format. ForNumbertype field, it will be a numeric value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceCustomMetadataField.Schema.MinValue.VisitorAn interface that defines how to map each variant of MinValue to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<String>string()final Optional<Double>number()final BooleanisString()final BooleanisNumber()final StringasString()final DoubleasNumber()final Optional<JsonValue>_json()final <T extends Any> Taccept(CustomMetadataField.Schema.MinValue.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final CustomMetadataField.Schema.MinValuevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static CustomMetadataField.Schema.MinValueofString(String string)final static CustomMetadataField.Schema.MinValueofNumber(Double number)-
-
Method Detail
-
accept
final <T extends Any> T accept(CustomMetadataField.Schema.MinValue.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 = minValue.accept(new MinValue.Visitor<Optional<String>>() { @Override public Optional<String> visitString(String string) { return Optional.of(string.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final CustomMetadataField.Schema.MinValue 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.
-
ofString
final static CustomMetadataField.Schema.MinValue ofString(String string)
-
ofNumber
final static CustomMetadataField.Schema.MinValue ofNumber(Double number)
-
-
-
-