Class EnvironmentUpdateParams.Config
-
- All Implemented Interfaces:
public final class EnvironmentUpdateParams.ConfigUpdated environment configuration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceEnvironmentUpdateParams.Config.VisitorAn interface that defines how to map each variant of Config to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<BetaCloudConfigParams>cloud()Request params for cloudenvironment configuration.final Optional<BetaSelfHostedConfigParams>selfHosted()Request params for self_hostedenvironment configuration.final BooleanisCloud()final BooleanisSelfHosted()final BetaCloudConfigParamsasCloud()Request params for cloudenvironment configuration.final BetaSelfHostedConfigParamsasSelfHosted()Request params for self_hostedenvironment configuration.final Optional<JsonValue>_json()final <T extends Any> Taccept(EnvironmentUpdateParams.Config.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final EnvironmentUpdateParams.Configvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static EnvironmentUpdateParams.ConfigofCloud(BetaCloudConfigParams cloud)Request params for cloudenvironment configuration.final static EnvironmentUpdateParams.ConfigofSelfHosted(BetaSelfHostedConfigParams selfHosted)Request params for self_hostedenvironment configuration.-
-
Method Detail
-
cloud
final Optional<BetaCloudConfigParams> cloud()
Request params for
cloudenvironment configuration.Fields default to null; on update, omitted fields preserve the existing value.
-
selfHosted
final Optional<BetaSelfHostedConfigParams> selfHosted()
Request params for
self_hostedenvironment configuration.
-
isSelfHosted
final Boolean isSelfHosted()
-
asCloud
final BetaCloudConfigParams asCloud()
Request params for
cloudenvironment configuration.Fields default to null; on update, omitted fields preserve the existing value.
-
asSelfHosted
final BetaSelfHostedConfigParams asSelfHosted()
Request params for
self_hostedenvironment configuration.
-
accept
final <T extends Any> T accept(EnvironmentUpdateParams.Config.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 = config.accept(new Config.Visitor<Optional<String>>() { @Override public Optional<String> visitCloud(BetaCloudConfigParams cloud) { return Optional.of(cloud.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final EnvironmentUpdateParams.Config 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.
-
ofCloud
final static EnvironmentUpdateParams.Config ofCloud(BetaCloudConfigParams cloud)
Request params for
cloudenvironment configuration.Fields default to null; on update, omitted fields preserve the existing value.
-
ofSelfHosted
final static EnvironmentUpdateParams.Config ofSelfHosted(BetaSelfHostedConfigParams selfHosted)
Request params for
self_hostedenvironment configuration.
-
-
-
-