Class SkillCreateParams.Files
-
- All Implemented Interfaces:
public final class SkillCreateParams.FilesSkill files to upload (directory upload) or a single zip file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceSkillCreateParams.Files.VisitorAn interface that defines how to map each variant of Files to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<List<InputStream>>inputStreams()Skill files to upload (directory upload) or a single zip file. final Optional<InputStream>inputStream()Skill zip file to upload. final BooleanisInputStreams()final BooleanisInputStream()final List<InputStream>asInputStreams()Skill files to upload (directory upload) or a single zip file. final InputStreamasInputStream()Skill zip file to upload. final Optional<JsonValue>_json()final <T extends Any> Taccept(SkillCreateParams.Files.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final SkillCreateParams.Filesvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static SkillCreateParams.FilesofInputStreams(List<InputStream> inputStreams)Skill files to upload (directory upload) or a single zip file. final static SkillCreateParams.FilesofInputStream(InputStream inputStream)Skill zip file to upload. -
-
Method Detail
-
inputStreams
final Optional<List<InputStream>> inputStreams()
Skill files to upload (directory upload) or a single zip file.
-
inputStream
final Optional<InputStream> inputStream()
Skill zip file to upload.
-
isInputStreams
final Boolean isInputStreams()
-
isInputStream
final Boolean isInputStream()
-
asInputStreams
final List<InputStream> asInputStreams()
Skill files to upload (directory upload) or a single zip file.
-
asInputStream
final InputStream asInputStream()
Skill zip file to upload.
-
accept
final <T extends Any> T accept(SkillCreateParams.Files.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 = files.accept(new Files.Visitor<Optional<String>>() { @Override public Optional<String> visitInputStreams(List<InputStream> inputStreams) { return Optional.of(inputStreams.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final SkillCreateParams.Files 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.
-
ofInputStreams
final static SkillCreateParams.Files ofInputStreams(List<InputStream> inputStreams)
Skill files to upload (directory upload) or a single zip file.
-
ofInputStream
final static SkillCreateParams.Files ofInputStream(InputStream inputStream)
Skill zip file to upload.
-
-
-
-