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