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