Class BetaCloudConfig.Networking
-
- All Implemented Interfaces:
public final class BetaCloudConfig.NetworkingNetwork configuration policy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaCloudConfig.Networking.VisitorAn interface that defines how to map each variant of Networking to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<BetaUnrestrictedNetwork>unrestricted()Unrestricted network access. final Optional<BetaLimitedNetwork>limited()Limited network access. final BooleanisUnrestricted()final BooleanisLimited()final BetaUnrestrictedNetworkasUnrestricted()Unrestricted network access. final BetaLimitedNetworkasLimited()Limited network access. final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaCloudConfig.Networking.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaCloudConfig.Networkingvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaCloudConfig.NetworkingofUnrestricted(BetaUnrestrictedNetwork unrestricted)Unrestricted network access. final static BetaCloudConfig.NetworkingofLimited(BetaLimitedNetwork limited)Limited network access. -
-
Method Detail
-
unrestricted
final Optional<BetaUnrestrictedNetwork> unrestricted()
Unrestricted network access.
-
limited
final Optional<BetaLimitedNetwork> limited()
Limited network access.
-
isUnrestricted
final Boolean isUnrestricted()
-
asUnrestricted
final BetaUnrestrictedNetwork asUnrestricted()
Unrestricted network access.
-
asLimited
final BetaLimitedNetwork asLimited()
Limited network access.
-
accept
final <T extends Any> T accept(BetaCloudConfig.Networking.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 = networking.accept(new Networking.Visitor<Optional<String>>() { @Override public Optional<String> visitUnrestricted(BetaUnrestrictedNetwork unrestricted) { return Optional.of(unrestricted.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaCloudConfig.Networking 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.
-
ofUnrestricted
final static BetaCloudConfig.Networking ofUnrestricted(BetaUnrestrictedNetwork unrestricted)
Unrestricted network access.
-
ofLimited
final static BetaCloudConfig.Networking ofLimited(BetaLimitedNetwork limited)
Limited network access.
-
-
-
-