Class BetaDataResidency.AllowedInferenceGeos
-
- All Implemented Interfaces:
public final class BetaDataResidency.AllowedInferenceGeosPermitted inference geo values. 'unrestricted' means all geos are allowed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaDataResidency.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<BetaAllowedInferenceGeo>>geos()final Optional<JsonValue>unrestricted()final Optional<JsonValue>_json()final BooleanisGeos()final BooleanisUnrestricted()final List<BetaAllowedInferenceGeo>asGeos()final JsonValueasUnrestricted()final <T extends Any> Taccept(BetaDataResidency.AllowedInferenceGeos.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaDataResidency.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 BetaDataResidency.AllowedInferenceGeosofGeos(List<BetaAllowedInferenceGeo> geos)final static BetaDataResidency.AllowedInferenceGeosofUnrestricted()-
-
Method Detail
-
geos
final Optional<List<BetaAllowedInferenceGeo>> geos()
-
unrestricted
final Optional<JsonValue> unrestricted()
-
isUnrestricted
final Boolean isUnrestricted()
-
asGeos
final List<BetaAllowedInferenceGeo> asGeos()
-
asUnrestricted
final JsonValue asUnrestricted()
-
accept
final <T extends Any> T accept(BetaDataResidency.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<BetaAllowedInferenceGeo> geos) { return Optional.of(geos.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaDataResidency.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 BetaDataResidency.AllowedInferenceGeos ofGeos(List<BetaAllowedInferenceGeo> geos)
-
ofUnrestricted
final static BetaDataResidency.AllowedInferenceGeos ofUnrestricted()
-
-
-
-