Class ComplianceSettingsStateParam
-
- All Implemented Interfaces:
public final class ComplianceSettingsStateParam
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceComplianceSettingsStateParam.VisitorAn interface that defines how to map each variant of ComplianceSettingsStateParam to a value of type T.
public final classComplianceSettingsStateParam.Type
-
Method Summary
Modifier and Type Method Description final Optional<ComplianceSettingsStateEnabledParam>enabled()final Optional<ComplianceSettingsStateDisabledParam>disabled()final Optional<JsonValue>_json()final ComplianceSettingsStateParam.Typetype()final BooleanisEnabled()final BooleanisDisabled()final ComplianceSettingsStateEnabledParamasEnabled()final ComplianceSettingsStateDisabledParamasDisabled()final <T extends Any> Taccept(ComplianceSettingsStateParam.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final ComplianceSettingsStateParamvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ComplianceSettingsStateParamofEnabled(ComplianceSettingsStateEnabledParam enabled)final static ComplianceSettingsStateParamofDisabled(ComplianceSettingsStateDisabledParam disabled)-
-
Method Detail
-
enabled
final Optional<ComplianceSettingsStateEnabledParam> enabled()
-
disabled
final Optional<ComplianceSettingsStateDisabledParam> disabled()
-
type
final ComplianceSettingsStateParam.Type type()
-
isDisabled
final Boolean isDisabled()
-
asEnabled
final ComplianceSettingsStateEnabledParam asEnabled()
-
asDisabled
final ComplianceSettingsStateDisabledParam asDisabled()
-
accept
final <T extends Any> T accept(ComplianceSettingsStateParam.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 = complianceSettingsStateParam.accept(new ComplianceSettingsStateParam.Visitor<Optional<String>>() { @Override public Optional<String> visitEnabled(ComplianceSettingsStateEnabledParam enabled) { return Optional.of(enabled.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final ComplianceSettingsStateParam 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.
-
ofEnabled
final static ComplianceSettingsStateParam ofEnabled(ComplianceSettingsStateEnabledParam enabled)
-
ofDisabled
final static ComplianceSettingsStateParam ofDisabled(ComplianceSettingsStateDisabledParam disabled)
-
-
-
-