Skip to main content

nominal_api_proto/proto/
nominal.ingest.v2.internal.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct SyncExtractorCatalogRequest {}
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct SyncExtractorCatalogResponse {
6    #[prost(int32, tag = "1")]
7    pub changed_rows: i32,
8    #[prost(int32, tag = "2")]
9    pub removed_rows: i32,
10    #[prost(string, repeated, tag = "3")]
11    pub moved_catalog_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
12}
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct ListNativeExtractorInstallationsRequest {
15    #[prost(string, repeated, tag = "1")]
16    pub catalog_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
17    #[prost(int32, tag = "2")]
18    pub page_size: i32,
19    #[prost(string, tag = "3")]
20    pub page_token: ::prost::alloc::string::String,
21}
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct ListNativeExtractorInstallationsResponse {
24    #[prost(message, repeated, tag = "1")]
25    pub installations: ::prost::alloc::vec::Vec<super::ContainerizedExtractor>,
26    #[prost(string, tag = "2")]
27    pub next_page_token: ::prost::alloc::string::String,
28}
29#[derive(Clone, PartialEq, ::prost::Message)]
30pub struct UpgradeNativeExtractorInstallationRequest {
31    #[prost(string, tag = "1")]
32    pub workspace_rid: ::prost::alloc::string::String,
33    #[prost(string, tag = "2")]
34    pub catalog_id: ::prost::alloc::string::String,
35}
36#[derive(Clone, Copy, PartialEq, ::prost::Message)]
37pub struct UpgradeNativeExtractorInstallationResponse {
38    #[prost(bool, tag = "1")]
39    pub upgraded: bool,
40}
41/// Generated client implementations.
42pub mod internal_extractor_catalog_service_client {
43    #![allow(
44        unused_variables,
45        dead_code,
46        missing_docs,
47        clippy::wildcard_imports,
48        clippy::let_unit_value,
49    )]
50    use tonic::codegen::*;
51    use tonic::codegen::http::Uri;
52    #[derive(Debug, Clone)]
53    pub struct InternalExtractorCatalogServiceClient<T> {
54        inner: tonic::client::Grpc<T>,
55    }
56    impl InternalExtractorCatalogServiceClient<tonic::transport::Channel> {
57        /// Attempt to create a new client by connecting to a given endpoint.
58        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
59        where
60            D: TryInto<tonic::transport::Endpoint>,
61            D::Error: Into<StdError>,
62        {
63            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
64            Ok(Self::new(conn))
65        }
66    }
67    impl<T> InternalExtractorCatalogServiceClient<T>
68    where
69        T: tonic::client::GrpcService<tonic::body::Body>,
70        T::Error: Into<StdError>,
71        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
72        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
73    {
74        pub fn new(inner: T) -> Self {
75            let inner = tonic::client::Grpc::new(inner);
76            Self { inner }
77        }
78        pub fn with_origin(inner: T, origin: Uri) -> Self {
79            let inner = tonic::client::Grpc::with_origin(inner, origin);
80            Self { inner }
81        }
82        pub fn with_interceptor<F>(
83            inner: T,
84            interceptor: F,
85        ) -> InternalExtractorCatalogServiceClient<InterceptedService<T, F>>
86        where
87            F: tonic::service::Interceptor,
88            T::ResponseBody: Default,
89            T: tonic::codegen::Service<
90                http::Request<tonic::body::Body>,
91                Response = http::Response<
92                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
93                >,
94            >,
95            <T as tonic::codegen::Service<
96                http::Request<tonic::body::Body>,
97            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
98        {
99            InternalExtractorCatalogServiceClient::new(
100                InterceptedService::new(inner, interceptor),
101            )
102        }
103        /// Compress requests with the given encoding.
104        ///
105        /// This requires the server to support it otherwise it might respond with an
106        /// error.
107        #[must_use]
108        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
109            self.inner = self.inner.send_compressed(encoding);
110            self
111        }
112        /// Enable decompressing responses.
113        #[must_use]
114        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
115            self.inner = self.inner.accept_compressed(encoding);
116            self
117        }
118        /// Limits the maximum size of a decoded message.
119        ///
120        /// Default: `4MB`
121        #[must_use]
122        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
123            self.inner = self.inner.max_decoding_message_size(limit);
124            self
125        }
126        /// Limits the maximum size of an encoded message.
127        ///
128        /// Default: `usize::MAX`
129        #[must_use]
130        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
131            self.inner = self.inner.max_encoding_message_size(limit);
132            self
133        }
134        pub async fn sync_extractor_catalog(
135            &mut self,
136            request: impl tonic::IntoRequest<super::SyncExtractorCatalogRequest>,
137        ) -> std::result::Result<
138            tonic::Response<super::SyncExtractorCatalogResponse>,
139            tonic::Status,
140        > {
141            self.inner
142                .ready()
143                .await
144                .map_err(|e| {
145                    tonic::Status::unknown(
146                        format!("Service was not ready: {}", e.into()),
147                    )
148                })?;
149            let codec = tonic::codec::ProstCodec::default();
150            let path = http::uri::PathAndQuery::from_static(
151                "/nominal.ingest.v2.internal.InternalExtractorCatalogService/SyncExtractorCatalog",
152            );
153            let mut req = request.into_request();
154            req.extensions_mut()
155                .insert(
156                    GrpcMethod::new(
157                        "nominal.ingest.v2.internal.InternalExtractorCatalogService",
158                        "SyncExtractorCatalog",
159                    ),
160                );
161            self.inner.unary(req, path, codec).await
162        }
163        pub async fn list_native_extractor_installations(
164            &mut self,
165            request: impl tonic::IntoRequest<
166                super::ListNativeExtractorInstallationsRequest,
167            >,
168        ) -> std::result::Result<
169            tonic::Response<super::ListNativeExtractorInstallationsResponse>,
170            tonic::Status,
171        > {
172            self.inner
173                .ready()
174                .await
175                .map_err(|e| {
176                    tonic::Status::unknown(
177                        format!("Service was not ready: {}", e.into()),
178                    )
179                })?;
180            let codec = tonic::codec::ProstCodec::default();
181            let path = http::uri::PathAndQuery::from_static(
182                "/nominal.ingest.v2.internal.InternalExtractorCatalogService/ListNativeExtractorInstallations",
183            );
184            let mut req = request.into_request();
185            req.extensions_mut()
186                .insert(
187                    GrpcMethod::new(
188                        "nominal.ingest.v2.internal.InternalExtractorCatalogService",
189                        "ListNativeExtractorInstallations",
190                    ),
191                );
192            self.inner.unary(req, path, codec).await
193        }
194        pub async fn upgrade_native_extractor_installation(
195            &mut self,
196            request: impl tonic::IntoRequest<
197                super::UpgradeNativeExtractorInstallationRequest,
198            >,
199        ) -> std::result::Result<
200            tonic::Response<super::UpgradeNativeExtractorInstallationResponse>,
201            tonic::Status,
202        > {
203            self.inner
204                .ready()
205                .await
206                .map_err(|e| {
207                    tonic::Status::unknown(
208                        format!("Service was not ready: {}", e.into()),
209                    )
210                })?;
211            let codec = tonic::codec::ProstCodec::default();
212            let path = http::uri::PathAndQuery::from_static(
213                "/nominal.ingest.v2.internal.InternalExtractorCatalogService/UpgradeNativeExtractorInstallation",
214            );
215            let mut req = request.into_request();
216            req.extensions_mut()
217                .insert(
218                    GrpcMethod::new(
219                        "nominal.ingest.v2.internal.InternalExtractorCatalogService",
220                        "UpgradeNativeExtractorInstallation",
221                    ),
222                );
223            self.inner.unary(req, path, codec).await
224        }
225    }
226}
227#[derive(Clone, PartialEq, ::prost::Message)]
228pub struct IngestInternalRequest {
229    #[prost(message, optional, tag = "1")]
230    pub ingest_request: ::core::option::Option<super::IngestRequest>,
231    #[prost(message, optional, tag = "2")]
232    pub overrides: ::core::option::Option<InternalIngestOverrides>,
233}
234#[derive(Clone, PartialEq, ::prost::Message)]
235pub struct InternalIngestOverrides {
236    #[prost(string, optional, tag = "1")]
237    pub containerized_image_tag: ::core::option::Option<::prost::alloc::string::String>,
238    #[prost(int32, repeated, tag = "3")]
239    pub mcap_channel_ids: ::prost::alloc::vec::Vec<i32>,
240}
241#[derive(Clone, PartialEq, ::prost::Message)]
242pub struct IngestInternalResponse {
243    #[prost(message, optional, tag = "1")]
244    pub ingest_response: ::core::option::Option<super::IngestResponse>,
245    #[prost(string, optional, tag = "2")]
246    pub dataset_file_id: ::core::option::Option<::prost::alloc::string::String>,
247}
248/// Generated client implementations.
249pub mod internal_ingest_service_client {
250    #![allow(
251        unused_variables,
252        dead_code,
253        missing_docs,
254        clippy::wildcard_imports,
255        clippy::let_unit_value,
256    )]
257    use tonic::codegen::*;
258    use tonic::codegen::http::Uri;
259    #[derive(Debug, Clone)]
260    pub struct InternalIngestServiceClient<T> {
261        inner: tonic::client::Grpc<T>,
262    }
263    impl InternalIngestServiceClient<tonic::transport::Channel> {
264        /// Attempt to create a new client by connecting to a given endpoint.
265        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
266        where
267            D: TryInto<tonic::transport::Endpoint>,
268            D::Error: Into<StdError>,
269        {
270            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
271            Ok(Self::new(conn))
272        }
273    }
274    impl<T> InternalIngestServiceClient<T>
275    where
276        T: tonic::client::GrpcService<tonic::body::Body>,
277        T::Error: Into<StdError>,
278        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
279        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
280    {
281        pub fn new(inner: T) -> Self {
282            let inner = tonic::client::Grpc::new(inner);
283            Self { inner }
284        }
285        pub fn with_origin(inner: T, origin: Uri) -> Self {
286            let inner = tonic::client::Grpc::with_origin(inner, origin);
287            Self { inner }
288        }
289        pub fn with_interceptor<F>(
290            inner: T,
291            interceptor: F,
292        ) -> InternalIngestServiceClient<InterceptedService<T, F>>
293        where
294            F: tonic::service::Interceptor,
295            T::ResponseBody: Default,
296            T: tonic::codegen::Service<
297                http::Request<tonic::body::Body>,
298                Response = http::Response<
299                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
300                >,
301            >,
302            <T as tonic::codegen::Service<
303                http::Request<tonic::body::Body>,
304            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
305        {
306            InternalIngestServiceClient::new(InterceptedService::new(inner, interceptor))
307        }
308        /// Compress requests with the given encoding.
309        ///
310        /// This requires the server to support it otherwise it might respond with an
311        /// error.
312        #[must_use]
313        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
314            self.inner = self.inner.send_compressed(encoding);
315            self
316        }
317        /// Enable decompressing responses.
318        #[must_use]
319        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
320            self.inner = self.inner.accept_compressed(encoding);
321            self
322        }
323        /// Limits the maximum size of a decoded message.
324        ///
325        /// Default: `4MB`
326        #[must_use]
327        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
328            self.inner = self.inner.max_decoding_message_size(limit);
329            self
330        }
331        /// Limits the maximum size of an encoded message.
332        ///
333        /// Default: `usize::MAX`
334        #[must_use]
335        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
336            self.inner = self.inner.max_encoding_message_size(limit);
337            self
338        }
339        pub async fn ingest_internal(
340            &mut self,
341            request: impl tonic::IntoRequest<super::IngestInternalRequest>,
342        ) -> std::result::Result<
343            tonic::Response<super::IngestInternalResponse>,
344            tonic::Status,
345        > {
346            self.inner
347                .ready()
348                .await
349                .map_err(|e| {
350                    tonic::Status::unknown(
351                        format!("Service was not ready: {}", e.into()),
352                    )
353                })?;
354            let codec = tonic::codec::ProstCodec::default();
355            let path = http::uri::PathAndQuery::from_static(
356                "/nominal.ingest.v2.internal.InternalIngestService/IngestInternal",
357            );
358            let mut req = request.into_request();
359            req.extensions_mut()
360                .insert(
361                    GrpcMethod::new(
362                        "nominal.ingest.v2.internal.InternalIngestService",
363                        "IngestInternal",
364                    ),
365                );
366            self.inner.unary(req, path, codec).await
367        }
368    }
369}