Package com.openai.models.responses
Class FunctionShellTool.Environment
-
- All Implemented Interfaces:
public final class FunctionShellTool.Environment
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceFunctionShellTool.Environment.VisitorAn interface that defines how to map each variant of Environment to a value of type T.
-
Method Summary
-
-
Method Detail
-
containerAuto
final Optional<ContainerAuto> containerAuto()
-
local
final Optional<LocalEnvironment> local()
-
containerReference
final Optional<ContainerReference> containerReference()
-
isContainerAuto
final Boolean isContainerAuto()
-
isContainerReference
final Boolean isContainerReference()
-
asContainerAuto
final ContainerAuto asContainerAuto()
-
asLocal
final LocalEnvironment asLocal()
-
asContainerReference
final ContainerReference asContainerReference()
-
accept
final <T extends Any> T accept(FunctionShellTool.Environment.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.openai.core.JsonValue; import java.util.Optional; Optional<String> result = environment.accept(new Environment.Visitor<Optional<String>>() { @Override public Optional<String> visitContainerAuto(ContainerAuto containerAuto) { return Optional.of(containerAuto.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final FunctionShellTool.Environment 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.
-
ofContainerAuto
final static FunctionShellTool.Environment ofContainerAuto(ContainerAuto containerAuto)
-
ofLocal
final static FunctionShellTool.Environment ofLocal(LocalEnvironment local)
-
ofContainerReference
final static FunctionShellTool.Environment ofContainerReference(ContainerReference containerReference)
-
-
-
-