1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct MarkBatchesCompletedRequest {
4 #[prost(string, tag = "1")]
5 pub ingest_job_rid: ::prost::alloc::string::String,
6 #[prost(string, tag = "2")]
7 pub dataset_file_id: ::prost::alloc::string::String,
8 #[prost(message, repeated, tag = "3")]
9 pub batches: ::prost::alloc::vec::Vec<CompletedBatch>,
10}
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct CompletedBatch {
13 #[prost(int32, tag = "1")]
14 pub batch_id: i32,
15 #[prost(message, optional, tag = "2")]
16 pub handle: ::core::option::Option<
17 super::super::super::types::object_storage::Handle,
18 >,
19}
20#[derive(Clone, Copy, PartialEq, ::prost::Message)]
21pub struct MarkBatchesCompletedResponse {}
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct CreatePendingBatchesRequest {
24 #[prost(string, tag = "1")]
25 pub ingest_job_rid: ::prost::alloc::string::String,
26 #[prost(string, tag = "2")]
27 pub dataset_file_id: ::prost::alloc::string::String,
28 #[prost(int32, tag = "3")]
29 pub num_batches: i32,
30}
31#[derive(Clone, Copy, PartialEq, ::prost::Message)]
32pub struct CreatePendingBatchesResponse {}
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct SetDatasetFileIngestStatusRequest {
35 #[prost(string, tag = "1")]
36 pub ingest_job_rid: ::prost::alloc::string::String,
37 #[prost(string, tag = "2")]
38 pub dataset_file_id: ::prost::alloc::string::String,
39 #[prost(
40 oneof = "set_dataset_file_ingest_status_request::Status",
41 tags = "3, 4, 5, 6"
42 )]
43 pub status: ::core::option::Option<set_dataset_file_ingest_status_request::Status>,
44}
45pub mod set_dataset_file_ingest_status_request {
47 #[derive(Clone, PartialEq, ::prost::Oneof)]
48 pub enum Status {
49 #[prost(message, tag = "3")]
50 Parsing(super::Parsing),
51 #[prost(message, tag = "4")]
52 Ingesting(super::Ingesting),
53 #[prost(message, tag = "5")]
54 Error(super::Error),
55 #[prost(message, tag = "6")]
56 Succeeded(super::Succeeded),
57 }
58}
59#[derive(Clone, Copy, PartialEq, ::prost::Message)]
60pub struct SetDatasetFileIngestStatusResponse {}
61#[derive(Clone, Copy, PartialEq, ::prost::Message)]
62pub struct Parsing {
63 #[prost(message, optional, tag = "1")]
64 pub bounds: ::core::option::Option<super::super::super::types::time::Range>,
65}
66#[derive(Clone, Copy, PartialEq, ::prost::Message)]
67pub struct Ingesting {
68 #[prost(message, optional, tag = "1")]
69 pub bounds: ::core::option::Option<super::super::super::types::time::Range>,
70}
71#[derive(Clone, PartialEq, ::prost::Message)]
72pub struct Error {
73 #[prost(string, tag = "1")]
74 pub error_type: ::prost::alloc::string::String,
75 #[prost(string, tag = "2")]
76 pub message: ::prost::alloc::string::String,
77 #[prost(string, optional, tag = "3")]
78 pub error_instance_id: ::core::option::Option<::prost::alloc::string::String>,
79}
80#[derive(Clone, Copy, PartialEq, ::prost::Message)]
81pub struct Succeeded {
82 #[prost(message, optional, tag = "1")]
83 pub bounds: ::core::option::Option<super::super::super::types::time::Range>,
84 #[prost(message, optional, tag = "2")]
85 pub ingested_at: ::core::option::Option<super::super::super::types::time::Timestamp>,
86}
87pub mod internal_ingest_batch_service_client {
89 #![allow(
90 unused_variables,
91 dead_code,
92 missing_docs,
93 clippy::wildcard_imports,
94 clippy::let_unit_value,
95 )]
96 use tonic::codegen::*;
97 use tonic::codegen::http::Uri;
98 #[derive(Debug, Clone)]
99 pub struct InternalIngestBatchServiceClient<T> {
100 inner: tonic::client::Grpc<T>,
101 }
102 impl InternalIngestBatchServiceClient<tonic::transport::Channel> {
103 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
105 where
106 D: TryInto<tonic::transport::Endpoint>,
107 D::Error: Into<StdError>,
108 {
109 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
110 Ok(Self::new(conn))
111 }
112 }
113 impl<T> InternalIngestBatchServiceClient<T>
114 where
115 T: tonic::client::GrpcService<tonic::body::Body>,
116 T::Error: Into<StdError>,
117 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
118 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
119 {
120 pub fn new(inner: T) -> Self {
121 let inner = tonic::client::Grpc::new(inner);
122 Self { inner }
123 }
124 pub fn with_origin(inner: T, origin: Uri) -> Self {
125 let inner = tonic::client::Grpc::with_origin(inner, origin);
126 Self { inner }
127 }
128 pub fn with_interceptor<F>(
129 inner: T,
130 interceptor: F,
131 ) -> InternalIngestBatchServiceClient<InterceptedService<T, F>>
132 where
133 F: tonic::service::Interceptor,
134 T::ResponseBody: Default,
135 T: tonic::codegen::Service<
136 http::Request<tonic::body::Body>,
137 Response = http::Response<
138 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
139 >,
140 >,
141 <T as tonic::codegen::Service<
142 http::Request<tonic::body::Body>,
143 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
144 {
145 InternalIngestBatchServiceClient::new(
146 InterceptedService::new(inner, interceptor),
147 )
148 }
149 #[must_use]
154 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
155 self.inner = self.inner.send_compressed(encoding);
156 self
157 }
158 #[must_use]
160 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
161 self.inner = self.inner.accept_compressed(encoding);
162 self
163 }
164 #[must_use]
168 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
169 self.inner = self.inner.max_decoding_message_size(limit);
170 self
171 }
172 #[must_use]
176 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
177 self.inner = self.inner.max_encoding_message_size(limit);
178 self
179 }
180 pub async fn mark_batches_completed(
181 &mut self,
182 request: impl tonic::IntoRequest<super::MarkBatchesCompletedRequest>,
183 ) -> std::result::Result<
184 tonic::Response<super::MarkBatchesCompletedResponse>,
185 tonic::Status,
186 > {
187 self.inner
188 .ready()
189 .await
190 .map_err(|e| {
191 tonic::Status::unknown(
192 format!("Service was not ready: {}", e.into()),
193 )
194 })?;
195 let codec = tonic::codec::ProstCodec::default();
196 let path = http::uri::PathAndQuery::from_static(
197 "/nominal.ingest.v1.internal.InternalIngestBatchService/MarkBatchesCompleted",
198 );
199 let mut req = request.into_request();
200 req.extensions_mut()
201 .insert(
202 GrpcMethod::new(
203 "nominal.ingest.v1.internal.InternalIngestBatchService",
204 "MarkBatchesCompleted",
205 ),
206 );
207 self.inner.unary(req, path, codec).await
208 }
209 pub async fn set_dataset_file_ingest_status(
210 &mut self,
211 request: impl tonic::IntoRequest<super::SetDatasetFileIngestStatusRequest>,
212 ) -> std::result::Result<
213 tonic::Response<super::SetDatasetFileIngestStatusResponse>,
214 tonic::Status,
215 > {
216 self.inner
217 .ready()
218 .await
219 .map_err(|e| {
220 tonic::Status::unknown(
221 format!("Service was not ready: {}", e.into()),
222 )
223 })?;
224 let codec = tonic::codec::ProstCodec::default();
225 let path = http::uri::PathAndQuery::from_static(
226 "/nominal.ingest.v1.internal.InternalIngestBatchService/SetDatasetFileIngestStatus",
227 );
228 let mut req = request.into_request();
229 req.extensions_mut()
230 .insert(
231 GrpcMethod::new(
232 "nominal.ingest.v1.internal.InternalIngestBatchService",
233 "SetDatasetFileIngestStatus",
234 ),
235 );
236 self.inner.unary(req, path, codec).await
237 }
238 pub async fn create_pending_batches(
239 &mut self,
240 request: impl tonic::IntoRequest<super::CreatePendingBatchesRequest>,
241 ) -> std::result::Result<
242 tonic::Response<super::CreatePendingBatchesResponse>,
243 tonic::Status,
244 > {
245 self.inner
246 .ready()
247 .await
248 .map_err(|e| {
249 tonic::Status::unknown(
250 format!("Service was not ready: {}", e.into()),
251 )
252 })?;
253 let codec = tonic::codec::ProstCodec::default();
254 let path = http::uri::PathAndQuery::from_static(
255 "/nominal.ingest.v1.internal.InternalIngestBatchService/CreatePendingBatches",
256 );
257 let mut req = request.into_request();
258 req.extensions_mut()
259 .insert(
260 GrpcMethod::new(
261 "nominal.ingest.v1.internal.InternalIngestBatchService",
262 "CreatePendingBatches",
263 ),
264 );
265 self.inner.unary(req, path, codec).await
266 }
267 }
268}