#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vertiport {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub data: ::core::option::Option<VertiportData>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VertiportData {
#[prost(string, tag="1")]
pub description: ::prost::alloc::string::String,
#[prost(double, tag="2")]
pub latitude: f64,
#[prost(double, tag="3")]
pub longitude: f64,
#[prost(string, optional, tag="4")]
pub schedule: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateVertiport {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub data: ::core::option::Option<VertiportData>,
#[prost(message, optional, tag="3")]
pub mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vertiports {
#[prost(message, repeated, tag="1")]
pub vertiports: ::prost::alloc::vec::Vec<Vertiport>,
}
pub mod vertiport_rpc_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct VertiportRpcClient<T> {
inner: tonic::client::Grpc<T>,
}
impl VertiportRpcClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> VertiportRpcClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> VertiportRpcClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
VertiportRpcClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
pub async fn vertiports(
&mut self,
request: impl tonic::IntoRequest<super::super::SearchFilter>,
) -> Result<tonic::Response<super::Vertiports>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/grpc.vertiport.VertiportRpc/vertiports",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn vertiport_by_id(
&mut self,
request: impl tonic::IntoRequest<super::super::Id>,
) -> Result<tonic::Response<super::Vertiport>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/grpc.vertiport.VertiportRpc/vertiport_by_id",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn insert_vertiport(
&mut self,
request: impl tonic::IntoRequest<super::VertiportData>,
) -> Result<tonic::Response<super::Vertiport>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/grpc.vertiport.VertiportRpc/insert_vertiport",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_vertiport(
&mut self,
request: impl tonic::IntoRequest<super::UpdateVertiport>,
) -> Result<tonic::Response<super::Vertiport>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/grpc.vertiport.VertiportRpc/update_vertiport",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_vertiport(
&mut self,
request: impl tonic::IntoRequest<super::super::Id>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/grpc.vertiport.VertiportRpc/delete_vertiport",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}