Class VideoEditParams.Video
-
- All Implemented Interfaces:
public final class VideoEditParams.VideoReference to the completed video to edit.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceVideoEditParams.Video.VisitorAn interface that defines how to map each variant of Video to a value of type T.
public final classVideoEditParams.Video.VideoReferenceInputParamReference to the completed video.
-
Method Summary
Modifier and Type Method Description final Optional<InputStream>inputStream()Reference to the completed video to edit. final Optional<VideoEditParams.Video.VideoReferenceInputParam>referenceInputParam()Reference to the completed video. final BooleanisInputStream()final BooleanisReferenceInputParam()final InputStreamasInputStream()Reference to the completed video to edit. final VideoEditParams.Video.VideoReferenceInputParamasReferenceInputParam()Reference to the completed video. final Optional<JsonValue>_json()final <T extends Any> Taccept(VideoEditParams.Video.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final VideoEditParams.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 VideoEditParams.VideoofInputStream(InputStream inputStream)Reference to the completed video to edit. final static VideoEditParams.VideoofReferenceInputParam(VideoEditParams.Video.VideoReferenceInputParam referenceInputParam)Reference to the completed video. -
-
Method Detail
-
inputStream
final Optional<InputStream> inputStream()
Reference to the completed video to edit.
-
referenceInputParam
final Optional<VideoEditParams.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 edit.
-
asReferenceInputParam
final VideoEditParams.Video.VideoReferenceInputParam asReferenceInputParam()
Reference to the completed video.
-
accept
final <T extends Any> T accept(VideoEditParams.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 VideoEditParams.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 VideoEditParams.Video ofInputStream(InputStream inputStream)
Reference to the completed video to edit.
-
ofReferenceInputParam
final static VideoEditParams.Video ofReferenceInputParam(VideoEditParams.Video.VideoReferenceInputParam referenceInputParam)
Reference to the completed video.
-
-
-
-