Skip to main content

nominal_api_proto/proto/
nominal.internalvideos.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct CreateVideoFileSegmentsRequest {
4    #[prost(string, tag = "1")]
5    pub video_rid: ::prost::alloc::string::String,
6    #[prost(string, tag = "2")]
7    pub video_file_rid: ::prost::alloc::string::String,
8    #[prost(message, repeated, tag = "3")]
9    pub segments: ::prost::alloc::vec::Vec<super::super::videos::v1::Segment>,
10    #[prost(bool, tag = "4")]
11    pub replace_overlapping_segments: bool,
12}
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct CreateVideoFileSegmentsResponse {
15    #[prost(message, repeated, tag = "1")]
16    pub segments: ::prost::alloc::vec::Vec<super::super::videos::v1::Segment>,
17}
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct CreateVideoStreamSegmentsRequest {
20    #[prost(string, tag = "1")]
21    pub video_rid: ::prost::alloc::string::String,
22    #[prost(string, tag = "2")]
23    pub stream_uuid: ::prost::alloc::string::String,
24    #[prost(message, repeated, tag = "3")]
25    pub segments: ::prost::alloc::vec::Vec<super::super::videos::v1::Segment>,
26}
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct CreateVideoStreamSegmentsResponse {
29    #[prost(message, repeated, tag = "1")]
30    pub segments: ::prost::alloc::vec::Vec<super::super::videos::v1::Segment>,
31}
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct CreateDatasetFileSegmentsRequest {
34    #[prost(string, tag = "1")]
35    pub dataset_rid: ::prost::alloc::string::String,
36    #[prost(string, tag = "2")]
37    pub dataset_file_id: ::prost::alloc::string::String,
38    #[prost(string, tag = "3")]
39    pub series_uuid: ::prost::alloc::string::String,
40    #[prost(message, repeated, tag = "4")]
41    pub segments: ::prost::alloc::vec::Vec<super::super::videos::v1::Segment>,
42    #[prost(bool, tag = "5")]
43    pub replace_overlapping_segments: bool,
44}
45#[derive(Clone, PartialEq, ::prost::Message)]
46pub struct CreateDatasetFileSegmentsResponse {
47    #[prost(message, repeated, tag = "1")]
48    pub segments: ::prost::alloc::vec::Vec<super::super::videos::v1::Segment>,
49}
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct CreateChannelStreamSegmentsRequest {
52    #[prost(string, tag = "1")]
53    pub stream_uuid: ::prost::alloc::string::String,
54    #[prost(string, tag = "2")]
55    pub series_uuid: ::prost::alloc::string::String,
56    #[prost(message, repeated, tag = "3")]
57    pub segments: ::prost::alloc::vec::Vec<super::super::videos::v1::Segment>,
58}
59#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct CreateChannelStreamSegmentsResponse {
61    #[prost(message, repeated, tag = "1")]
62    pub segments: ::prost::alloc::vec::Vec<super::super::videos::v1::Segment>,
63}
64/// Generated client implementations.
65pub mod internal_video_segment_service_client {
66    #![allow(
67        unused_variables,
68        dead_code,
69        missing_docs,
70        clippy::wildcard_imports,
71        clippy::let_unit_value,
72    )]
73    use tonic::codegen::*;
74    use tonic::codegen::http::Uri;
75    #[derive(Debug, Clone)]
76    pub struct InternalVideoSegmentServiceClient<T> {
77        inner: tonic::client::Grpc<T>,
78    }
79    impl InternalVideoSegmentServiceClient<tonic::transport::Channel> {
80        /// Attempt to create a new client by connecting to a given endpoint.
81        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
82        where
83            D: TryInto<tonic::transport::Endpoint>,
84            D::Error: Into<StdError>,
85        {
86            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
87            Ok(Self::new(conn))
88        }
89    }
90    impl<T> InternalVideoSegmentServiceClient<T>
91    where
92        T: tonic::client::GrpcService<tonic::body::Body>,
93        T::Error: Into<StdError>,
94        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
95        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
96    {
97        pub fn new(inner: T) -> Self {
98            let inner = tonic::client::Grpc::new(inner);
99            Self { inner }
100        }
101        pub fn with_origin(inner: T, origin: Uri) -> Self {
102            let inner = tonic::client::Grpc::with_origin(inner, origin);
103            Self { inner }
104        }
105        pub fn with_interceptor<F>(
106            inner: T,
107            interceptor: F,
108        ) -> InternalVideoSegmentServiceClient<InterceptedService<T, F>>
109        where
110            F: tonic::service::Interceptor,
111            T::ResponseBody: Default,
112            T: tonic::codegen::Service<
113                http::Request<tonic::body::Body>,
114                Response = http::Response<
115                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
116                >,
117            >,
118            <T as tonic::codegen::Service<
119                http::Request<tonic::body::Body>,
120            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
121        {
122            InternalVideoSegmentServiceClient::new(
123                InterceptedService::new(inner, interceptor),
124            )
125        }
126        /// Compress requests with the given encoding.
127        ///
128        /// This requires the server to support it otherwise it might respond with an
129        /// error.
130        #[must_use]
131        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
132            self.inner = self.inner.send_compressed(encoding);
133            self
134        }
135        /// Enable decompressing responses.
136        #[must_use]
137        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
138            self.inner = self.inner.accept_compressed(encoding);
139            self
140        }
141        /// Limits the maximum size of a decoded message.
142        ///
143        /// Default: `4MB`
144        #[must_use]
145        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
146            self.inner = self.inner.max_decoding_message_size(limit);
147            self
148        }
149        /// Limits the maximum size of an encoded message.
150        ///
151        /// Default: `usize::MAX`
152        #[must_use]
153        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
154            self.inner = self.inner.max_encoding_message_size(limit);
155            self
156        }
157        pub async fn create_video_file_segments(
158            &mut self,
159            request: impl tonic::IntoRequest<super::CreateVideoFileSegmentsRequest>,
160        ) -> std::result::Result<
161            tonic::Response<super::CreateVideoFileSegmentsResponse>,
162            tonic::Status,
163        > {
164            self.inner
165                .ready()
166                .await
167                .map_err(|e| {
168                    tonic::Status::unknown(
169                        format!("Service was not ready: {}", e.into()),
170                    )
171                })?;
172            let codec = tonic::codec::ProstCodec::default();
173            let path = http::uri::PathAndQuery::from_static(
174                "/nominal.internalvideos.v1.InternalVideoSegmentService/CreateVideoFileSegments",
175            );
176            let mut req = request.into_request();
177            req.extensions_mut()
178                .insert(
179                    GrpcMethod::new(
180                        "nominal.internalvideos.v1.InternalVideoSegmentService",
181                        "CreateVideoFileSegments",
182                    ),
183                );
184            self.inner.unary(req, path, codec).await
185        }
186        pub async fn create_video_stream_segments(
187            &mut self,
188            request: impl tonic::IntoRequest<super::CreateVideoStreamSegmentsRequest>,
189        ) -> std::result::Result<
190            tonic::Response<super::CreateVideoStreamSegmentsResponse>,
191            tonic::Status,
192        > {
193            self.inner
194                .ready()
195                .await
196                .map_err(|e| {
197                    tonic::Status::unknown(
198                        format!("Service was not ready: {}", e.into()),
199                    )
200                })?;
201            let codec = tonic::codec::ProstCodec::default();
202            let path = http::uri::PathAndQuery::from_static(
203                "/nominal.internalvideos.v1.InternalVideoSegmentService/CreateVideoStreamSegments",
204            );
205            let mut req = request.into_request();
206            req.extensions_mut()
207                .insert(
208                    GrpcMethod::new(
209                        "nominal.internalvideos.v1.InternalVideoSegmentService",
210                        "CreateVideoStreamSegments",
211                    ),
212                );
213            self.inner.unary(req, path, codec).await
214        }
215        pub async fn create_dataset_file_segments(
216            &mut self,
217            request: impl tonic::IntoRequest<super::CreateDatasetFileSegmentsRequest>,
218        ) -> std::result::Result<
219            tonic::Response<super::CreateDatasetFileSegmentsResponse>,
220            tonic::Status,
221        > {
222            self.inner
223                .ready()
224                .await
225                .map_err(|e| {
226                    tonic::Status::unknown(
227                        format!("Service was not ready: {}", e.into()),
228                    )
229                })?;
230            let codec = tonic::codec::ProstCodec::default();
231            let path = http::uri::PathAndQuery::from_static(
232                "/nominal.internalvideos.v1.InternalVideoSegmentService/CreateDatasetFileSegments",
233            );
234            let mut req = request.into_request();
235            req.extensions_mut()
236                .insert(
237                    GrpcMethod::new(
238                        "nominal.internalvideos.v1.InternalVideoSegmentService",
239                        "CreateDatasetFileSegments",
240                    ),
241                );
242            self.inner.unary(req, path, codec).await
243        }
244        pub async fn create_channel_stream_segments(
245            &mut self,
246            request: impl tonic::IntoRequest<super::CreateChannelStreamSegmentsRequest>,
247        ) -> std::result::Result<
248            tonic::Response<super::CreateChannelStreamSegmentsResponse>,
249            tonic::Status,
250        > {
251            self.inner
252                .ready()
253                .await
254                .map_err(|e| {
255                    tonic::Status::unknown(
256                        format!("Service was not ready: {}", e.into()),
257                    )
258                })?;
259            let codec = tonic::codec::ProstCodec::default();
260            let path = http::uri::PathAndQuery::from_static(
261                "/nominal.internalvideos.v1.InternalVideoSegmentService/CreateChannelStreamSegments",
262            );
263            let mut req = request.into_request();
264            req.extensions_mut()
265                .insert(
266                    GrpcMethod::new(
267                        "nominal.internalvideos.v1.InternalVideoSegmentService",
268                        "CreateChannelStreamSegments",
269                    ),
270                );
271            self.inner.unary(req, path, codec).await
272        }
273    }
274}