Class MessageCreateParamsContainer
-
- All Implemented Interfaces:
public final class MessageCreateParamsContainerContainer identifier for reuse across requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceMessageCreateParamsContainer.VisitorAn interface that defines how to map each variant of MessageCreateParamsContainer to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<ContainerParams>containerParams()Container parameters with skills to be loaded. final Optional<String>string()final Optional<JsonValue>_json()final BooleanisContainerParams()final BooleanisString()final ContainerParamsasContainerParams()Container parameters with skills to be loaded. final StringasString()final <T extends Any> Taccept(MessageCreateParamsContainer.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final MessageCreateParamsContainervalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static MessageCreateParamsContainerofContainerParams(ContainerParams containerParams)Container parameters with skills to be loaded. final static MessageCreateParamsContainerofString(String string)-
-
Method Detail
-
containerParams
final Optional<ContainerParams> containerParams()
Container parameters with skills to be loaded.
-
isContainerParams
final Boolean isContainerParams()
-
asContainerParams
final ContainerParams asContainerParams()
Container parameters with skills to be loaded.
-
accept
final <T extends Any> T accept(MessageCreateParamsContainer.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 = messageCreateParamsContainer.accept(new MessageCreateParamsContainer.Visitor<Optional<String>>() { @Override public Optional<String> visitContainerParams(ContainerParams containerParams) { return Optional.of(containerParams.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final MessageCreateParamsContainer 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.
-
ofContainerParams
final static MessageCreateParamsContainer ofContainerParams(ContainerParams containerParams)
Container parameters with skills to be loaded.
-
ofString
final static MessageCreateParamsContainer ofString(String string)
-
-
-
-