nominal_api/proto/
nominal.application.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct GetApplicationUrlRequest {}
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct GetApplicationUrlResponse {
6    #[prost(string, tag = "1")]
7    pub url: ::prost::alloc::string::String,
8}
9/// Generated client implementations.
10pub mod application_service_client {
11    #![allow(
12        unused_variables,
13        dead_code,
14        missing_docs,
15        clippy::wildcard_imports,
16        clippy::let_unit_value,
17    )]
18    use tonic::codegen::*;
19    use tonic::codegen::http::Uri;
20    /// A service that returns metadata about the Core application.
21    #[derive(Debug, Clone)]
22    pub struct ApplicationServiceClient<T> {
23        inner: tonic::client::Grpc<T>,
24    }
25    impl ApplicationServiceClient<tonic::transport::Channel> {
26        /// Attempt to create a new client by connecting to a given endpoint.
27        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
28        where
29            D: TryInto<tonic::transport::Endpoint>,
30            D::Error: Into<StdError>,
31        {
32            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
33            Ok(Self::new(conn))
34        }
35    }
36    impl<T> ApplicationServiceClient<T>
37    where
38        T: tonic::client::GrpcService<tonic::body::Body>,
39        T::Error: Into<StdError>,
40        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
41        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
42    {
43        pub fn new(inner: T) -> Self {
44            let inner = tonic::client::Grpc::new(inner);
45            Self { inner }
46        }
47        pub fn with_origin(inner: T, origin: Uri) -> Self {
48            let inner = tonic::client::Grpc::with_origin(inner, origin);
49            Self { inner }
50        }
51        pub fn with_interceptor<F>(
52            inner: T,
53            interceptor: F,
54        ) -> ApplicationServiceClient<InterceptedService<T, F>>
55        where
56            F: tonic::service::Interceptor,
57            T::ResponseBody: Default,
58            T: tonic::codegen::Service<
59                http::Request<tonic::body::Body>,
60                Response = http::Response<
61                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
62                >,
63            >,
64            <T as tonic::codegen::Service<
65                http::Request<tonic::body::Body>,
66            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
67        {
68            ApplicationServiceClient::new(InterceptedService::new(inner, interceptor))
69        }
70        /// Compress requests with the given encoding.
71        ///
72        /// This requires the server to support it otherwise it might respond with an
73        /// error.
74        #[must_use]
75        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
76            self.inner = self.inner.send_compressed(encoding);
77            self
78        }
79        /// Enable decompressing responses.
80        #[must_use]
81        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
82            self.inner = self.inner.accept_compressed(encoding);
83            self
84        }
85        /// Limits the maximum size of a decoded message.
86        ///
87        /// Default: `4MB`
88        #[must_use]
89        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
90            self.inner = self.inner.max_decoding_message_size(limit);
91            self
92        }
93        /// Limits the maximum size of an encoded message.
94        ///
95        /// Default: `usize::MAX`
96        #[must_use]
97        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
98            self.inner = self.inner.max_encoding_message_size(limit);
99            self
100        }
101        /// Get the application url
102        pub async fn get_application_url(
103            &mut self,
104            request: impl tonic::IntoRequest<super::GetApplicationUrlRequest>,
105        ) -> std::result::Result<
106            tonic::Response<super::GetApplicationUrlResponse>,
107            tonic::Status,
108        > {
109            self.inner
110                .ready()
111                .await
112                .map_err(|e| {
113                    tonic::Status::unknown(
114                        format!("Service was not ready: {}", e.into()),
115                    )
116                })?;
117            let codec = tonic::codec::ProstCodec::default();
118            let path = http::uri::PathAndQuery::from_static(
119                "/nominal.application.v1.ApplicationService/GetApplicationUrl",
120            );
121            let mut req = request.into_request();
122            req.extensions_mut()
123                .insert(
124                    GrpcMethod::new(
125                        "nominal.application.v1.ApplicationService",
126                        "GetApplicationUrl",
127                    ),
128                );
129            self.inner.unary(req, path, codec).await
130        }
131    }
132}