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    #[prost(message, optional, tag = "4")]
234    pub triggerer: ::core::option::Option<IngestTriggerer>,
235}
236#[derive(Clone, PartialEq, ::prost::Message)]
237pub struct IngestTriggerer {
238    #[prost(oneof = "ingest_triggerer::Triggerer", tags = "1")]
239    pub triggerer: ::core::option::Option<ingest_triggerer::Triggerer>,
240}
241/// Nested message and enum types in `IngestTriggerer`.
242pub mod ingest_triggerer {
243    #[derive(Clone, PartialEq, ::prost::Oneof)]
244    pub enum Triggerer {
245        #[prost(message, tag = "1")]
246        IngestRule(super::IngestRuleTriggerer),
247    }
248}
249#[derive(Clone, PartialEq, ::prost::Message)]
250pub struct IngestRuleTriggerer {
251    #[prost(string, tag = "1")]
252    pub ingest_rule_rid: ::prost::alloc::string::String,
253}
254#[derive(Clone, PartialEq, ::prost::Message)]
255pub struct InternalIngestOverrides {
256    #[prost(string, optional, tag = "1")]
257    pub containerized_image_tag: ::core::option::Option<::prost::alloc::string::String>,
258    #[prost(int32, repeated, tag = "3")]
259    pub mcap_channel_ids: ::prost::alloc::vec::Vec<i32>,
260}
261#[derive(Clone, PartialEq, ::prost::Message)]
262pub struct IngestInternalResponse {
263    #[prost(message, optional, tag = "1")]
264    pub ingest_response: ::core::option::Option<super::IngestResponse>,
265    #[prost(string, optional, tag = "2")]
266    pub dataset_file_id: ::core::option::Option<::prost::alloc::string::String>,
267}
268/// Generated client implementations.
269pub mod internal_ingest_service_client {
270    #![allow(
271        unused_variables,
272        dead_code,
273        missing_docs,
274        clippy::wildcard_imports,
275        clippy::let_unit_value,
276    )]
277    use tonic::codegen::*;
278    use tonic::codegen::http::Uri;
279    #[derive(Debug, Clone)]
280    pub struct InternalIngestServiceClient<T> {
281        inner: tonic::client::Grpc<T>,
282    }
283    impl InternalIngestServiceClient<tonic::transport::Channel> {
284        /// Attempt to create a new client by connecting to a given endpoint.
285        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
286        where
287            D: TryInto<tonic::transport::Endpoint>,
288            D::Error: Into<StdError>,
289        {
290            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
291            Ok(Self::new(conn))
292        }
293    }
294    impl<T> InternalIngestServiceClient<T>
295    where
296        T: tonic::client::GrpcService<tonic::body::Body>,
297        T::Error: Into<StdError>,
298        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
299        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
300    {
301        pub fn new(inner: T) -> Self {
302            let inner = tonic::client::Grpc::new(inner);
303            Self { inner }
304        }
305        pub fn with_origin(inner: T, origin: Uri) -> Self {
306            let inner = tonic::client::Grpc::with_origin(inner, origin);
307            Self { inner }
308        }
309        pub fn with_interceptor<F>(
310            inner: T,
311            interceptor: F,
312        ) -> InternalIngestServiceClient<InterceptedService<T, F>>
313        where
314            F: tonic::service::Interceptor,
315            T::ResponseBody: Default,
316            T: tonic::codegen::Service<
317                http::Request<tonic::body::Body>,
318                Response = http::Response<
319                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
320                >,
321            >,
322            <T as tonic::codegen::Service<
323                http::Request<tonic::body::Body>,
324            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
325        {
326            InternalIngestServiceClient::new(InterceptedService::new(inner, interceptor))
327        }
328        /// Compress requests with the given encoding.
329        ///
330        /// This requires the server to support it otherwise it might respond with an
331        /// error.
332        #[must_use]
333        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
334            self.inner = self.inner.send_compressed(encoding);
335            self
336        }
337        /// Enable decompressing responses.
338        #[must_use]
339        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
340            self.inner = self.inner.accept_compressed(encoding);
341            self
342        }
343        /// Limits the maximum size of a decoded message.
344        ///
345        /// Default: `4MB`
346        #[must_use]
347        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
348            self.inner = self.inner.max_decoding_message_size(limit);
349            self
350        }
351        /// Limits the maximum size of an encoded message.
352        ///
353        /// Default: `usize::MAX`
354        #[must_use]
355        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
356            self.inner = self.inner.max_encoding_message_size(limit);
357            self
358        }
359        pub async fn ingest_internal(
360            &mut self,
361            request: impl tonic::IntoRequest<super::IngestInternalRequest>,
362        ) -> std::result::Result<
363            tonic::Response<super::IngestInternalResponse>,
364            tonic::Status,
365        > {
366            self.inner
367                .ready()
368                .await
369                .map_err(|e| {
370                    tonic::Status::unknown(
371                        format!("Service was not ready: {}", e.into()),
372                    )
373                })?;
374            let codec = tonic::codec::ProstCodec::default();
375            let path = http::uri::PathAndQuery::from_static(
376                "/nominal.ingest.v2.internal.InternalIngestService/IngestInternal",
377            );
378            let mut req = request.into_request();
379            req.extensions_mut()
380                .insert(
381                    GrpcMethod::new(
382                        "nominal.ingest.v2.internal.InternalIngestService",
383                        "IngestInternal",
384                    ),
385                );
386            self.inner.unary(req, path, codec).await
387        }
388    }
389}