nominal_api/proto/
nominal.storage.v1.rs1#[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 {}
29pub mod data_deletion_service_client {
31 #![allow(
32 unused_variables,
33 dead_code,
34 missing_docs,
35 clippy::wildcard_imports,
36 clippy::let_unit_value,
37 )]
38 use tonic::codegen::*;
39 use tonic::codegen::http::Uri;
40 #[derive(Debug, Clone)]
42 pub struct DataDeletionServiceClient<T> {
43 inner: tonic::client::Grpc<T>,
44 }
45 impl DataDeletionServiceClient<tonic::transport::Channel> {
46 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
48 where
49 D: TryInto<tonic::transport::Endpoint>,
50 D::Error: Into<StdError>,
51 {
52 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
53 Ok(Self::new(conn))
54 }
55 }
56 impl<T> DataDeletionServiceClient<T>
57 where
58 T: tonic::client::GrpcService<tonic::body::Body>,
59 T::Error: Into<StdError>,
60 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
61 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
62 {
63 pub fn new(inner: T) -> Self {
64 let inner = tonic::client::Grpc::new(inner);
65 Self { inner }
66 }
67 pub fn with_origin(inner: T, origin: Uri) -> Self {
68 let inner = tonic::client::Grpc::with_origin(inner, origin);
69 Self { inner }
70 }
71 pub fn with_interceptor<F>(
72 inner: T,
73 interceptor: F,
74 ) -> DataDeletionServiceClient<InterceptedService<T, F>>
75 where
76 F: tonic::service::Interceptor,
77 T::ResponseBody: Default,
78 T: tonic::codegen::Service<
79 http::Request<tonic::body::Body>,
80 Response = http::Response<
81 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
82 >,
83 >,
84 <T as tonic::codegen::Service<
85 http::Request<tonic::body::Body>,
86 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
87 {
88 DataDeletionServiceClient::new(InterceptedService::new(inner, interceptor))
89 }
90 #[must_use]
95 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
96 self.inner = self.inner.send_compressed(encoding);
97 self
98 }
99 #[must_use]
101 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
102 self.inner = self.inner.accept_compressed(encoding);
103 self
104 }
105 #[must_use]
109 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
110 self.inner = self.inner.max_decoding_message_size(limit);
111 self
112 }
113 #[must_use]
117 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
118 self.inner = self.inner.max_encoding_message_size(limit);
119 self
120 }
121 pub async fn delete_data(
124 &mut self,
125 request: impl tonic::IntoRequest<super::DeleteDataRequest>,
126 ) -> std::result::Result<
127 tonic::Response<super::DeleteDataResponse>,
128 tonic::Status,
129 > {
130 self.inner
131 .ready()
132 .await
133 .map_err(|e| {
134 tonic::Status::unknown(
135 format!("Service was not ready: {}", e.into()),
136 )
137 })?;
138 let codec = tonic::codec::ProstCodec::default();
139 let path = http::uri::PathAndQuery::from_static(
140 "/nominal.storage.v1.DataDeletionService/DeleteData",
141 );
142 let mut req = request.into_request();
143 req.extensions_mut()
144 .insert(
145 GrpcMethod::new(
146 "nominal.storage.v1.DataDeletionService",
147 "DeleteData",
148 ),
149 );
150 self.inner.unary(req, path, codec).await
151 }
152 }
153}