1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct FileSuffix {
4 #[prost(string, tag = "1")]
5 pub suffix: ::prost::alloc::string::String,
6}
7#[derive(Clone, PartialEq, ::prost::Message)]
8pub struct FileFilter {
9 #[prost(oneof = "file_filter::Filter", tags = "1")]
10 pub filter: ::core::option::Option<file_filter::Filter>,
11}
12pub mod file_filter {
14 #[derive(Clone, PartialEq, ::prost::Oneof)]
15 pub enum Filter {
16 #[prost(message, tag = "1")]
17 Suffix(super::FileSuffix),
18 }
19}
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct FileExtractionInput {
22 #[prost(string, tag = "1")]
23 pub environment_variable: ::prost::alloc::string::String,
24 #[prost(string, tag = "2")]
25 pub name: ::prost::alloc::string::String,
26 #[prost(string, optional, tag = "3")]
27 pub description: ::core::option::Option<::prost::alloc::string::String>,
28 #[prost(message, repeated, tag = "4")]
29 pub file_filters: ::prost::alloc::vec::Vec<FileFilter>,
30 #[prost(bool, optional, tag = "5")]
31 pub required: ::core::option::Option<bool>,
32}
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct FileExtractionParameter {
35 #[prost(string, tag = "1")]
36 pub environment_variable: ::prost::alloc::string::String,
37 #[prost(string, tag = "2")]
38 pub name: ::prost::alloc::string::String,
39 #[prost(string, optional, tag = "3")]
40 pub description: ::core::option::Option<::prost::alloc::string::String>,
41 #[prost(bool, optional, tag = "4")]
42 pub required: ::core::option::Option<bool>,
43}
44#[derive(Clone, PartialEq, ::prost::Message)]
45pub struct TimestampMetadata {
46 #[prost(string, tag = "1")]
47 pub series_name: ::prost::alloc::string::String,
48 #[prost(message, optional, tag = "2")]
49 pub timestamp_type: ::core::option::Option<super::super::types::time::TimestampType>,
50}
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct ContainerImage {
53 #[prost(string, tag = "1")]
54 pub rid: ::prost::alloc::string::String,
55 #[prost(string, tag = "2")]
56 pub tag: ::prost::alloc::string::String,
57 #[prost(int64, optional, tag = "3")]
58 pub size_bytes: ::core::option::Option<i64>,
59 #[prost(enumeration = "ContainerImageStatus", tag = "4")]
60 pub status: i32,
61 #[prost(message, optional, tag = "5")]
62 pub created_at: ::core::option::Option<
63 super::super::super::google::protobuf::Timestamp,
64 >,
65 #[prost(string, tag = "6")]
66 pub extractor_rid: ::prost::alloc::string::String,
67 #[prost(message, repeated, tag = "7")]
68 pub inputs: ::prost::alloc::vec::Vec<FileExtractionInput>,
69 #[prost(message, repeated, tag = "8")]
70 pub parameters: ::prost::alloc::vec::Vec<FileExtractionParameter>,
71 #[prost(enumeration = "FileOutputFormat", tag = "9")]
72 pub file_output_format: i32,
73 #[prost(message, optional, tag = "10")]
74 pub default_timestamp_metadata: ::core::option::Option<TimestampMetadata>,
75}
76#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct CreateImageRequest {
78 #[prost(string, tag = "1")]
79 pub workspace_rid: ::prost::alloc::string::String,
80 #[prost(string, tag = "2")]
81 pub tag: ::prost::alloc::string::String,
82 #[prost(string, tag = "3")]
83 pub object_path: ::prost::alloc::string::String,
84 #[prost(string, tag = "4")]
85 pub extractor_rid: ::prost::alloc::string::String,
86 #[prost(message, repeated, tag = "5")]
87 pub inputs: ::prost::alloc::vec::Vec<FileExtractionInput>,
88 #[prost(message, repeated, tag = "6")]
89 pub parameters: ::prost::alloc::vec::Vec<FileExtractionParameter>,
90 #[prost(enumeration = "FileOutputFormat", tag = "7")]
91 pub file_output_format: i32,
92 #[prost(message, optional, tag = "8")]
93 pub default_timestamp_metadata: ::core::option::Option<TimestampMetadata>,
94}
95#[derive(Clone, PartialEq, ::prost::Message)]
96pub struct CreateImageResponse {
97 #[prost(message, optional, tag = "1")]
98 pub image: ::core::option::Option<ContainerImage>,
99}
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct GetImageRequest {
102 #[prost(string, tag = "1")]
103 pub rid: ::prost::alloc::string::String,
104 #[prost(string, tag = "2")]
105 pub workspace_rid: ::prost::alloc::string::String,
106}
107#[derive(Clone, PartialEq, ::prost::Message)]
108pub struct GetImageResponse {
109 #[prost(message, optional, tag = "1")]
110 pub image: ::core::option::Option<ContainerImage>,
111}
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct DeleteImageRequest {
114 #[prost(string, tag = "1")]
115 pub rid: ::prost::alloc::string::String,
116 #[prost(string, tag = "2")]
117 pub workspace_rid: ::prost::alloc::string::String,
118}
119#[derive(Clone, Copy, PartialEq, ::prost::Message)]
120pub struct DeleteImageResponse {}
121#[derive(Clone, PartialEq, ::prost::Message)]
122pub struct TagFilter {
123 #[prost(string, tag = "1")]
124 pub tag: ::prost::alloc::string::String,
125}
126#[derive(Clone, Copy, PartialEq, ::prost::Message)]
127pub struct StatusFilter {
128 #[prost(enumeration = "ContainerImageStatus", tag = "1")]
129 pub status: i32,
130}
131#[derive(Clone, PartialEq, ::prost::Message)]
132pub struct AndFilter {
133 #[prost(message, repeated, tag = "1")]
134 pub clauses: ::prost::alloc::vec::Vec<SearchFilter>,
135}
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct SearchFilter {
138 #[prost(oneof = "search_filter::Filter", tags = "1, 2, 3")]
139 pub filter: ::core::option::Option<search_filter::Filter>,
140}
141pub mod search_filter {
143 #[derive(Clone, PartialEq, ::prost::Oneof)]
144 pub enum Filter {
145 #[prost(message, tag = "1")]
146 Tag(super::TagFilter),
147 #[prost(message, tag = "2")]
148 Status(super::StatusFilter),
149 #[prost(message, tag = "3")]
150 And(super::AndFilter),
151 }
152}
153#[derive(Clone, PartialEq, ::prost::Message)]
154pub struct SearchImagesRequest {
155 #[prost(string, tag = "1")]
156 pub workspace_rid: ::prost::alloc::string::String,
157 #[prost(message, optional, tag = "2")]
158 pub filter: ::core::option::Option<SearchFilter>,
159 #[prost(int32, optional, tag = "3")]
160 pub page_size: ::core::option::Option<i32>,
161 #[prost(string, optional, tag = "4")]
162 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
163}
164#[derive(Clone, PartialEq, ::prost::Message)]
165pub struct SearchImagesResponse {
166 #[prost(message, repeated, tag = "1")]
167 pub images: ::prost::alloc::vec::Vec<ContainerImage>,
168 #[prost(string, optional, tag = "2")]
169 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
170}
171#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
172#[repr(i32)]
173pub enum ContainerImageStatus {
174 Unspecified = 0,
175 Pending = 1,
176 Ready = 2,
177 Failed = 3,
178}
179impl ContainerImageStatus {
180 pub fn as_str_name(&self) -> &'static str {
185 match self {
186 Self::Unspecified => "CONTAINER_IMAGE_STATUS_UNSPECIFIED",
187 Self::Pending => "CONTAINER_IMAGE_STATUS_PENDING",
188 Self::Ready => "CONTAINER_IMAGE_STATUS_READY",
189 Self::Failed => "CONTAINER_IMAGE_STATUS_FAILED",
190 }
191 }
192 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
194 match value {
195 "CONTAINER_IMAGE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
196 "CONTAINER_IMAGE_STATUS_PENDING" => Some(Self::Pending),
197 "CONTAINER_IMAGE_STATUS_READY" => Some(Self::Ready),
198 "CONTAINER_IMAGE_STATUS_FAILED" => Some(Self::Failed),
199 _ => None,
200 }
201 }
202}
203#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
204#[repr(i32)]
205pub enum FileOutputFormat {
206 Unspecified = 0,
207 Parquet = 1,
208 Csv = 2,
209 ParquetTar = 3,
210 AvroStream = 4,
211 JsonL = 5,
212 Manifest = 6,
213}
214impl FileOutputFormat {
215 pub fn as_str_name(&self) -> &'static str {
220 match self {
221 Self::Unspecified => "FILE_OUTPUT_FORMAT_UNSPECIFIED",
222 Self::Parquet => "FILE_OUTPUT_FORMAT_PARQUET",
223 Self::Csv => "FILE_OUTPUT_FORMAT_CSV",
224 Self::ParquetTar => "FILE_OUTPUT_FORMAT_PARQUET_TAR",
225 Self::AvroStream => "FILE_OUTPUT_FORMAT_AVRO_STREAM",
226 Self::JsonL => "FILE_OUTPUT_FORMAT_JSON_L",
227 Self::Manifest => "FILE_OUTPUT_FORMAT_MANIFEST",
228 }
229 }
230 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
232 match value {
233 "FILE_OUTPUT_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
234 "FILE_OUTPUT_FORMAT_PARQUET" => Some(Self::Parquet),
235 "FILE_OUTPUT_FORMAT_CSV" => Some(Self::Csv),
236 "FILE_OUTPUT_FORMAT_PARQUET_TAR" => Some(Self::ParquetTar),
237 "FILE_OUTPUT_FORMAT_AVRO_STREAM" => Some(Self::AvroStream),
238 "FILE_OUTPUT_FORMAT_JSON_L" => Some(Self::JsonL),
239 "FILE_OUTPUT_FORMAT_MANIFEST" => Some(Self::Manifest),
240 _ => None,
241 }
242 }
243}
244pub mod registry_service_client {
246 #![allow(
247 unused_variables,
248 dead_code,
249 missing_docs,
250 clippy::wildcard_imports,
251 clippy::let_unit_value,
252 )]
253 use tonic::codegen::*;
254 use tonic::codegen::http::Uri;
255 #[derive(Debug, Clone)]
256 pub struct RegistryServiceClient<T> {
257 inner: tonic::client::Grpc<T>,
258 }
259 impl RegistryServiceClient<tonic::transport::Channel> {
260 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
262 where
263 D: TryInto<tonic::transport::Endpoint>,
264 D::Error: Into<StdError>,
265 {
266 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
267 Ok(Self::new(conn))
268 }
269 }
270 impl<T> RegistryServiceClient<T>
271 where
272 T: tonic::client::GrpcService<tonic::body::Body>,
273 T::Error: Into<StdError>,
274 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
275 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
276 {
277 pub fn new(inner: T) -> Self {
278 let inner = tonic::client::Grpc::new(inner);
279 Self { inner }
280 }
281 pub fn with_origin(inner: T, origin: Uri) -> Self {
282 let inner = tonic::client::Grpc::with_origin(inner, origin);
283 Self { inner }
284 }
285 pub fn with_interceptor<F>(
286 inner: T,
287 interceptor: F,
288 ) -> RegistryServiceClient<InterceptedService<T, F>>
289 where
290 F: tonic::service::Interceptor,
291 T::ResponseBody: Default,
292 T: tonic::codegen::Service<
293 http::Request<tonic::body::Body>,
294 Response = http::Response<
295 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
296 >,
297 >,
298 <T as tonic::codegen::Service<
299 http::Request<tonic::body::Body>,
300 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
301 {
302 RegistryServiceClient::new(InterceptedService::new(inner, interceptor))
303 }
304 #[must_use]
309 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
310 self.inner = self.inner.send_compressed(encoding);
311 self
312 }
313 #[must_use]
315 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
316 self.inner = self.inner.accept_compressed(encoding);
317 self
318 }
319 #[must_use]
323 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
324 self.inner = self.inner.max_decoding_message_size(limit);
325 self
326 }
327 #[must_use]
331 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
332 self.inner = self.inner.max_encoding_message_size(limit);
333 self
334 }
335 pub async fn create_image(
336 &mut self,
337 request: impl tonic::IntoRequest<super::CreateImageRequest>,
338 ) -> std::result::Result<
339 tonic::Response<super::CreateImageResponse>,
340 tonic::Status,
341 > {
342 self.inner
343 .ready()
344 .await
345 .map_err(|e| {
346 tonic::Status::unknown(
347 format!("Service was not ready: {}", e.into()),
348 )
349 })?;
350 let codec = tonic::codec::ProstCodec::default();
351 let path = http::uri::PathAndQuery::from_static(
352 "/nominal.registry.v2.RegistryService/CreateImage",
353 );
354 let mut req = request.into_request();
355 req.extensions_mut()
356 .insert(
357 GrpcMethod::new("nominal.registry.v2.RegistryService", "CreateImage"),
358 );
359 self.inner.unary(req, path, codec).await
360 }
361 pub async fn get_image(
362 &mut self,
363 request: impl tonic::IntoRequest<super::GetImageRequest>,
364 ) -> std::result::Result<
365 tonic::Response<super::GetImageResponse>,
366 tonic::Status,
367 > {
368 self.inner
369 .ready()
370 .await
371 .map_err(|e| {
372 tonic::Status::unknown(
373 format!("Service was not ready: {}", e.into()),
374 )
375 })?;
376 let codec = tonic::codec::ProstCodec::default();
377 let path = http::uri::PathAndQuery::from_static(
378 "/nominal.registry.v2.RegistryService/GetImage",
379 );
380 let mut req = request.into_request();
381 req.extensions_mut()
382 .insert(
383 GrpcMethod::new("nominal.registry.v2.RegistryService", "GetImage"),
384 );
385 self.inner.unary(req, path, codec).await
386 }
387 pub async fn delete_image(
388 &mut self,
389 request: impl tonic::IntoRequest<super::DeleteImageRequest>,
390 ) -> std::result::Result<
391 tonic::Response<super::DeleteImageResponse>,
392 tonic::Status,
393 > {
394 self.inner
395 .ready()
396 .await
397 .map_err(|e| {
398 tonic::Status::unknown(
399 format!("Service was not ready: {}", e.into()),
400 )
401 })?;
402 let codec = tonic::codec::ProstCodec::default();
403 let path = http::uri::PathAndQuery::from_static(
404 "/nominal.registry.v2.RegistryService/DeleteImage",
405 );
406 let mut req = request.into_request();
407 req.extensions_mut()
408 .insert(
409 GrpcMethod::new("nominal.registry.v2.RegistryService", "DeleteImage"),
410 );
411 self.inner.unary(req, path, codec).await
412 }
413 pub async fn search_images(
414 &mut self,
415 request: impl tonic::IntoRequest<super::SearchImagesRequest>,
416 ) -> std::result::Result<
417 tonic::Response<super::SearchImagesResponse>,
418 tonic::Status,
419 > {
420 self.inner
421 .ready()
422 .await
423 .map_err(|e| {
424 tonic::Status::unknown(
425 format!("Service was not ready: {}", e.into()),
426 )
427 })?;
428 let codec = tonic::codec::ProstCodec::default();
429 let path = http::uri::PathAndQuery::from_static(
430 "/nominal.registry.v2.RegistryService/SearchImages",
431 );
432 let mut req = request.into_request();
433 req.extensions_mut()
434 .insert(
435 GrpcMethod::new(
436 "nominal.registry.v2.RegistryService",
437 "SearchImages",
438 ),
439 );
440 self.inner.unary(req, path, codec).await
441 }
442 }
443}