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 #[prost(string, optional, tag = "9")]
95 pub source_image_rid: ::core::option::Option<::prost::alloc::string::String>,
96}
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct CreateImageResponse {
99 #[prost(message, optional, tag = "1")]
100 pub image: ::core::option::Option<ContainerImage>,
101}
102#[derive(Clone, PartialEq, ::prost::Message)]
103pub struct GetImageRequest {
104 #[prost(string, tag = "1")]
105 pub rid: ::prost::alloc::string::String,
106 #[prost(string, tag = "2")]
107 pub workspace_rid: ::prost::alloc::string::String,
108}
109#[derive(Clone, PartialEq, ::prost::Message)]
110pub struct GetImageResponse {
111 #[prost(message, optional, tag = "1")]
112 pub image: ::core::option::Option<ContainerImage>,
113}
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct DeleteImageRequest {
116 #[prost(string, tag = "1")]
117 pub rid: ::prost::alloc::string::String,
118 #[prost(string, tag = "2")]
119 pub workspace_rid: ::prost::alloc::string::String,
120}
121#[derive(Clone, Copy, PartialEq, ::prost::Message)]
122pub struct DeleteImageResponse {}
123#[derive(Clone, PartialEq, ::prost::Message)]
124pub struct TagFilter {
125 #[prost(string, tag = "1")]
126 pub tag: ::prost::alloc::string::String,
127}
128#[derive(Clone, Copy, PartialEq, ::prost::Message)]
129pub struct StatusFilter {
130 #[prost(enumeration = "ContainerImageStatus", tag = "1")]
131 pub status: i32,
132}
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct ExtractorFilter {
135 #[prost(string, tag = "1")]
136 pub extractor_rid: ::prost::alloc::string::String,
137}
138#[derive(Clone, PartialEq, ::prost::Message)]
139pub struct AndFilter {
140 #[prost(message, repeated, tag = "1")]
141 pub clauses: ::prost::alloc::vec::Vec<SearchFilter>,
142}
143#[derive(Clone, PartialEq, ::prost::Message)]
144pub struct SearchFilter {
145 #[prost(oneof = "search_filter::Filter", tags = "1, 2, 3, 4")]
146 pub filter: ::core::option::Option<search_filter::Filter>,
147}
148pub mod search_filter {
150 #[derive(Clone, PartialEq, ::prost::Oneof)]
151 pub enum Filter {
152 #[prost(message, tag = "1")]
153 Tag(super::TagFilter),
154 #[prost(message, tag = "2")]
155 Status(super::StatusFilter),
156 #[prost(message, tag = "3")]
157 And(super::AndFilter),
158 #[prost(message, tag = "4")]
159 Extractor(super::ExtractorFilter),
160 }
161}
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct SearchImagesRequest {
164 #[prost(string, tag = "1")]
165 pub workspace_rid: ::prost::alloc::string::String,
166 #[prost(message, optional, tag = "2")]
167 pub filter: ::core::option::Option<SearchFilter>,
168 #[prost(int32, optional, tag = "3")]
169 pub page_size: ::core::option::Option<i32>,
170 #[prost(string, optional, tag = "4")]
171 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
172}
173#[derive(Clone, PartialEq, ::prost::Message)]
174pub struct SearchImagesResponse {
175 #[prost(message, repeated, tag = "1")]
176 pub images: ::prost::alloc::vec::Vec<ContainerImage>,
177 #[prost(string, optional, tag = "2")]
178 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
179}
180#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
181#[repr(i32)]
182pub enum ContainerImageStatus {
183 Unspecified = 0,
184 Pending = 1,
185 Ready = 2,
186 Failed = 3,
187}
188impl ContainerImageStatus {
189 pub fn as_str_name(&self) -> &'static str {
194 match self {
195 Self::Unspecified => "CONTAINER_IMAGE_STATUS_UNSPECIFIED",
196 Self::Pending => "CONTAINER_IMAGE_STATUS_PENDING",
197 Self::Ready => "CONTAINER_IMAGE_STATUS_READY",
198 Self::Failed => "CONTAINER_IMAGE_STATUS_FAILED",
199 }
200 }
201 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
203 match value {
204 "CONTAINER_IMAGE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
205 "CONTAINER_IMAGE_STATUS_PENDING" => Some(Self::Pending),
206 "CONTAINER_IMAGE_STATUS_READY" => Some(Self::Ready),
207 "CONTAINER_IMAGE_STATUS_FAILED" => Some(Self::Failed),
208 _ => None,
209 }
210 }
211}
212#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
213#[repr(i32)]
214pub enum FileOutputFormat {
215 Unspecified = 0,
216 Parquet = 1,
217 Csv = 2,
218 ParquetTar = 3,
219 AvroStream = 4,
220 JsonL = 5,
221 Manifest = 6,
222}
223impl FileOutputFormat {
224 pub fn as_str_name(&self) -> &'static str {
229 match self {
230 Self::Unspecified => "FILE_OUTPUT_FORMAT_UNSPECIFIED",
231 Self::Parquet => "FILE_OUTPUT_FORMAT_PARQUET",
232 Self::Csv => "FILE_OUTPUT_FORMAT_CSV",
233 Self::ParquetTar => "FILE_OUTPUT_FORMAT_PARQUET_TAR",
234 Self::AvroStream => "FILE_OUTPUT_FORMAT_AVRO_STREAM",
235 Self::JsonL => "FILE_OUTPUT_FORMAT_JSON_L",
236 Self::Manifest => "FILE_OUTPUT_FORMAT_MANIFEST",
237 }
238 }
239 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
241 match value {
242 "FILE_OUTPUT_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
243 "FILE_OUTPUT_FORMAT_PARQUET" => Some(Self::Parquet),
244 "FILE_OUTPUT_FORMAT_CSV" => Some(Self::Csv),
245 "FILE_OUTPUT_FORMAT_PARQUET_TAR" => Some(Self::ParquetTar),
246 "FILE_OUTPUT_FORMAT_AVRO_STREAM" => Some(Self::AvroStream),
247 "FILE_OUTPUT_FORMAT_JSON_L" => Some(Self::JsonL),
248 "FILE_OUTPUT_FORMAT_MANIFEST" => Some(Self::Manifest),
249 _ => None,
250 }
251 }
252}
253pub mod registry_service_client {
255 #![allow(
256 unused_variables,
257 dead_code,
258 missing_docs,
259 clippy::wildcard_imports,
260 clippy::let_unit_value,
261 )]
262 use tonic::codegen::*;
263 use tonic::codegen::http::Uri;
264 #[derive(Debug, Clone)]
265 pub struct RegistryServiceClient<T> {
266 inner: tonic::client::Grpc<T>,
267 }
268 impl RegistryServiceClient<tonic::transport::Channel> {
269 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
271 where
272 D: TryInto<tonic::transport::Endpoint>,
273 D::Error: Into<StdError>,
274 {
275 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
276 Ok(Self::new(conn))
277 }
278 }
279 impl<T> RegistryServiceClient<T>
280 where
281 T: tonic::client::GrpcService<tonic::body::Body>,
282 T::Error: Into<StdError>,
283 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
284 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
285 {
286 pub fn new(inner: T) -> Self {
287 let inner = tonic::client::Grpc::new(inner);
288 Self { inner }
289 }
290 pub fn with_origin(inner: T, origin: Uri) -> Self {
291 let inner = tonic::client::Grpc::with_origin(inner, origin);
292 Self { inner }
293 }
294 pub fn with_interceptor<F>(
295 inner: T,
296 interceptor: F,
297 ) -> RegistryServiceClient<InterceptedService<T, F>>
298 where
299 F: tonic::service::Interceptor,
300 T::ResponseBody: Default,
301 T: tonic::codegen::Service<
302 http::Request<tonic::body::Body>,
303 Response = http::Response<
304 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
305 >,
306 >,
307 <T as tonic::codegen::Service<
308 http::Request<tonic::body::Body>,
309 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
310 {
311 RegistryServiceClient::new(InterceptedService::new(inner, interceptor))
312 }
313 #[must_use]
318 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
319 self.inner = self.inner.send_compressed(encoding);
320 self
321 }
322 #[must_use]
324 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
325 self.inner = self.inner.accept_compressed(encoding);
326 self
327 }
328 #[must_use]
332 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
333 self.inner = self.inner.max_decoding_message_size(limit);
334 self
335 }
336 #[must_use]
340 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
341 self.inner = self.inner.max_encoding_message_size(limit);
342 self
343 }
344 pub async fn create_image(
345 &mut self,
346 request: impl tonic::IntoRequest<super::CreateImageRequest>,
347 ) -> std::result::Result<
348 tonic::Response<super::CreateImageResponse>,
349 tonic::Status,
350 > {
351 self.inner
352 .ready()
353 .await
354 .map_err(|e| {
355 tonic::Status::unknown(
356 format!("Service was not ready: {}", e.into()),
357 )
358 })?;
359 let codec = tonic::codec::ProstCodec::default();
360 let path = http::uri::PathAndQuery::from_static(
361 "/nominal.registry.v2.RegistryService/CreateImage",
362 );
363 let mut req = request.into_request();
364 req.extensions_mut()
365 .insert(
366 GrpcMethod::new("nominal.registry.v2.RegistryService", "CreateImage"),
367 );
368 self.inner.unary(req, path, codec).await
369 }
370 pub async fn get_image(
371 &mut self,
372 request: impl tonic::IntoRequest<super::GetImageRequest>,
373 ) -> std::result::Result<
374 tonic::Response<super::GetImageResponse>,
375 tonic::Status,
376 > {
377 self.inner
378 .ready()
379 .await
380 .map_err(|e| {
381 tonic::Status::unknown(
382 format!("Service was not ready: {}", e.into()),
383 )
384 })?;
385 let codec = tonic::codec::ProstCodec::default();
386 let path = http::uri::PathAndQuery::from_static(
387 "/nominal.registry.v2.RegistryService/GetImage",
388 );
389 let mut req = request.into_request();
390 req.extensions_mut()
391 .insert(
392 GrpcMethod::new("nominal.registry.v2.RegistryService", "GetImage"),
393 );
394 self.inner.unary(req, path, codec).await
395 }
396 pub async fn delete_image(
397 &mut self,
398 request: impl tonic::IntoRequest<super::DeleteImageRequest>,
399 ) -> std::result::Result<
400 tonic::Response<super::DeleteImageResponse>,
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.v2.RegistryService/DeleteImage",
414 );
415 let mut req = request.into_request();
416 req.extensions_mut()
417 .insert(
418 GrpcMethod::new("nominal.registry.v2.RegistryService", "DeleteImage"),
419 );
420 self.inner.unary(req, path, codec).await
421 }
422 pub async fn search_images(
423 &mut self,
424 request: impl tonic::IntoRequest<super::SearchImagesRequest>,
425 ) -> std::result::Result<
426 tonic::Response<super::SearchImagesResponse>,
427 tonic::Status,
428 > {
429 self.inner
430 .ready()
431 .await
432 .map_err(|e| {
433 tonic::Status::unknown(
434 format!("Service was not ready: {}", e.into()),
435 )
436 })?;
437 let codec = tonic::codec::ProstCodec::default();
438 let path = http::uri::PathAndQuery::from_static(
439 "/nominal.registry.v2.RegistryService/SearchImages",
440 );
441 let mut req = request.into_request();
442 req.extensions_mut()
443 .insert(
444 GrpcMethod::new(
445 "nominal.registry.v2.RegistryService",
446 "SearchImages",
447 ),
448 );
449 self.inner.unary(req, path, codec).await
450 }
451 }
452}