Class BetaCloudConfigParams.Networking
-
- All Implemented Interfaces:
public final class BetaCloudConfigParams.NetworkingNetwork configuration policy. Omit on update to preserve the existing value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaCloudConfigParams.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<BetaLimitedNetworkParams>limited()Limited network request params. final BooleanisUnrestricted()final BooleanisLimited()final BetaUnrestrictedNetworkasUnrestricted()Unrestricted network access. final BetaLimitedNetworkParamsasLimited()Limited network request params. final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaCloudConfigParams.Networking.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaCloudConfigParams.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 BetaCloudConfigParams.NetworkingofUnrestricted(BetaUnrestrictedNetwork unrestricted)Unrestricted network access. final static BetaCloudConfigParams.NetworkingofLimited(BetaLimitedNetworkParams limited)Limited network request params. -
-
Method Detail
-
unrestricted
final Optional<BetaUnrestrictedNetwork> unrestricted()
Unrestricted network access.
-
limited
final Optional<BetaLimitedNetworkParams> limited()
Limited network request params.
Fields default to null; on update, omitted fields preserve the existing value.
-
isUnrestricted
final Boolean isUnrestricted()
-
asUnrestricted
final BetaUnrestrictedNetwork asUnrestricted()
Unrestricted network access.
-
asLimited
final BetaLimitedNetworkParams asLimited()
Limited network request params.
Fields default to null; on update, omitted fields preserve the existing value.
-
accept
final <T extends Any> T accept(BetaCloudConfigParams.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 BetaCloudConfigParams.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 BetaCloudConfigParams.Networking ofUnrestricted(BetaUnrestrictedNetwork unrestricted)
Unrestricted network access.
-
ofLimited
final static BetaCloudConfigParams.Networking ofLimited(BetaLimitedNetworkParams limited)
Limited network request params.
Fields default to null; on update, omitted fields preserve the existing value.
-
-
-
-