gimpey_db_gateway/generated/
solana_spl_creator.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct SolanaSplCreator {
4    #[prost(string, tag = "1")]
5    pub address: ::prost::alloc::string::String,
6    #[prost(int32, tag = "2")]
7    pub n_tokens_created: i32,
8    #[prost(bool, tag = "3")]
9    pub is_verified: bool,
10    #[prost(bool, tag = "4")]
11    pub is_potential_rugger: bool,
12    #[prost(bool, tag = "5")]
13    pub has_rugged: bool,
14    #[prost(string, tag = "6")]
15    pub previous_rugger: ::prost::alloc::string::String,
16}
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct CreateSolanaSplCreatorRequest {
19    #[prost(string, tag = "1")]
20    pub address: ::prost::alloc::string::String,
21    #[prost(int32, tag = "2")]
22    pub n_tokens_created: i32,
23    #[prost(bool, tag = "3")]
24    pub is_verified: bool,
25    #[prost(bool, tag = "4")]
26    pub is_potential_rugger: bool,
27    #[prost(bool, tag = "5")]
28    pub has_rugged: bool,
29    #[prost(string, tag = "6")]
30    pub previous_rugger: ::prost::alloc::string::String,
31}
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct CreateSolanaSplCreatorResponse {
34    #[prost(message, optional, tag = "1")]
35    pub solana_spl_creator: ::core::option::Option<SolanaSplCreator>,
36}
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct GetSolanaSplCreatorRequest {
39    #[prost(string, tag = "1")]
40    pub address: ::prost::alloc::string::String,
41}
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct GetSolanaSplCreatorResponse {
44    #[prost(message, optional, tag = "1")]
45    pub solana_spl_creator: ::core::option::Option<SolanaSplCreator>,
46}
47#[derive(Clone, PartialEq, ::prost::Message)]
48pub struct IncrementCreatedTokensRequest {
49    #[prost(string, tag = "1")]
50    pub address: ::prost::alloc::string::String,
51}
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct IncrementCreatedTokensResponse {
54    #[prost(message, optional, tag = "1")]
55    pub solana_spl_creator: ::core::option::Option<SolanaSplCreator>,
56}
57/// Generated client implementations.
58pub mod solana_spl_creator_service_client {
59    #![allow(
60        unused_variables,
61        dead_code,
62        missing_docs,
63        clippy::wildcard_imports,
64        clippy::let_unit_value,
65    )]
66    use tonic::codegen::*;
67    use tonic::codegen::http::Uri;
68    #[derive(Debug, Clone)]
69    pub struct SolanaSplCreatorServiceClient<T> {
70        inner: tonic::client::Grpc<T>,
71    }
72    impl SolanaSplCreatorServiceClient<tonic::transport::Channel> {
73        /// Attempt to create a new client by connecting to a given endpoint.
74        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
75        where
76            D: TryInto<tonic::transport::Endpoint>,
77            D::Error: Into<StdError>,
78        {
79            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
80            Ok(Self::new(conn))
81        }
82    }
83    impl<T> SolanaSplCreatorServiceClient<T>
84    where
85        T: tonic::client::GrpcService<tonic::body::Body>,
86        T::Error: Into<StdError>,
87        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
88        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
89    {
90        pub fn new(inner: T) -> Self {
91            let inner = tonic::client::Grpc::new(inner);
92            Self { inner }
93        }
94        pub fn with_origin(inner: T, origin: Uri) -> Self {
95            let inner = tonic::client::Grpc::with_origin(inner, origin);
96            Self { inner }
97        }
98        pub fn with_interceptor<F>(
99            inner: T,
100            interceptor: F,
101        ) -> SolanaSplCreatorServiceClient<InterceptedService<T, F>>
102        where
103            F: tonic::service::Interceptor,
104            T::ResponseBody: Default,
105            T: tonic::codegen::Service<
106                http::Request<tonic::body::Body>,
107                Response = http::Response<
108                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
109                >,
110            >,
111            <T as tonic::codegen::Service<
112                http::Request<tonic::body::Body>,
113            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
114        {
115            SolanaSplCreatorServiceClient::new(
116                InterceptedService::new(inner, interceptor),
117            )
118        }
119        /// Compress requests with the given encoding.
120        ///
121        /// This requires the server to support it otherwise it might respond with an
122        /// error.
123        #[must_use]
124        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
125            self.inner = self.inner.send_compressed(encoding);
126            self
127        }
128        /// Enable decompressing responses.
129        #[must_use]
130        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
131            self.inner = self.inner.accept_compressed(encoding);
132            self
133        }
134        /// Limits the maximum size of a decoded message.
135        ///
136        /// Default: `4MB`
137        #[must_use]
138        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
139            self.inner = self.inner.max_decoding_message_size(limit);
140            self
141        }
142        /// Limits the maximum size of an encoded message.
143        ///
144        /// Default: `usize::MAX`
145        #[must_use]
146        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
147            self.inner = self.inner.max_encoding_message_size(limit);
148            self
149        }
150        pub async fn upsert_solana_spl_creator(
151            &mut self,
152            request: impl tonic::IntoRequest<super::CreateSolanaSplCreatorRequest>,
153        ) -> std::result::Result<
154            tonic::Response<super::CreateSolanaSplCreatorResponse>,
155            tonic::Status,
156        > {
157            self.inner
158                .ready()
159                .await
160                .map_err(|e| {
161                    tonic::Status::unknown(
162                        format!("Service was not ready: {}", e.into()),
163                    )
164                })?;
165            let codec = tonic::codec::ProstCodec::default();
166            let path = http::uri::PathAndQuery::from_static(
167                "/solana_spl_creator.SolanaSplCreatorService/UpsertSolanaSplCreator",
168            );
169            let mut req = request.into_request();
170            req.extensions_mut()
171                .insert(
172                    GrpcMethod::new(
173                        "solana_spl_creator.SolanaSplCreatorService",
174                        "UpsertSolanaSplCreator",
175                    ),
176                );
177            self.inner.unary(req, path, codec).await
178        }
179        pub async fn get_solana_spl_creator(
180            &mut self,
181            request: impl tonic::IntoRequest<super::GetSolanaSplCreatorRequest>,
182        ) -> std::result::Result<
183            tonic::Response<super::GetSolanaSplCreatorResponse>,
184            tonic::Status,
185        > {
186            self.inner
187                .ready()
188                .await
189                .map_err(|e| {
190                    tonic::Status::unknown(
191                        format!("Service was not ready: {}", e.into()),
192                    )
193                })?;
194            let codec = tonic::codec::ProstCodec::default();
195            let path = http::uri::PathAndQuery::from_static(
196                "/solana_spl_creator.SolanaSplCreatorService/GetSolanaSplCreator",
197            );
198            let mut req = request.into_request();
199            req.extensions_mut()
200                .insert(
201                    GrpcMethod::new(
202                        "solana_spl_creator.SolanaSplCreatorService",
203                        "GetSolanaSplCreator",
204                    ),
205                );
206            self.inner.unary(req, path, codec).await
207        }
208        pub async fn increment_number_of_tokens(
209            &mut self,
210            request: impl tonic::IntoRequest<super::IncrementCreatedTokensRequest>,
211        ) -> std::result::Result<
212            tonic::Response<super::IncrementCreatedTokensResponse>,
213            tonic::Status,
214        > {
215            self.inner
216                .ready()
217                .await
218                .map_err(|e| {
219                    tonic::Status::unknown(
220                        format!("Service was not ready: {}", e.into()),
221                    )
222                })?;
223            let codec = tonic::codec::ProstCodec::default();
224            let path = http::uri::PathAndQuery::from_static(
225                "/solana_spl_creator.SolanaSplCreatorService/IncrementNumberOfTokens",
226            );
227            let mut req = request.into_request();
228            req.extensions_mut()
229                .insert(
230                    GrpcMethod::new(
231                        "solana_spl_creator.SolanaSplCreatorService",
232                        "IncrementNumberOfTokens",
233                    ),
234                );
235            self.inner.unary(req, path, codec).await
236        }
237    }
238}