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