Class DataResidency.AllowedInferenceGeos
-
- All Implemented Interfaces:
public final class DataResidency.AllowedInferenceGeosPermitted inference geo values. 'unrestricted' means all geos are allowed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceDataResidency.AllowedInferenceGeos.VisitorAn interface that defines how to map each variant of AllowedInferenceGeos to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<List<AllowedInferenceGeo>>geos()final Optional<JsonValue>unrestricted()final Optional<JsonValue>_json()final BooleanisGeos()final BooleanisUnrestricted()final List<AllowedInferenceGeo>asGeos()final JsonValueasUnrestricted()final <T extends Any> Taccept(DataResidency.AllowedInferenceGeos.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final DataResidency.AllowedInferenceGeosvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static DataResidency.AllowedInferenceGeosofGeos(List<AllowedInferenceGeo> geos)final static DataResidency.AllowedInferenceGeosofUnrestricted()-
-
Method Detail
-
geos
final Optional<List<AllowedInferenceGeo>> geos()
-
unrestricted
final Optional<JsonValue> unrestricted()
-
isUnrestricted
final Boolean isUnrestricted()
-
asGeos
final List<AllowedInferenceGeo> asGeos()
-
asUnrestricted
final JsonValue asUnrestricted()
-
accept
final <T extends Any> T accept(DataResidency.AllowedInferenceGeos.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 com.anthropic.core.JsonValue; import java.util.Optional; Optional<String> result = allowedInferenceGeos.accept(new AllowedInferenceGeos.Visitor<Optional<String>>() { @Override public Optional<String> visitGeos(List<AllowedInferenceGeo> geos) { return Optional.of(geos.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final DataResidency.AllowedInferenceGeos 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.
-
ofGeos
final static DataResidency.AllowedInferenceGeos ofGeos(List<AllowedInferenceGeo> geos)
-
ofUnrestricted
final static DataResidency.AllowedInferenceGeos ofUnrestricted()
-
-
-
-