Skip to main content

nominal_api_proto/proto/
nominal.storage.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct DeleteDataRequest {
4    #[prost(string, tag = "1")]
5    pub data_source_rid: ::prost::alloc::string::String,
6    #[prost(message, optional, tag = "2")]
7    pub time_range: ::core::option::Option<super::super::types::time::Range>,
8    #[prost(map = "string, string", tag = "3")]
9    pub tags: ::std::collections::HashMap<
10        ::prost::alloc::string::String,
11        ::prost::alloc::string::String,
12    >,
13    #[prost(string, repeated, tag = "4")]
14    pub channel_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
15    #[prost(bool, tag = "5")]
16    pub delete_metadata: bool,
17}
18#[derive(Clone, Copy, PartialEq, ::prost::Message)]
19pub struct DeleteDataResponse {}
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct ChannelWithTags {
22    #[prost(string, tag = "1")]
23    pub channel: ::prost::alloc::string::String,
24    #[prost(map = "string, string", tag = "2")]
25    pub tags: ::std::collections::HashMap<
26        ::prost::alloc::string::String,
27        ::prost::alloc::string::String,
28    >,
29}
30#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct DeleteChannelWithTagsRequest {
32    #[prost(string, tag = "1")]
33    pub data_source_rid: ::prost::alloc::string::String,
34    #[prost(string, optional, tag = "2")]
35    pub channel: ::core::option::Option<::prost::alloc::string::String>,
36    #[prost(map = "string, string", tag = "3")]
37    pub tags: ::std::collections::HashMap<
38        ::prost::alloc::string::String,
39        ::prost::alloc::string::String,
40    >,
41    #[prost(bool, tag = "4")]
42    pub apply: bool,
43    #[prost(bool, tag = "5")]
44    pub skip_hard_delete: bool,
45}
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct DeleteChannelWithTagsResponse {
48    #[prost(message, repeated, tag = "1")]
49    pub channel_with_tags: ::prost::alloc::vec::Vec<ChannelWithTags>,
50}
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct UndeleteChannelWithTagsRequest {
53    #[prost(string, tag = "1")]
54    pub data_source_rid: ::prost::alloc::string::String,
55    #[prost(message, repeated, tag = "2")]
56    pub channel_with_tags: ::prost::alloc::vec::Vec<ChannelWithTags>,
57}
58#[derive(Clone, Copy, PartialEq, ::prost::Message)]
59pub struct UndeleteChannelWithTagsResponse {}
60/// Generated client implementations.
61pub mod data_deletion_service_client {
62    #![allow(
63        unused_variables,
64        dead_code,
65        missing_docs,
66        clippy::wildcard_imports,
67        clippy::let_unit_value,
68    )]
69    use tonic::codegen::*;
70    use tonic::codegen::http::Uri;
71    #[derive(Debug, Clone)]
72    pub struct DataDeletionServiceClient<T> {
73        inner: tonic::client::Grpc<T>,
74    }
75    impl DataDeletionServiceClient<tonic::transport::Channel> {
76        /// Attempt to create a new client by connecting to a given endpoint.
77        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
78        where
79            D: TryInto<tonic::transport::Endpoint>,
80            D::Error: Into<StdError>,
81        {
82            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
83            Ok(Self::new(conn))
84        }
85    }
86    impl<T> DataDeletionServiceClient<T>
87    where
88        T: tonic::client::GrpcService<tonic::body::Body>,
89        T::Error: Into<StdError>,
90        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
91        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
92    {
93        pub fn new(inner: T) -> Self {
94            let inner = tonic::client::Grpc::new(inner);
95            Self { inner }
96        }
97        pub fn with_origin(inner: T, origin: Uri) -> Self {
98            let inner = tonic::client::Grpc::with_origin(inner, origin);
99            Self { inner }
100        }
101        pub fn with_interceptor<F>(
102            inner: T,
103            interceptor: F,
104        ) -> DataDeletionServiceClient<InterceptedService<T, F>>
105        where
106            F: tonic::service::Interceptor,
107            T::ResponseBody: Default,
108            T: tonic::codegen::Service<
109                http::Request<tonic::body::Body>,
110                Response = http::Response<
111                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
112                >,
113            >,
114            <T as tonic::codegen::Service<
115                http::Request<tonic::body::Body>,
116            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
117        {
118            DataDeletionServiceClient::new(InterceptedService::new(inner, interceptor))
119        }
120        /// Compress requests with the given encoding.
121        ///
122        /// This requires the server to support it otherwise it might respond with an
123        /// error.
124        #[must_use]
125        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
126            self.inner = self.inner.send_compressed(encoding);
127            self
128        }
129        /// Enable decompressing responses.
130        #[must_use]
131        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
132            self.inner = self.inner.accept_compressed(encoding);
133            self
134        }
135        /// Limits the maximum size of a decoded message.
136        ///
137        /// Default: `4MB`
138        #[must_use]
139        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
140            self.inner = self.inner.max_decoding_message_size(limit);
141            self
142        }
143        /// Limits the maximum size of an encoded message.
144        ///
145        /// Default: `usize::MAX`
146        #[must_use]
147        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
148            self.inner = self.inner.max_encoding_message_size(limit);
149            self
150        }
151        pub async fn delete_data(
152            &mut self,
153            request: impl tonic::IntoRequest<super::DeleteDataRequest>,
154        ) -> std::result::Result<
155            tonic::Response<super::DeleteDataResponse>,
156            tonic::Status,
157        > {
158            self.inner
159                .ready()
160                .await
161                .map_err(|e| {
162                    tonic::Status::unknown(
163                        format!("Service was not ready: {}", e.into()),
164                    )
165                })?;
166            let codec = tonic::codec::ProstCodec::default();
167            let path = http::uri::PathAndQuery::from_static(
168                "/nominal.storage.v1.DataDeletionService/DeleteData",
169            );
170            let mut req = request.into_request();
171            req.extensions_mut()
172                .insert(
173                    GrpcMethod::new(
174                        "nominal.storage.v1.DataDeletionService",
175                        "DeleteData",
176                    ),
177                );
178            self.inner.unary(req, path, codec).await
179        }
180        pub async fn delete_channel_with_tags(
181            &mut self,
182            request: impl tonic::IntoRequest<super::DeleteChannelWithTagsRequest>,
183        ) -> std::result::Result<
184            tonic::Response<super::DeleteChannelWithTagsResponse>,
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.storage.v1.DataDeletionService/DeleteChannelWithTags",
198            );
199            let mut req = request.into_request();
200            req.extensions_mut()
201                .insert(
202                    GrpcMethod::new(
203                        "nominal.storage.v1.DataDeletionService",
204                        "DeleteChannelWithTags",
205                    ),
206                );
207            self.inner.unary(req, path, codec).await
208        }
209        pub async fn undelete_channel_with_tags(
210            &mut self,
211            request: impl tonic::IntoRequest<super::UndeleteChannelWithTagsRequest>,
212        ) -> std::result::Result<
213            tonic::Response<super::UndeleteChannelWithTagsResponse>,
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.storage.v1.DataDeletionService/UndeleteChannelWithTags",
227            );
228            let mut req = request.into_request();
229            req.extensions_mut()
230                .insert(
231                    GrpcMethod::new(
232                        "nominal.storage.v1.DataDeletionService",
233                        "UndeleteChannelWithTags",
234                    ),
235                );
236            self.inner.unary(req, path, codec).await
237        }
238    }
239}
240#[derive(Clone, PartialEq, ::prost::Message)]
241pub struct DatasetRetentionExemption {
242    #[prost(string, tag = "1")]
243    pub dataset_rid: ::prost::alloc::string::String,
244    #[prost(string, tag = "2")]
245    pub source_id: ::prost::alloc::string::String,
246    #[prost(message, optional, tag = "3")]
247    pub bounds: ::core::option::Option<super::super::types::time::Range>,
248    #[prost(string, optional, tag = "4")]
249    pub description: ::core::option::Option<::prost::alloc::string::String>,
250}
251#[derive(Clone, PartialEq, ::prost::Message)]
252pub struct UpsertDatasetRetentionExemptionRequest {
253    #[prost(string, tag = "1")]
254    pub dataset_rid: ::prost::alloc::string::String,
255    #[prost(string, tag = "2")]
256    pub source_id: ::prost::alloc::string::String,
257    #[prost(message, optional, tag = "3")]
258    pub bounds: ::core::option::Option<super::super::types::time::Range>,
259    #[prost(string, optional, tag = "4")]
260    pub description: ::core::option::Option<::prost::alloc::string::String>,
261}
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct UpsertDatasetRetentionExemptionResponse {
264    #[prost(message, optional, tag = "1")]
265    pub exemption: ::core::option::Option<DatasetRetentionExemption>,
266}
267#[derive(Clone, PartialEq, ::prost::Message)]
268pub struct DeleteDatasetRetentionExemptionRequest {
269    #[prost(string, tag = "1")]
270    pub dataset_rid: ::prost::alloc::string::String,
271    #[prost(string, tag = "2")]
272    pub source_id: ::prost::alloc::string::String,
273}
274#[derive(Clone, Copy, PartialEq, ::prost::Message)]
275pub struct DeleteDatasetRetentionExemptionResponse {}
276#[derive(Clone, PartialEq, ::prost::Message)]
277pub struct ListDatasetRetentionExemptionsRequest {
278    #[prost(string, tag = "1")]
279    pub dataset_rid: ::prost::alloc::string::String,
280    #[prost(message, optional, tag = "2")]
281    pub bounds: ::core::option::Option<super::super::types::time::Range>,
282    #[prost(int32, optional, tag = "3")]
283    pub page_size: ::core::option::Option<i32>,
284    #[prost(string, optional, tag = "4")]
285    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
286}
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct ListDatasetRetentionExemptionsResponse {
289    #[prost(message, repeated, tag = "1")]
290    pub exemptions: ::prost::alloc::vec::Vec<DatasetRetentionExemption>,
291    #[prost(string, optional, tag = "2")]
292    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
293}
294#[derive(Clone, Copy, PartialEq, ::prost::Message)]
295pub struct KeepForever {}
296#[derive(Clone, Copy, PartialEq, ::prost::Message)]
297pub struct KeepUntilExpiry {
298    #[prost(int32, tag = "1")]
299    pub expiry_days: i32,
300}
301#[derive(Clone, Copy, PartialEq, ::prost::Message)]
302pub struct RetentionPolicy {
303    #[prost(oneof = "retention_policy::Policy", tags = "1, 2")]
304    pub policy: ::core::option::Option<retention_policy::Policy>,
305}
306/// Nested message and enum types in `RetentionPolicy`.
307pub mod retention_policy {
308    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
309    pub enum Policy {
310        #[prost(message, tag = "1")]
311        KeepForever(super::KeepForever),
312        #[prost(message, tag = "2")]
313        KeepUntilExpiry(super::KeepUntilExpiry),
314    }
315}
316#[derive(Clone, PartialEq, ::prost::Message)]
317pub struct UpdateRetentionPolicyRequest {
318    #[prost(string, tag = "1")]
319    pub dataset_rid: ::prost::alloc::string::String,
320    #[prost(message, optional, tag = "2")]
321    pub retention_policy: ::core::option::Option<RetentionPolicy>,
322}
323#[derive(Clone, Copy, PartialEq, ::prost::Message)]
324pub struct UpdateRetentionPolicyResponse {}
325/// Generated client implementations.
326pub mod dataset_retention_service_client {
327    #![allow(
328        unused_variables,
329        dead_code,
330        missing_docs,
331        clippy::wildcard_imports,
332        clippy::let_unit_value,
333    )]
334    use tonic::codegen::*;
335    use tonic::codegen::http::Uri;
336    #[derive(Debug, Clone)]
337    pub struct DatasetRetentionServiceClient<T> {
338        inner: tonic::client::Grpc<T>,
339    }
340    impl DatasetRetentionServiceClient<tonic::transport::Channel> {
341        /// Attempt to create a new client by connecting to a given endpoint.
342        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
343        where
344            D: TryInto<tonic::transport::Endpoint>,
345            D::Error: Into<StdError>,
346        {
347            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
348            Ok(Self::new(conn))
349        }
350    }
351    impl<T> DatasetRetentionServiceClient<T>
352    where
353        T: tonic::client::GrpcService<tonic::body::Body>,
354        T::Error: Into<StdError>,
355        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
356        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
357    {
358        pub fn new(inner: T) -> Self {
359            let inner = tonic::client::Grpc::new(inner);
360            Self { inner }
361        }
362        pub fn with_origin(inner: T, origin: Uri) -> Self {
363            let inner = tonic::client::Grpc::with_origin(inner, origin);
364            Self { inner }
365        }
366        pub fn with_interceptor<F>(
367            inner: T,
368            interceptor: F,
369        ) -> DatasetRetentionServiceClient<InterceptedService<T, F>>
370        where
371            F: tonic::service::Interceptor,
372            T::ResponseBody: Default,
373            T: tonic::codegen::Service<
374                http::Request<tonic::body::Body>,
375                Response = http::Response<
376                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
377                >,
378            >,
379            <T as tonic::codegen::Service<
380                http::Request<tonic::body::Body>,
381            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
382        {
383            DatasetRetentionServiceClient::new(
384                InterceptedService::new(inner, interceptor),
385            )
386        }
387        /// Compress requests with the given encoding.
388        ///
389        /// This requires the server to support it otherwise it might respond with an
390        /// error.
391        #[must_use]
392        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
393            self.inner = self.inner.send_compressed(encoding);
394            self
395        }
396        /// Enable decompressing responses.
397        #[must_use]
398        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
399            self.inner = self.inner.accept_compressed(encoding);
400            self
401        }
402        /// Limits the maximum size of a decoded message.
403        ///
404        /// Default: `4MB`
405        #[must_use]
406        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
407            self.inner = self.inner.max_decoding_message_size(limit);
408            self
409        }
410        /// Limits the maximum size of an encoded message.
411        ///
412        /// Default: `usize::MAX`
413        #[must_use]
414        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
415            self.inner = self.inner.max_encoding_message_size(limit);
416            self
417        }
418        pub async fn update_retention_policy(
419            &mut self,
420            request: impl tonic::IntoRequest<super::UpdateRetentionPolicyRequest>,
421        ) -> std::result::Result<
422            tonic::Response<super::UpdateRetentionPolicyResponse>,
423            tonic::Status,
424        > {
425            self.inner
426                .ready()
427                .await
428                .map_err(|e| {
429                    tonic::Status::unknown(
430                        format!("Service was not ready: {}", e.into()),
431                    )
432                })?;
433            let codec = tonic::codec::ProstCodec::default();
434            let path = http::uri::PathAndQuery::from_static(
435                "/nominal.storage.v1.DatasetRetentionService/UpdateRetentionPolicy",
436            );
437            let mut req = request.into_request();
438            req.extensions_mut()
439                .insert(
440                    GrpcMethod::new(
441                        "nominal.storage.v1.DatasetRetentionService",
442                        "UpdateRetentionPolicy",
443                    ),
444                );
445            self.inner.unary(req, path, codec).await
446        }
447        pub async fn upsert_dataset_retention_exemption(
448            &mut self,
449            request: impl tonic::IntoRequest<
450                super::UpsertDatasetRetentionExemptionRequest,
451            >,
452        ) -> std::result::Result<
453            tonic::Response<super::UpsertDatasetRetentionExemptionResponse>,
454            tonic::Status,
455        > {
456            self.inner
457                .ready()
458                .await
459                .map_err(|e| {
460                    tonic::Status::unknown(
461                        format!("Service was not ready: {}", e.into()),
462                    )
463                })?;
464            let codec = tonic::codec::ProstCodec::default();
465            let path = http::uri::PathAndQuery::from_static(
466                "/nominal.storage.v1.DatasetRetentionService/UpsertDatasetRetentionExemption",
467            );
468            let mut req = request.into_request();
469            req.extensions_mut()
470                .insert(
471                    GrpcMethod::new(
472                        "nominal.storage.v1.DatasetRetentionService",
473                        "UpsertDatasetRetentionExemption",
474                    ),
475                );
476            self.inner.unary(req, path, codec).await
477        }
478        pub async fn delete_dataset_retention_exemption(
479            &mut self,
480            request: impl tonic::IntoRequest<
481                super::DeleteDatasetRetentionExemptionRequest,
482            >,
483        ) -> std::result::Result<
484            tonic::Response<super::DeleteDatasetRetentionExemptionResponse>,
485            tonic::Status,
486        > {
487            self.inner
488                .ready()
489                .await
490                .map_err(|e| {
491                    tonic::Status::unknown(
492                        format!("Service was not ready: {}", e.into()),
493                    )
494                })?;
495            let codec = tonic::codec::ProstCodec::default();
496            let path = http::uri::PathAndQuery::from_static(
497                "/nominal.storage.v1.DatasetRetentionService/DeleteDatasetRetentionExemption",
498            );
499            let mut req = request.into_request();
500            req.extensions_mut()
501                .insert(
502                    GrpcMethod::new(
503                        "nominal.storage.v1.DatasetRetentionService",
504                        "DeleteDatasetRetentionExemption",
505                    ),
506                );
507            self.inner.unary(req, path, codec).await
508        }
509        pub async fn list_dataset_retention_exemptions(
510            &mut self,
511            request: impl tonic::IntoRequest<
512                super::ListDatasetRetentionExemptionsRequest,
513            >,
514        ) -> std::result::Result<
515            tonic::Response<super::ListDatasetRetentionExemptionsResponse>,
516            tonic::Status,
517        > {
518            self.inner
519                .ready()
520                .await
521                .map_err(|e| {
522                    tonic::Status::unknown(
523                        format!("Service was not ready: {}", e.into()),
524                    )
525                })?;
526            let codec = tonic::codec::ProstCodec::default();
527            let path = http::uri::PathAndQuery::from_static(
528                "/nominal.storage.v1.DatasetRetentionService/ListDatasetRetentionExemptions",
529            );
530            let mut req = request.into_request();
531            req.extensions_mut()
532                .insert(
533                    GrpcMethod::new(
534                        "nominal.storage.v1.DatasetRetentionService",
535                        "ListDatasetRetentionExemptions",
536                    ),
537                );
538            self.inner.unary(req, path, codec).await
539        }
540    }
541}