svc_storage_client_grpc/
grpc.vertipad.rs

1/// Vertipad
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Vertipad {
5    /// id UUID v4
6    #[prost(string, tag="1")]
7    pub id: ::prost::alloc::string::String,
8    #[prost(message, optional, tag="2")]
9    pub data: ::core::option::Option<VertipadData>,
10}
11/// VertipadData
12#[derive(Clone, PartialEq, ::prost::Message)]
13pub struct VertipadData {
14    /// vertiport_id UUID v4, all vertipads are part of a vertiport, even if the vertiport has only 1 pad
15    #[prost(string, tag="1")]
16    pub vertiport_id: ::prost::alloc::string::String,
17    #[prost(string, tag="2")]
18    pub description: ::prost::alloc::string::String,
19    #[prost(double, tag="3")]
20    pub latitude: f64,
21    #[prost(double, tag="4")]
22    pub longitude: f64,
23    #[prost(bool, tag="5")]
24    pub enabled: bool,
25    #[prost(bool, tag="6")]
26    pub occupied: bool,
27    /// bool charging_enabled = 3;
28    /// float charging_rate_kw = 4;
29    /// string restrictions = 5;
30    #[prost(string, optional, tag="7")]
31    pub schedule: ::core::option::Option<::prost::alloc::string::String>,
32}
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct UpdateVertipad {
35    /// id UUID v4
36    #[prost(string, tag="1")]
37    pub id: ::prost::alloc::string::String,
38    #[prost(message, optional, tag="2")]
39    pub data: ::core::option::Option<VertipadData>,
40    #[prost(message, optional, tag="3")]
41    pub mask: ::core::option::Option<::prost_types::FieldMask>,
42}
43/// Vertipads
44#[allow(clippy::derive_partial_eq_without_eq)]
45#[derive(Clone, PartialEq, ::prost::Message)]
46pub struct Vertipads {
47    #[prost(message, repeated, tag="1")]
48    pub vertipads: ::prost::alloc::vec::Vec<Vertipad>,
49}
50/// Generated client implementations.
51pub mod vertipad_rpc_client {
52    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
53    use tonic::codegen::*;
54    use tonic::codegen::http::Uri;
55    ///VertipadRpc service
56    #[derive(Debug, Clone)]
57    pub struct VertipadRpcClient<T> {
58        inner: tonic::client::Grpc<T>,
59    }
60    impl VertipadRpcClient<tonic::transport::Channel> {
61        /// Attempt to create a new client by connecting to a given endpoint.
62        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
63        where
64            D: std::convert::TryInto<tonic::transport::Endpoint>,
65            D::Error: Into<StdError>,
66        {
67            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
68            Ok(Self::new(conn))
69        }
70    }
71    impl<T> VertipadRpcClient<T>
72    where
73        T: tonic::client::GrpcService<tonic::body::BoxBody>,
74        T::Error: Into<StdError>,
75        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
76        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
77    {
78        pub fn new(inner: T) -> Self {
79            let inner = tonic::client::Grpc::new(inner);
80            Self { inner }
81        }
82        pub fn with_origin(inner: T, origin: Uri) -> Self {
83            let inner = tonic::client::Grpc::with_origin(inner, origin);
84            Self { inner }
85        }
86        pub fn with_interceptor<F>(
87            inner: T,
88            interceptor: F,
89        ) -> VertipadRpcClient<InterceptedService<T, F>>
90        where
91            F: tonic::service::Interceptor,
92            T::ResponseBody: Default,
93            T: tonic::codegen::Service<
94                http::Request<tonic::body::BoxBody>,
95                Response = http::Response<
96                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
97                >,
98            >,
99            <T as tonic::codegen::Service<
100                http::Request<tonic::body::BoxBody>,
101            >>::Error: Into<StdError> + Send + Sync,
102        {
103            VertipadRpcClient::new(InterceptedService::new(inner, interceptor))
104        }
105        /// Compress requests with the given encoding.
106        ///
107        /// This requires the server to support it otherwise it might respond with an
108        /// error.
109        #[must_use]
110        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
111            self.inner = self.inner.send_compressed(encoding);
112            self
113        }
114        /// Enable decompressing responses.
115        #[must_use]
116        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
117            self.inner = self.inner.accept_compressed(encoding);
118            self
119        }
120        pub async fn vertipads(
121            &mut self,
122            request: impl tonic::IntoRequest<super::super::SearchFilter>,
123        ) -> Result<tonic::Response<super::Vertipads>, tonic::Status> {
124            self.inner
125                .ready()
126                .await
127                .map_err(|e| {
128                    tonic::Status::new(
129                        tonic::Code::Unknown,
130                        format!("Service was not ready: {}", e.into()),
131                    )
132                })?;
133            let codec = tonic::codec::ProstCodec::default();
134            let path = http::uri::PathAndQuery::from_static(
135                "/grpc.vertipad.VertipadRpc/vertipads",
136            );
137            self.inner.unary(request.into_request(), path, codec).await
138        }
139        pub async fn vertipad_by_id(
140            &mut self,
141            request: impl tonic::IntoRequest<super::super::Id>,
142        ) -> Result<tonic::Response<super::Vertipad>, tonic::Status> {
143            self.inner
144                .ready()
145                .await
146                .map_err(|e| {
147                    tonic::Status::new(
148                        tonic::Code::Unknown,
149                        format!("Service was not ready: {}", e.into()),
150                    )
151                })?;
152            let codec = tonic::codec::ProstCodec::default();
153            let path = http::uri::PathAndQuery::from_static(
154                "/grpc.vertipad.VertipadRpc/vertipad_by_id",
155            );
156            self.inner.unary(request.into_request(), path, codec).await
157        }
158        pub async fn insert_vertipad(
159            &mut self,
160            request: impl tonic::IntoRequest<super::VertipadData>,
161        ) -> Result<tonic::Response<super::Vertipad>, tonic::Status> {
162            self.inner
163                .ready()
164                .await
165                .map_err(|e| {
166                    tonic::Status::new(
167                        tonic::Code::Unknown,
168                        format!("Service was not ready: {}", e.into()),
169                    )
170                })?;
171            let codec = tonic::codec::ProstCodec::default();
172            let path = http::uri::PathAndQuery::from_static(
173                "/grpc.vertipad.VertipadRpc/insert_vertipad",
174            );
175            self.inner.unary(request.into_request(), path, codec).await
176        }
177        pub async fn update_vertipad(
178            &mut self,
179            request: impl tonic::IntoRequest<super::UpdateVertipad>,
180        ) -> Result<tonic::Response<super::Vertipad>, tonic::Status> {
181            self.inner
182                .ready()
183                .await
184                .map_err(|e| {
185                    tonic::Status::new(
186                        tonic::Code::Unknown,
187                        format!("Service was not ready: {}", e.into()),
188                    )
189                })?;
190            let codec = tonic::codec::ProstCodec::default();
191            let path = http::uri::PathAndQuery::from_static(
192                "/grpc.vertipad.VertipadRpc/update_vertipad",
193            );
194            self.inner.unary(request.into_request(), path, codec).await
195        }
196        pub async fn delete_vertipad(
197            &mut self,
198            request: impl tonic::IntoRequest<super::super::Id>,
199        ) -> Result<tonic::Response<()>, tonic::Status> {
200            self.inner
201                .ready()
202                .await
203                .map_err(|e| {
204                    tonic::Status::new(
205                        tonic::Code::Unknown,
206                        format!("Service was not ready: {}", e.into()),
207                    )
208                })?;
209            let codec = tonic::codec::ProstCodec::default();
210            let path = http::uri::PathAndQuery::from_static(
211                "/grpc.vertipad.VertipadRpc/delete_vertipad",
212            );
213            self.inner.unary(request.into_request(), path, codec).await
214        }
215    }
216}