Class SessionExecuteParams.AgentConfig.Model
-
- All Implemented Interfaces:
public final class SessionExecuteParams.AgentConfig.ModelModel configuration object or model name string (e.g., 'openai/gpt-5-nano')
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceSessionExecuteParams.AgentConfig.Model.VisitorAn interface that defines how to map each variant of Model to a value of type T.
public final classSessionExecuteParams.AgentConfig.Model.VertexModelConfigObjectpublic final classSessionExecuteParams.AgentConfig.Model.GenericModelConfigObject
-
Method Summary
-
-
Method Detail
-
vertexModelConfigObject
final Optional<SessionExecuteParams.AgentConfig.Model.VertexModelConfigObject> vertexModelConfigObject()
-
genericModelConfigObject
final Optional<SessionExecuteParams.AgentConfig.Model.GenericModelConfigObject> genericModelConfigObject()
-
isVertexModelConfigObject
final Boolean isVertexModelConfigObject()
-
isGenericModelConfigObject
final Boolean isGenericModelConfigObject()
-
asVertexModelConfigObject
final SessionExecuteParams.AgentConfig.Model.VertexModelConfigObject asVertexModelConfigObject()
-
asGenericModelConfigObject
final SessionExecuteParams.AgentConfig.Model.GenericModelConfigObject asGenericModelConfigObject()
-
accept
final <T extends Any> T accept(SessionExecuteParams.AgentConfig.Model.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.browserbase.api.core.JsonValue; import java.util.Optional; Optional<String> result = model.accept(new Model.Visitor<Optional<String>>() { @Override public Optional<String> visitVertexModelConfigObject(VertexModelConfigObject vertexModelConfigObject) { return Optional.of(vertexModelConfigObject.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final SessionExecuteParams.AgentConfig.Model 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.
-
ofVertexModelConfigObject
final static SessionExecuteParams.AgentConfig.Model ofVertexModelConfigObject(SessionExecuteParams.AgentConfig.Model.VertexModelConfigObject vertexModelConfigObject)
-
ofGenericModelConfigObject
final static SessionExecuteParams.AgentConfig.Model ofGenericModelConfigObject(SessionExecuteParams.AgentConfig.Model.GenericModelConfigObject genericModelConfigObject)
-
ofString
final static SessionExecuteParams.AgentConfig.Model ofString(String string)
-
-
-
-