Package com.openai.models.beta.responses
Class BetaResponseInputItem.ShellCall.Environment
-
- All Implemented Interfaces:
public final class BetaResponseInputItem.ShellCall.EnvironmentThe environment to execute the shell commands in.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaResponseInputItem.ShellCall.Environment.VisitorAn interface that defines how to map each variant of Environment to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<BetaLocalEnvironment>local()final Optional<BetaContainerReference>containerReference()final BooleanisLocal()final BooleanisContainerReference()final BetaLocalEnvironmentasLocal()final BetaContainerReferenceasContainerReference()final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaResponseInputItem.ShellCall.Environment.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaResponseInputItem.ShellCall.Environmentvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaResponseInputItem.ShellCall.EnvironmentofLocal(BetaLocalEnvironment local)final static BetaResponseInputItem.ShellCall.EnvironmentofContainerReference(BetaContainerReference containerReference)-
-
Method Detail
-
local
final Optional<BetaLocalEnvironment> local()
-
containerReference
final Optional<BetaContainerReference> containerReference()
-
isContainerReference
final Boolean isContainerReference()
-
asLocal
final BetaLocalEnvironment asLocal()
-
asContainerReference
final BetaContainerReference asContainerReference()
-
accept
final <T extends Any> T accept(BetaResponseInputItem.ShellCall.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> visitLocal(BetaLocalEnvironment local) { return Optional.of(local.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaResponseInputItem.ShellCall.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.
-
ofLocal
final static BetaResponseInputItem.ShellCall.Environment ofLocal(BetaLocalEnvironment local)
-
ofContainerReference
final static BetaResponseInputItem.ShellCall.Environment ofContainerReference(BetaContainerReference containerReference)
-
-
-
-