Class DataResidencyCreateConfig.AllowedInferenceGeos
-
- All Implemented Interfaces:
public final class DataResidencyCreateConfig.AllowedInferenceGeosPermitted inference geo values. Defaults to 'unrestricted' if omitted, which allows all geos. Use the string 'unrestricted' to allow all geos, or a list of specific geos.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceDataResidencyCreateConfig.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(DataResidencyCreateConfig.AllowedInferenceGeos.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final DataResidencyCreateConfig.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 DataResidencyCreateConfig.AllowedInferenceGeosofGeos(List<AllowedInferenceGeo> geos)final static DataResidencyCreateConfig.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(DataResidencyCreateConfig.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 DataResidencyCreateConfig.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 DataResidencyCreateConfig.AllowedInferenceGeos ofGeos(List<AllowedInferenceGeo> geos)
-
ofUnrestricted
final static DataResidencyCreateConfig.AllowedInferenceGeos ofUnrestricted()
-
-
-
-