Class VideoExtendParams.Video
-
- All Implemented Interfaces:
public final class VideoExtendParams.VideoReference to the completed video to extend.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceVideoExtendParams.Video.VisitorAn interface that defines how to map each variant of Video to a value of type T.
public final classVideoExtendParams.Video.VideoReferenceInputParamReference to the completed video.
-
Method Summary
Modifier and Type Method Description final Optional<InputStream>inputStream()Reference to the completed video to extend. final Optional<VideoExtendParams.Video.VideoReferenceInputParam>referenceInputParam()Reference to the completed video. final BooleanisInputStream()final BooleanisReferenceInputParam()final InputStreamasInputStream()Reference to the completed video to extend. final VideoExtendParams.Video.VideoReferenceInputParamasReferenceInputParam()Reference to the completed video. final Optional<JsonValue>_json()final <T extends Any> Taccept(VideoExtendParams.Video.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final VideoExtendParams.Videovalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static VideoExtendParams.VideoofInputStream(InputStream inputStream)Reference to the completed video to extend. final static VideoExtendParams.VideoofReferenceInputParam(VideoExtendParams.Video.VideoReferenceInputParam referenceInputParam)Reference to the completed video. -
-
Method Detail
-
inputStream
final Optional<InputStream> inputStream()
Reference to the completed video to extend.
-
referenceInputParam
final Optional<VideoExtendParams.Video.VideoReferenceInputParam> referenceInputParam()
Reference to the completed video.
-
isInputStream
final Boolean isInputStream()
-
isReferenceInputParam
final Boolean isReferenceInputParam()
-
asInputStream
final InputStream asInputStream()
Reference to the completed video to extend.
-
asReferenceInputParam
final VideoExtendParams.Video.VideoReferenceInputParam asReferenceInputParam()
Reference to the completed video.
-
accept
final <T extends Any> T accept(VideoExtendParams.Video.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 = video.accept(new Video.Visitor<Optional<String>>() { @Override public Optional<String> visitInputStream(InputStream inputStream) { return Optional.of(inputStream.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final VideoExtendParams.Video 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.
-
ofInputStream
final static VideoExtendParams.Video ofInputStream(InputStream inputStream)
Reference to the completed video to extend.
-
ofReferenceInputParam
final static VideoExtendParams.Video ofReferenceInputParam(VideoExtendParams.Video.VideoReferenceInputParam referenceInputParam)
Reference to the completed video.
-
-
-
-