ydb_grpc_bindings/generated/
ydb.export.v1.rs1pub mod export_service_client {
3 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
4 use tonic::codegen::*;
5 use tonic::codegen::http::Uri;
6 #[derive(Debug, Clone)]
7 pub struct ExportServiceClient<T> {
8 inner: tonic::client::Grpc<T>,
9 }
10 impl ExportServiceClient<tonic::transport::Channel> {
11 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
13 where
14 D: TryInto<tonic::transport::Endpoint>,
15 D::Error: Into<StdError>,
16 {
17 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
18 Ok(Self::new(conn))
19 }
20 }
21 impl<T> ExportServiceClient<T>
22 where
23 T: tonic::client::GrpcService<tonic::body::BoxBody>,
24 T::Error: Into<StdError>,
25 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
26 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
27 {
28 pub fn new(inner: T) -> Self {
29 let inner = tonic::client::Grpc::new(inner);
30 Self { inner }
31 }
32 pub fn with_origin(inner: T, origin: Uri) -> Self {
33 let inner = tonic::client::Grpc::with_origin(inner, origin);
34 Self { inner }
35 }
36 pub fn with_interceptor<F>(
37 inner: T,
38 interceptor: F,
39 ) -> ExportServiceClient<InterceptedService<T, F>>
40 where
41 F: tonic::service::Interceptor,
42 T::ResponseBody: Default,
43 T: tonic::codegen::Service<
44 http::Request<tonic::body::BoxBody>,
45 Response = http::Response<
46 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
47 >,
48 >,
49 <T as tonic::codegen::Service<
50 http::Request<tonic::body::BoxBody>,
51 >>::Error: Into<StdError> + Send + Sync,
52 {
53 ExportServiceClient::new(InterceptedService::new(inner, interceptor))
54 }
55 #[must_use]
60 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
61 self.inner = self.inner.send_compressed(encoding);
62 self
63 }
64 #[must_use]
66 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
67 self.inner = self.inner.accept_compressed(encoding);
68 self
69 }
70 #[must_use]
74 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
75 self.inner = self.inner.max_decoding_message_size(limit);
76 self
77 }
78 #[must_use]
82 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
83 self.inner = self.inner.max_encoding_message_size(limit);
84 self
85 }
86 pub async fn export_to_yt(
89 &mut self,
90 request: impl tonic::IntoRequest<super::super::ExportToYtRequest>,
91 ) -> std::result::Result<
92 tonic::Response<super::super::ExportToYtResponse>,
93 tonic::Status,
94 > {
95 self.inner
96 .ready()
97 .await
98 .map_err(|e| {
99 tonic::Status::new(
100 tonic::Code::Unknown,
101 format!("Service was not ready: {}", e.into()),
102 )
103 })?;
104 let codec = tonic::codec::ProstCodec::default();
105 let path = http::uri::PathAndQuery::from_static(
106 "/Ydb.Export.V1.ExportService/ExportToYt",
107 );
108 let mut req = request.into_request();
109 req.extensions_mut()
110 .insert(GrpcMethod::new("Ydb.Export.V1.ExportService", "ExportToYt"));
111 self.inner.unary(req, path, codec).await
112 }
113 pub async fn export_to_s3(
116 &mut self,
117 request: impl tonic::IntoRequest<super::super::ExportToS3Request>,
118 ) -> std::result::Result<
119 tonic::Response<super::super::ExportToS3Response>,
120 tonic::Status,
121 > {
122 self.inner
123 .ready()
124 .await
125 .map_err(|e| {
126 tonic::Status::new(
127 tonic::Code::Unknown,
128 format!("Service was not ready: {}", e.into()),
129 )
130 })?;
131 let codec = tonic::codec::ProstCodec::default();
132 let path = http::uri::PathAndQuery::from_static(
133 "/Ydb.Export.V1.ExportService/ExportToS3",
134 );
135 let mut req = request.into_request();
136 req.extensions_mut()
137 .insert(GrpcMethod::new("Ydb.Export.V1.ExportService", "ExportToS3"));
138 self.inner.unary(req, path, codec).await
139 }
140 }
141}