1#[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 {}
60pub 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 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 #[must_use]
125 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
126 self.inner = self.inner.send_compressed(encoding);
127 self
128 }
129 #[must_use]
131 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
132 self.inner = self.inner.accept_compressed(encoding);
133 self
134 }
135 #[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 #[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, PartialEq, ::prost::Message)]
295pub struct GetDatasetRetentionWatermarkRequest {
296 #[prost(string, tag = "1")]
297 pub dataset_rid: ::prost::alloc::string::String,
298}
299#[derive(Clone, Copy, PartialEq, ::prost::Message)]
300pub struct GetDatasetRetentionWatermarkResponse {
301 #[prost(message, optional, tag = "1")]
302 pub watermark: ::core::option::Option<super::super::types::time::Timestamp>,
303}
304#[derive(Clone, PartialEq, ::prost::Message)]
305pub struct UpdateDatasetRetentionWatermarkRequest {
306 #[prost(string, tag = "1")]
307 pub dataset_rid: ::prost::alloc::string::String,
308 #[prost(message, optional, tag = "2")]
309 pub watermark: ::core::option::Option<super::super::types::time::Timestamp>,
310}
311#[derive(Clone, Copy, PartialEq, ::prost::Message)]
312pub struct UpdateDatasetRetentionWatermarkResponse {
313 #[prost(message, optional, tag = "1")]
314 pub watermark: ::core::option::Option<super::super::types::time::Timestamp>,
315}
316#[derive(Clone, Copy, PartialEq, ::prost::Message)]
317pub struct KeepForever {}
318#[derive(Clone, Copy, PartialEq, ::prost::Message)]
319pub struct KeepUntilExpiry {
320 #[prost(int32, tag = "1")]
321 pub expiry_days: i32,
322}
323#[derive(Clone, Copy, PartialEq, ::prost::Message)]
324pub struct RetentionPolicy {
325 #[prost(oneof = "retention_policy::Policy", tags = "1, 2")]
326 pub policy: ::core::option::Option<retention_policy::Policy>,
327}
328pub mod retention_policy {
330 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
331 pub enum Policy {
332 #[prost(message, tag = "1")]
333 KeepForever(super::KeepForever),
334 #[prost(message, tag = "2")]
335 KeepUntilExpiry(super::KeepUntilExpiry),
336 }
337}
338#[derive(Clone, PartialEq, ::prost::Message)]
339pub struct UpdateRetentionPolicyRequest {
340 #[prost(string, tag = "1")]
341 pub dataset_rid: ::prost::alloc::string::String,
342 #[prost(message, optional, tag = "2")]
343 pub retention_policy: ::core::option::Option<RetentionPolicy>,
344}
345#[derive(Clone, Copy, PartialEq, ::prost::Message)]
346pub struct UpdateRetentionPolicyResponse {}
347pub mod dataset_retention_service_client {
349 #![allow(
350 unused_variables,
351 dead_code,
352 missing_docs,
353 clippy::wildcard_imports,
354 clippy::let_unit_value,
355 )]
356 use tonic::codegen::*;
357 use tonic::codegen::http::Uri;
358 #[derive(Debug, Clone)]
359 pub struct DatasetRetentionServiceClient<T> {
360 inner: tonic::client::Grpc<T>,
361 }
362 impl DatasetRetentionServiceClient<tonic::transport::Channel> {
363 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
365 where
366 D: TryInto<tonic::transport::Endpoint>,
367 D::Error: Into<StdError>,
368 {
369 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
370 Ok(Self::new(conn))
371 }
372 }
373 impl<T> DatasetRetentionServiceClient<T>
374 where
375 T: tonic::client::GrpcService<tonic::body::Body>,
376 T::Error: Into<StdError>,
377 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
378 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
379 {
380 pub fn new(inner: T) -> Self {
381 let inner = tonic::client::Grpc::new(inner);
382 Self { inner }
383 }
384 pub fn with_origin(inner: T, origin: Uri) -> Self {
385 let inner = tonic::client::Grpc::with_origin(inner, origin);
386 Self { inner }
387 }
388 pub fn with_interceptor<F>(
389 inner: T,
390 interceptor: F,
391 ) -> DatasetRetentionServiceClient<InterceptedService<T, F>>
392 where
393 F: tonic::service::Interceptor,
394 T::ResponseBody: Default,
395 T: tonic::codegen::Service<
396 http::Request<tonic::body::Body>,
397 Response = http::Response<
398 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
399 >,
400 >,
401 <T as tonic::codegen::Service<
402 http::Request<tonic::body::Body>,
403 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
404 {
405 DatasetRetentionServiceClient::new(
406 InterceptedService::new(inner, interceptor),
407 )
408 }
409 #[must_use]
414 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
415 self.inner = self.inner.send_compressed(encoding);
416 self
417 }
418 #[must_use]
420 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
421 self.inner = self.inner.accept_compressed(encoding);
422 self
423 }
424 #[must_use]
428 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
429 self.inner = self.inner.max_decoding_message_size(limit);
430 self
431 }
432 #[must_use]
436 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
437 self.inner = self.inner.max_encoding_message_size(limit);
438 self
439 }
440 pub async fn update_retention_policy(
441 &mut self,
442 request: impl tonic::IntoRequest<super::UpdateRetentionPolicyRequest>,
443 ) -> std::result::Result<
444 tonic::Response<super::UpdateRetentionPolicyResponse>,
445 tonic::Status,
446 > {
447 self.inner
448 .ready()
449 .await
450 .map_err(|e| {
451 tonic::Status::unknown(
452 format!("Service was not ready: {}", e.into()),
453 )
454 })?;
455 let codec = tonic::codec::ProstCodec::default();
456 let path = http::uri::PathAndQuery::from_static(
457 "/nominal.storage.v1.DatasetRetentionService/UpdateRetentionPolicy",
458 );
459 let mut req = request.into_request();
460 req.extensions_mut()
461 .insert(
462 GrpcMethod::new(
463 "nominal.storage.v1.DatasetRetentionService",
464 "UpdateRetentionPolicy",
465 ),
466 );
467 self.inner.unary(req, path, codec).await
468 }
469 pub async fn upsert_dataset_retention_exemption(
470 &mut self,
471 request: impl tonic::IntoRequest<
472 super::UpsertDatasetRetentionExemptionRequest,
473 >,
474 ) -> std::result::Result<
475 tonic::Response<super::UpsertDatasetRetentionExemptionResponse>,
476 tonic::Status,
477 > {
478 self.inner
479 .ready()
480 .await
481 .map_err(|e| {
482 tonic::Status::unknown(
483 format!("Service was not ready: {}", e.into()),
484 )
485 })?;
486 let codec = tonic::codec::ProstCodec::default();
487 let path = http::uri::PathAndQuery::from_static(
488 "/nominal.storage.v1.DatasetRetentionService/UpsertDatasetRetentionExemption",
489 );
490 let mut req = request.into_request();
491 req.extensions_mut()
492 .insert(
493 GrpcMethod::new(
494 "nominal.storage.v1.DatasetRetentionService",
495 "UpsertDatasetRetentionExemption",
496 ),
497 );
498 self.inner.unary(req, path, codec).await
499 }
500 pub async fn delete_dataset_retention_exemption(
501 &mut self,
502 request: impl tonic::IntoRequest<
503 super::DeleteDatasetRetentionExemptionRequest,
504 >,
505 ) -> std::result::Result<
506 tonic::Response<super::DeleteDatasetRetentionExemptionResponse>,
507 tonic::Status,
508 > {
509 self.inner
510 .ready()
511 .await
512 .map_err(|e| {
513 tonic::Status::unknown(
514 format!("Service was not ready: {}", e.into()),
515 )
516 })?;
517 let codec = tonic::codec::ProstCodec::default();
518 let path = http::uri::PathAndQuery::from_static(
519 "/nominal.storage.v1.DatasetRetentionService/DeleteDatasetRetentionExemption",
520 );
521 let mut req = request.into_request();
522 req.extensions_mut()
523 .insert(
524 GrpcMethod::new(
525 "nominal.storage.v1.DatasetRetentionService",
526 "DeleteDatasetRetentionExemption",
527 ),
528 );
529 self.inner.unary(req, path, codec).await
530 }
531 pub async fn list_dataset_retention_exemptions(
532 &mut self,
533 request: impl tonic::IntoRequest<
534 super::ListDatasetRetentionExemptionsRequest,
535 >,
536 ) -> std::result::Result<
537 tonic::Response<super::ListDatasetRetentionExemptionsResponse>,
538 tonic::Status,
539 > {
540 self.inner
541 .ready()
542 .await
543 .map_err(|e| {
544 tonic::Status::unknown(
545 format!("Service was not ready: {}", e.into()),
546 )
547 })?;
548 let codec = tonic::codec::ProstCodec::default();
549 let path = http::uri::PathAndQuery::from_static(
550 "/nominal.storage.v1.DatasetRetentionService/ListDatasetRetentionExemptions",
551 );
552 let mut req = request.into_request();
553 req.extensions_mut()
554 .insert(
555 GrpcMethod::new(
556 "nominal.storage.v1.DatasetRetentionService",
557 "ListDatasetRetentionExemptions",
558 ),
559 );
560 self.inner.unary(req, path, codec).await
561 }
562 pub async fn get_dataset_retention_watermark(
563 &mut self,
564 request: impl tonic::IntoRequest<super::GetDatasetRetentionWatermarkRequest>,
565 ) -> std::result::Result<
566 tonic::Response<super::GetDatasetRetentionWatermarkResponse>,
567 tonic::Status,
568 > {
569 self.inner
570 .ready()
571 .await
572 .map_err(|e| {
573 tonic::Status::unknown(
574 format!("Service was not ready: {}", e.into()),
575 )
576 })?;
577 let codec = tonic::codec::ProstCodec::default();
578 let path = http::uri::PathAndQuery::from_static(
579 "/nominal.storage.v1.DatasetRetentionService/GetDatasetRetentionWatermark",
580 );
581 let mut req = request.into_request();
582 req.extensions_mut()
583 .insert(
584 GrpcMethod::new(
585 "nominal.storage.v1.DatasetRetentionService",
586 "GetDatasetRetentionWatermark",
587 ),
588 );
589 self.inner.unary(req, path, codec).await
590 }
591 pub async fn update_dataset_retention_watermark(
592 &mut self,
593 request: impl tonic::IntoRequest<
594 super::UpdateDatasetRetentionWatermarkRequest,
595 >,
596 ) -> std::result::Result<
597 tonic::Response<super::UpdateDatasetRetentionWatermarkResponse>,
598 tonic::Status,
599 > {
600 self.inner
601 .ready()
602 .await
603 .map_err(|e| {
604 tonic::Status::unknown(
605 format!("Service was not ready: {}", e.into()),
606 )
607 })?;
608 let codec = tonic::codec::ProstCodec::default();
609 let path = http::uri::PathAndQuery::from_static(
610 "/nominal.storage.v1.DatasetRetentionService/UpdateDatasetRetentionWatermark",
611 );
612 let mut req = request.into_request();
613 req.extensions_mut()
614 .insert(
615 GrpcMethod::new(
616 "nominal.storage.v1.DatasetRetentionService",
617 "UpdateDatasetRetentionWatermark",
618 ),
619 );
620 self.inner.unary(req, path, codec).await
621 }
622 }
623}