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")]
9 pub time_range: ::core::option::Option<super::super::types::time::Range>,
10 #[prost(map = "string, string", tag = "3")]
13 pub tags: ::std::collections::HashMap<
14 ::prost::alloc::string::String,
15 ::prost::alloc::string::String,
16 >,
17 #[prost(string, repeated, tag = "4")]
20 pub channel_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
21 #[prost(bool, tag = "5")]
25 pub delete_metadata: bool,
26}
27#[derive(Clone, Copy, PartialEq, ::prost::Message)]
28pub struct DeleteDataResponse {}
29#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct ChannelWithTags {
32 #[prost(string, tag = "1")]
33 pub channel: ::prost::alloc::string::String,
34 #[prost(map = "string, string", tag = "2")]
35 pub tags: ::std::collections::HashMap<
36 ::prost::alloc::string::String,
37 ::prost::alloc::string::String,
38 >,
39}
40#[derive(Clone, PartialEq, ::prost::Message)]
41pub struct DeleteChannelWithTagsRequest {
42 #[prost(string, tag = "1")]
43 pub data_source_rid: ::prost::alloc::string::String,
44 #[prost(string, optional, tag = "2")]
46 pub channel: ::core::option::Option<::prost::alloc::string::String>,
47 #[prost(map = "string, string", tag = "3")]
49 pub tags: ::std::collections::HashMap<
50 ::prost::alloc::string::String,
51 ::prost::alloc::string::String,
52 >,
53 #[prost(bool, tag = "4")]
56 pub apply: bool,
57 #[prost(bool, tag = "5")]
62 pub skip_hard_delete: bool,
63}
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct DeleteChannelWithTagsResponse {
66 #[prost(message, repeated, tag = "1")]
68 pub channel_with_tags: ::prost::alloc::vec::Vec<ChannelWithTags>,
69}
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct UndeleteChannelWithTagsRequest {
72 #[prost(string, tag = "1")]
73 pub data_source_rid: ::prost::alloc::string::String,
74 #[prost(message, repeated, tag = "2")]
75 pub channel_with_tags: ::prost::alloc::vec::Vec<ChannelWithTags>,
76}
77#[derive(Clone, Copy, PartialEq, ::prost::Message)]
78pub struct UndeleteChannelWithTagsResponse {}
79pub mod data_deletion_service_client {
81 #![allow(
82 unused_variables,
83 dead_code,
84 missing_docs,
85 clippy::wildcard_imports,
86 clippy::let_unit_value,
87 )]
88 use tonic::codegen::*;
89 use tonic::codegen::http::Uri;
90 #[derive(Debug, Clone)]
92 pub struct DataDeletionServiceClient<T> {
93 inner: tonic::client::Grpc<T>,
94 }
95 impl DataDeletionServiceClient<tonic::transport::Channel> {
96 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
98 where
99 D: TryInto<tonic::transport::Endpoint>,
100 D::Error: Into<StdError>,
101 {
102 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
103 Ok(Self::new(conn))
104 }
105 }
106 impl<T> DataDeletionServiceClient<T>
107 where
108 T: tonic::client::GrpcService<tonic::body::Body>,
109 T::Error: Into<StdError>,
110 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
111 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
112 {
113 pub fn new(inner: T) -> Self {
114 let inner = tonic::client::Grpc::new(inner);
115 Self { inner }
116 }
117 pub fn with_origin(inner: T, origin: Uri) -> Self {
118 let inner = tonic::client::Grpc::with_origin(inner, origin);
119 Self { inner }
120 }
121 pub fn with_interceptor<F>(
122 inner: T,
123 interceptor: F,
124 ) -> DataDeletionServiceClient<InterceptedService<T, F>>
125 where
126 F: tonic::service::Interceptor,
127 T::ResponseBody: Default,
128 T: tonic::codegen::Service<
129 http::Request<tonic::body::Body>,
130 Response = http::Response<
131 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
132 >,
133 >,
134 <T as tonic::codegen::Service<
135 http::Request<tonic::body::Body>,
136 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
137 {
138 DataDeletionServiceClient::new(InterceptedService::new(inner, interceptor))
139 }
140 #[must_use]
145 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
146 self.inner = self.inner.send_compressed(encoding);
147 self
148 }
149 #[must_use]
151 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
152 self.inner = self.inner.accept_compressed(encoding);
153 self
154 }
155 #[must_use]
159 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
160 self.inner = self.inner.max_decoding_message_size(limit);
161 self
162 }
163 #[must_use]
167 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
168 self.inner = self.inner.max_encoding_message_size(limit);
169 self
170 }
171 pub async fn delete_data(
174 &mut self,
175 request: impl tonic::IntoRequest<super::DeleteDataRequest>,
176 ) -> std::result::Result<
177 tonic::Response<super::DeleteDataResponse>,
178 tonic::Status,
179 > {
180 self.inner
181 .ready()
182 .await
183 .map_err(|e| {
184 tonic::Status::unknown(
185 format!("Service was not ready: {}", e.into()),
186 )
187 })?;
188 let codec = tonic::codec::ProstCodec::default();
189 let path = http::uri::PathAndQuery::from_static(
190 "/nominal.storage.v1.DataDeletionService/DeleteData",
191 );
192 let mut req = request.into_request();
193 req.extensions_mut()
194 .insert(
195 GrpcMethod::new(
196 "nominal.storage.v1.DataDeletionService",
197 "DeleteData",
198 ),
199 );
200 self.inner.unary(req, path, codec).await
201 }
202 pub async fn delete_channel_with_tags(
208 &mut self,
209 request: impl tonic::IntoRequest<super::DeleteChannelWithTagsRequest>,
210 ) -> std::result::Result<
211 tonic::Response<super::DeleteChannelWithTagsResponse>,
212 tonic::Status,
213 > {
214 self.inner
215 .ready()
216 .await
217 .map_err(|e| {
218 tonic::Status::unknown(
219 format!("Service was not ready: {}", e.into()),
220 )
221 })?;
222 let codec = tonic::codec::ProstCodec::default();
223 let path = http::uri::PathAndQuery::from_static(
224 "/nominal.storage.v1.DataDeletionService/DeleteChannelWithTags",
225 );
226 let mut req = request.into_request();
227 req.extensions_mut()
228 .insert(
229 GrpcMethod::new(
230 "nominal.storage.v1.DataDeletionService",
231 "DeleteChannelWithTags",
232 ),
233 );
234 self.inner.unary(req, path, codec).await
235 }
236 pub async fn undelete_channel_with_tags(
240 &mut self,
241 request: impl tonic::IntoRequest<super::UndeleteChannelWithTagsRequest>,
242 ) -> std::result::Result<
243 tonic::Response<super::UndeleteChannelWithTagsResponse>,
244 tonic::Status,
245 > {
246 self.inner
247 .ready()
248 .await
249 .map_err(|e| {
250 tonic::Status::unknown(
251 format!("Service was not ready: {}", e.into()),
252 )
253 })?;
254 let codec = tonic::codec::ProstCodec::default();
255 let path = http::uri::PathAndQuery::from_static(
256 "/nominal.storage.v1.DataDeletionService/UndeleteChannelWithTags",
257 );
258 let mut req = request.into_request();
259 req.extensions_mut()
260 .insert(
261 GrpcMethod::new(
262 "nominal.storage.v1.DataDeletionService",
263 "UndeleteChannelWithTags",
264 ),
265 );
266 self.inner.unary(req, path, codec).await
267 }
268 }
269}
270#[derive(Clone, PartialEq, ::prost::Message)]
273pub struct DatasetRetentionExemption {
274 #[prost(string, tag = "1")]
276 pub dataset_rid: ::prost::alloc::string::String,
277 #[prost(string, tag = "2")]
279 pub source_id: ::prost::alloc::string::String,
280 #[prost(message, optional, tag = "3")]
282 pub bounds: ::core::option::Option<super::super::types::time::Range>,
283 #[prost(string, optional, tag = "4")]
284 pub description: ::core::option::Option<::prost::alloc::string::String>,
285}
286#[derive(Clone, PartialEq, ::prost::Message)]
287pub struct UpsertDatasetRetentionExemptionRequest {
288 #[prost(string, tag = "1")]
289 pub dataset_rid: ::prost::alloc::string::String,
290 #[prost(string, tag = "2")]
291 pub source_id: ::prost::alloc::string::String,
292 #[prost(message, optional, tag = "3")]
294 pub bounds: ::core::option::Option<super::super::types::time::Range>,
295 #[prost(string, optional, tag = "4")]
296 pub description: ::core::option::Option<::prost::alloc::string::String>,
297}
298#[derive(Clone, PartialEq, ::prost::Message)]
299pub struct UpsertDatasetRetentionExemptionResponse {
300 #[prost(message, optional, tag = "1")]
301 pub exemption: ::core::option::Option<DatasetRetentionExemption>,
302}
303#[derive(Clone, PartialEq, ::prost::Message)]
304pub struct DeleteDatasetRetentionExemptionRequest {
305 #[prost(string, tag = "1")]
306 pub dataset_rid: ::prost::alloc::string::String,
307 #[prost(string, tag = "2")]
308 pub source_id: ::prost::alloc::string::String,
309}
310#[derive(Clone, Copy, PartialEq, ::prost::Message)]
311pub struct DeleteDatasetRetentionExemptionResponse {}
312#[derive(Clone, PartialEq, ::prost::Message)]
313pub struct ListDatasetRetentionExemptionsRequest {
314 #[prost(string, tag = "1")]
315 pub dataset_rid: ::prost::alloc::string::String,
316 #[prost(message, optional, tag = "2")]
318 pub bounds: ::core::option::Option<super::super::types::time::Range>,
319 #[prost(int32, optional, tag = "3")]
320 pub page_size: ::core::option::Option<i32>,
321 #[prost(string, optional, tag = "4")]
322 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
323}
324#[derive(Clone, PartialEq, ::prost::Message)]
325pub struct ListDatasetRetentionExemptionsResponse {
326 #[prost(message, repeated, tag = "1")]
327 pub exemptions: ::prost::alloc::vec::Vec<DatasetRetentionExemption>,
328 #[prost(string, optional, tag = "2")]
329 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
330}
331#[derive(Clone, Copy, PartialEq, ::prost::Message)]
332pub struct KeepForever {}
333#[derive(Clone, Copy, PartialEq, ::prost::Message)]
334pub struct KeepUntilExpiry {
335 #[prost(int32, tag = "1")]
336 pub expiry_days: i32,
337}
338#[derive(Clone, Copy, PartialEq, ::prost::Message)]
339pub struct RetentionPolicy {
340 #[prost(oneof = "retention_policy::Policy", tags = "1, 2")]
341 pub policy: ::core::option::Option<retention_policy::Policy>,
342}
343pub mod retention_policy {
345 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
346 pub enum Policy {
347 #[prost(message, tag = "1")]
348 KeepForever(super::KeepForever),
349 #[prost(message, tag = "2")]
350 KeepUntilExpiry(super::KeepUntilExpiry),
351 }
352}
353#[derive(Clone, PartialEq, ::prost::Message)]
354pub struct UpdateRetentionPolicyRequest {
355 #[prost(string, tag = "1")]
356 pub dataset_rid: ::prost::alloc::string::String,
357 #[prost(message, optional, tag = "2")]
359 pub retention_policy: ::core::option::Option<RetentionPolicy>,
360}
361#[derive(Clone, Copy, PartialEq, ::prost::Message)]
362pub struct UpdateRetentionPolicyResponse {}
363pub mod dataset_retention_service_client {
365 #![allow(
366 unused_variables,
367 dead_code,
368 missing_docs,
369 clippy::wildcard_imports,
370 clippy::let_unit_value,
371 )]
372 use tonic::codegen::*;
373 use tonic::codegen::http::Uri;
374 #[derive(Debug, Clone)]
376 pub struct DatasetRetentionServiceClient<T> {
377 inner: tonic::client::Grpc<T>,
378 }
379 impl DatasetRetentionServiceClient<tonic::transport::Channel> {
380 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
382 where
383 D: TryInto<tonic::transport::Endpoint>,
384 D::Error: Into<StdError>,
385 {
386 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
387 Ok(Self::new(conn))
388 }
389 }
390 impl<T> DatasetRetentionServiceClient<T>
391 where
392 T: tonic::client::GrpcService<tonic::body::Body>,
393 T::Error: Into<StdError>,
394 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
395 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
396 {
397 pub fn new(inner: T) -> Self {
398 let inner = tonic::client::Grpc::new(inner);
399 Self { inner }
400 }
401 pub fn with_origin(inner: T, origin: Uri) -> Self {
402 let inner = tonic::client::Grpc::with_origin(inner, origin);
403 Self { inner }
404 }
405 pub fn with_interceptor<F>(
406 inner: T,
407 interceptor: F,
408 ) -> DatasetRetentionServiceClient<InterceptedService<T, F>>
409 where
410 F: tonic::service::Interceptor,
411 T::ResponseBody: Default,
412 T: tonic::codegen::Service<
413 http::Request<tonic::body::Body>,
414 Response = http::Response<
415 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
416 >,
417 >,
418 <T as tonic::codegen::Service<
419 http::Request<tonic::body::Body>,
420 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
421 {
422 DatasetRetentionServiceClient::new(
423 InterceptedService::new(inner, interceptor),
424 )
425 }
426 #[must_use]
431 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
432 self.inner = self.inner.send_compressed(encoding);
433 self
434 }
435 #[must_use]
437 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
438 self.inner = self.inner.accept_compressed(encoding);
439 self
440 }
441 #[must_use]
445 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
446 self.inner = self.inner.max_decoding_message_size(limit);
447 self
448 }
449 #[must_use]
453 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
454 self.inner = self.inner.max_encoding_message_size(limit);
455 self
456 }
457 pub async fn update_retention_policy(
460 &mut self,
461 request: impl tonic::IntoRequest<super::UpdateRetentionPolicyRequest>,
462 ) -> std::result::Result<
463 tonic::Response<super::UpdateRetentionPolicyResponse>,
464 tonic::Status,
465 > {
466 self.inner
467 .ready()
468 .await
469 .map_err(|e| {
470 tonic::Status::unknown(
471 format!("Service was not ready: {}", e.into()),
472 )
473 })?;
474 let codec = tonic::codec::ProstCodec::default();
475 let path = http::uri::PathAndQuery::from_static(
476 "/nominal.storage.v1.DatasetRetentionService/UpdateRetentionPolicy",
477 );
478 let mut req = request.into_request();
479 req.extensions_mut()
480 .insert(
481 GrpcMethod::new(
482 "nominal.storage.v1.DatasetRetentionService",
483 "UpdateRetentionPolicy",
484 ),
485 );
486 self.inner.unary(req, path, codec).await
487 }
488 pub async fn upsert_dataset_retention_exemption(
491 &mut self,
492 request: impl tonic::IntoRequest<
493 super::UpsertDatasetRetentionExemptionRequest,
494 >,
495 ) -> std::result::Result<
496 tonic::Response<super::UpsertDatasetRetentionExemptionResponse>,
497 tonic::Status,
498 > {
499 self.inner
500 .ready()
501 .await
502 .map_err(|e| {
503 tonic::Status::unknown(
504 format!("Service was not ready: {}", e.into()),
505 )
506 })?;
507 let codec = tonic::codec::ProstCodec::default();
508 let path = http::uri::PathAndQuery::from_static(
509 "/nominal.storage.v1.DatasetRetentionService/UpsertDatasetRetentionExemption",
510 );
511 let mut req = request.into_request();
512 req.extensions_mut()
513 .insert(
514 GrpcMethod::new(
515 "nominal.storage.v1.DatasetRetentionService",
516 "UpsertDatasetRetentionExemption",
517 ),
518 );
519 self.inner.unary(req, path, codec).await
520 }
521 pub async fn delete_dataset_retention_exemption(
523 &mut self,
524 request: impl tonic::IntoRequest<
525 super::DeleteDatasetRetentionExemptionRequest,
526 >,
527 ) -> std::result::Result<
528 tonic::Response<super::DeleteDatasetRetentionExemptionResponse>,
529 tonic::Status,
530 > {
531 self.inner
532 .ready()
533 .await
534 .map_err(|e| {
535 tonic::Status::unknown(
536 format!("Service was not ready: {}", e.into()),
537 )
538 })?;
539 let codec = tonic::codec::ProstCodec::default();
540 let path = http::uri::PathAndQuery::from_static(
541 "/nominal.storage.v1.DatasetRetentionService/DeleteDatasetRetentionExemption",
542 );
543 let mut req = request.into_request();
544 req.extensions_mut()
545 .insert(
546 GrpcMethod::new(
547 "nominal.storage.v1.DatasetRetentionService",
548 "DeleteDatasetRetentionExemption",
549 ),
550 );
551 self.inner.unary(req, path, codec).await
552 }
553 pub async fn list_dataset_retention_exemptions(
555 &mut self,
556 request: impl tonic::IntoRequest<
557 super::ListDatasetRetentionExemptionsRequest,
558 >,
559 ) -> std::result::Result<
560 tonic::Response<super::ListDatasetRetentionExemptionsResponse>,
561 tonic::Status,
562 > {
563 self.inner
564 .ready()
565 .await
566 .map_err(|e| {
567 tonic::Status::unknown(
568 format!("Service was not ready: {}", e.into()),
569 )
570 })?;
571 let codec = tonic::codec::ProstCodec::default();
572 let path = http::uri::PathAndQuery::from_static(
573 "/nominal.storage.v1.DatasetRetentionService/ListDatasetRetentionExemptions",
574 );
575 let mut req = request.into_request();
576 req.extensions_mut()
577 .insert(
578 GrpcMethod::new(
579 "nominal.storage.v1.DatasetRetentionService",
580 "ListDatasetRetentionExemptions",
581 ),
582 );
583 self.inner.unary(req, path, codec).await
584 }
585 }
586}