nebula_fbthrift_graph_v3/
lib.rs

1// @generated by Thrift for src/interface/graph.thrift
2// This file is probably not the place you want to edit!
3
4#![recursion_limit = "100000000"]
5#![allow(bare_trait_objects)]
6#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals, unused_crate_dependencies, clippy::all)]
7
8pub use self::errors::*;
9pub use self::types::*;
10
11pub mod types;
12
13#[doc(hidden)]
14pub mod dependencies {
15    pub use common as common;
16}
17
18pub mod services {
19    pub mod graph_service {
20        #[derive(Clone, Debug)]
21        pub enum AuthenticateExn {
22            #[doc(hidden)]
23            Success(crate::types::AuthResponse),
24            ApplicationException(::fbthrift::ApplicationException),
25        }
26
27        impl ::std::convert::From<crate::errors::graph_service::AuthenticateError> for AuthenticateExn {
28            fn from(err: crate::errors::graph_service::AuthenticateError) -> Self {
29                match err {
30                    crate::errors::graph_service::AuthenticateError::ApplicationException(aexn) => AuthenticateExn::ApplicationException(aexn),
31                    crate::errors::graph_service::AuthenticateError::ThriftError(err) => AuthenticateExn::ApplicationException(::fbthrift::ApplicationException {
32                        message: err.to_string(),
33                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
34                    }),
35                }
36            }
37        }
38
39        impl ::std::convert::From<::fbthrift::ApplicationException> for AuthenticateExn {
40            fn from(exn: ::fbthrift::ApplicationException) -> Self {
41                Self::ApplicationException(exn)
42            }
43        }
44
45        impl ::fbthrift::ExceptionInfo for AuthenticateExn {
46            fn exn_name(&self) -> &'static str {
47                match self {
48                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
49                    Self::ApplicationException(aexn) => aexn.exn_name(),
50                }
51            }
52
53            fn exn_value(&self) -> String {
54                match self {
55                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
56                    Self::ApplicationException(aexn) => aexn.exn_value(),
57                }
58            }
59
60            fn exn_is_declared(&self) -> bool {
61                match self {
62                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
63                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
64                }
65            }
66        }
67
68        impl ::fbthrift::ResultInfo for AuthenticateExn {
69            fn result_type(&self) -> ::fbthrift::ResultType {
70                match self {
71                    Self::Success(_) => ::fbthrift::ResultType::Return,
72                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
73                }
74            }
75        }
76
77        impl ::fbthrift::GetTType for AuthenticateExn {
78            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
79        }
80
81        impl<P> ::fbthrift::Serialize<P> for AuthenticateExn
82        where
83            P: ::fbthrift::ProtocolWriter,
84        {
85            fn write(&self, p: &mut P) {
86                if let Self::ApplicationException(aexn) = self {
87                    return aexn.write(p);
88                }
89                p.write_struct_begin("Authenticate");
90                match self {
91                    Self::Success(inner) => {
92                        p.write_field_begin(
93                            "Success",
94                            ::fbthrift::TType::Struct,
95                            0i16,
96                        );
97                        inner.write(p);
98                        p.write_field_end();
99                    }
100                    Self::ApplicationException(_aexn) => unreachable!(),
101                }
102                p.write_field_stop();
103                p.write_struct_end();
104            }
105        }
106
107        impl<P> ::fbthrift::Deserialize<P> for AuthenticateExn
108        where
109            P: ::fbthrift::ProtocolReader,
110        {
111            fn read(p: &mut P) -> ::anyhow::Result<Self> {
112                static RETURNS: &[::fbthrift::Field] = &[
113                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
114                ];
115                let _ = p.read_struct_begin(|_| ())?;
116                let mut once = false;
117                let mut alt = ::std::option::Option::None;
118                loop {
119                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
120                    match ((fty, fid as ::std::primitive::i32), once) {
121                        ((::fbthrift::TType::Stop, _), _) => {
122                            p.read_field_end()?;
123                            break;
124                        }
125                        ((::fbthrift::TType::Struct, 0i32), false) => {
126                            once = true;
127                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
128                        }
129                        ((ty, _id), false) => p.skip(ty)?,
130                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
131                            ::fbthrift::ApplicationException::new(
132                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
133                                format!(
134                                    "unwanted extra union {} field ty {:?} id {}",
135                                    "AuthenticateExn",
136                                    badty,
137                                    badid,
138                                ),
139                            )
140                        )),
141                    }
142                    p.read_field_end()?;
143                }
144                p.read_struct_end()?;
145                alt.ok_or_else(||
146                    ::fbthrift::ApplicationException::new(
147                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
148                        format!("Empty union {}", "AuthenticateExn"),
149                    )
150                    .into(),
151                )
152            }
153        }
154
155        #[derive(Clone, Debug)]
156        pub enum SignoutExn {
157            #[doc(hidden)]
158            Success(()),
159            ApplicationException(::fbthrift::ApplicationException),
160        }
161
162        impl ::std::convert::From<crate::errors::graph_service::SignoutError> for SignoutExn {
163            fn from(err: crate::errors::graph_service::SignoutError) -> Self {
164                match err {
165                    crate::errors::graph_service::SignoutError::ApplicationException(aexn) => SignoutExn::ApplicationException(aexn),
166                    crate::errors::graph_service::SignoutError::ThriftError(err) => SignoutExn::ApplicationException(::fbthrift::ApplicationException {
167                        message: err.to_string(),
168                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
169                    }),
170                }
171            }
172        }
173
174        impl ::std::convert::From<::fbthrift::ApplicationException> for SignoutExn {
175            fn from(exn: ::fbthrift::ApplicationException) -> Self {
176                Self::ApplicationException(exn)
177            }
178        }
179
180        impl ::fbthrift::ExceptionInfo for SignoutExn {
181            fn exn_name(&self) -> &'static str {
182                match self {
183                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
184                    Self::ApplicationException(aexn) => aexn.exn_name(),
185                }
186            }
187
188            fn exn_value(&self) -> String {
189                match self {
190                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
191                    Self::ApplicationException(aexn) => aexn.exn_value(),
192                }
193            }
194
195            fn exn_is_declared(&self) -> bool {
196                match self {
197                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
198                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
199                }
200            }
201        }
202
203        impl ::fbthrift::ResultInfo for SignoutExn {
204            fn result_type(&self) -> ::fbthrift::ResultType {
205                match self {
206                    Self::Success(_) => ::fbthrift::ResultType::Return,
207                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
208                }
209            }
210        }
211
212        impl ::fbthrift::GetTType for SignoutExn {
213            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
214        }
215
216        impl<P> ::fbthrift::Serialize<P> for SignoutExn
217        where
218            P: ::fbthrift::ProtocolWriter,
219        {
220            fn write(&self, p: &mut P) {
221                if let Self::ApplicationException(aexn) = self {
222                    return aexn.write(p);
223                }
224                p.write_struct_begin("Signout");
225                match self {
226                    Self::Success(inner) => {
227                        p.write_field_begin(
228                            "Success",
229                            ::fbthrift::TType::Void,
230                            0i16,
231                        );
232                        inner.write(p);
233                        p.write_field_end();
234                    }
235                    Self::ApplicationException(_aexn) => unreachable!(),
236                }
237                p.write_field_stop();
238                p.write_struct_end();
239            }
240        }
241
242        impl<P> ::fbthrift::Deserialize<P> for SignoutExn
243        where
244            P: ::fbthrift::ProtocolReader,
245        {
246            fn read(p: &mut P) -> ::anyhow::Result<Self> {
247                static RETURNS: &[::fbthrift::Field] = &[
248                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Void, 0),
249                ];
250                let _ = p.read_struct_begin(|_| ())?;
251                let mut once = false;
252                let mut alt = Self::Success(());
253                loop {
254                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
255                    match ((fty, fid as ::std::primitive::i32), once) {
256                        ((::fbthrift::TType::Stop, _), _) => {
257                            p.read_field_end()?;
258                            break;
259                        }
260                        ((::fbthrift::TType::Void, 0i32), false) => {
261                            once = true;
262                            alt = Self::Success(::fbthrift::Deserialize::read(p)?);
263                        }
264                        ((ty, _id), false) => p.skip(ty)?,
265                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
266                            ::fbthrift::ApplicationException::new(
267                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
268                                format!(
269                                    "unwanted extra union {} field ty {:?} id {}",
270                                    "SignoutExn",
271                                    badty,
272                                    badid,
273                                ),
274                            )
275                        )),
276                    }
277                    p.read_field_end()?;
278                }
279                p.read_struct_end()?;
280                ::std::result::Result::Ok(alt)
281            }
282        }
283
284        #[derive(Clone, Debug)]
285        pub enum ExecuteExn {
286            #[doc(hidden)]
287            Success(crate::types::ExecutionResponse),
288            ApplicationException(::fbthrift::ApplicationException),
289        }
290
291        impl ::std::convert::From<crate::errors::graph_service::ExecuteError> for ExecuteExn {
292            fn from(err: crate::errors::graph_service::ExecuteError) -> Self {
293                match err {
294                    crate::errors::graph_service::ExecuteError::ApplicationException(aexn) => ExecuteExn::ApplicationException(aexn),
295                    crate::errors::graph_service::ExecuteError::ThriftError(err) => ExecuteExn::ApplicationException(::fbthrift::ApplicationException {
296                        message: err.to_string(),
297                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
298                    }),
299                }
300            }
301        }
302
303        impl ::std::convert::From<::fbthrift::ApplicationException> for ExecuteExn {
304            fn from(exn: ::fbthrift::ApplicationException) -> Self {
305                Self::ApplicationException(exn)
306            }
307        }
308
309        impl ::fbthrift::ExceptionInfo for ExecuteExn {
310            fn exn_name(&self) -> &'static str {
311                match self {
312                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
313                    Self::ApplicationException(aexn) => aexn.exn_name(),
314                }
315            }
316
317            fn exn_value(&self) -> String {
318                match self {
319                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
320                    Self::ApplicationException(aexn) => aexn.exn_value(),
321                }
322            }
323
324            fn exn_is_declared(&self) -> bool {
325                match self {
326                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
327                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
328                }
329            }
330        }
331
332        impl ::fbthrift::ResultInfo for ExecuteExn {
333            fn result_type(&self) -> ::fbthrift::ResultType {
334                match self {
335                    Self::Success(_) => ::fbthrift::ResultType::Return,
336                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
337                }
338            }
339        }
340
341        impl ::fbthrift::GetTType for ExecuteExn {
342            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
343        }
344
345        impl<P> ::fbthrift::Serialize<P> for ExecuteExn
346        where
347            P: ::fbthrift::ProtocolWriter,
348        {
349            fn write(&self, p: &mut P) {
350                if let Self::ApplicationException(aexn) = self {
351                    return aexn.write(p);
352                }
353                p.write_struct_begin("Execute");
354                match self {
355                    Self::Success(inner) => {
356                        p.write_field_begin(
357                            "Success",
358                            ::fbthrift::TType::Struct,
359                            0i16,
360                        );
361                        inner.write(p);
362                        p.write_field_end();
363                    }
364                    Self::ApplicationException(_aexn) => unreachable!(),
365                }
366                p.write_field_stop();
367                p.write_struct_end();
368            }
369        }
370
371        impl<P> ::fbthrift::Deserialize<P> for ExecuteExn
372        where
373            P: ::fbthrift::ProtocolReader,
374        {
375            fn read(p: &mut P) -> ::anyhow::Result<Self> {
376                static RETURNS: &[::fbthrift::Field] = &[
377                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
378                ];
379                let _ = p.read_struct_begin(|_| ())?;
380                let mut once = false;
381                let mut alt = ::std::option::Option::None;
382                loop {
383                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
384                    match ((fty, fid as ::std::primitive::i32), once) {
385                        ((::fbthrift::TType::Stop, _), _) => {
386                            p.read_field_end()?;
387                            break;
388                        }
389                        ((::fbthrift::TType::Struct, 0i32), false) => {
390                            once = true;
391                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
392                        }
393                        ((ty, _id), false) => p.skip(ty)?,
394                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
395                            ::fbthrift::ApplicationException::new(
396                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
397                                format!(
398                                    "unwanted extra union {} field ty {:?} id {}",
399                                    "ExecuteExn",
400                                    badty,
401                                    badid,
402                                ),
403                            )
404                        )),
405                    }
406                    p.read_field_end()?;
407                }
408                p.read_struct_end()?;
409                alt.ok_or_else(||
410                    ::fbthrift::ApplicationException::new(
411                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
412                        format!("Empty union {}", "ExecuteExn"),
413                    )
414                    .into(),
415                )
416            }
417        }
418
419        #[derive(Clone, Debug)]
420        pub enum ExecuteWithParameterExn {
421            #[doc(hidden)]
422            Success(crate::types::ExecutionResponse),
423            ApplicationException(::fbthrift::ApplicationException),
424        }
425
426        impl ::std::convert::From<crate::errors::graph_service::ExecuteWithParameterError> for ExecuteWithParameterExn {
427            fn from(err: crate::errors::graph_service::ExecuteWithParameterError) -> Self {
428                match err {
429                    crate::errors::graph_service::ExecuteWithParameterError::ApplicationException(aexn) => ExecuteWithParameterExn::ApplicationException(aexn),
430                    crate::errors::graph_service::ExecuteWithParameterError::ThriftError(err) => ExecuteWithParameterExn::ApplicationException(::fbthrift::ApplicationException {
431                        message: err.to_string(),
432                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
433                    }),
434                }
435            }
436        }
437
438        impl ::std::convert::From<::fbthrift::ApplicationException> for ExecuteWithParameterExn {
439            fn from(exn: ::fbthrift::ApplicationException) -> Self {
440                Self::ApplicationException(exn)
441            }
442        }
443
444        impl ::fbthrift::ExceptionInfo for ExecuteWithParameterExn {
445            fn exn_name(&self) -> &'static str {
446                match self {
447                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
448                    Self::ApplicationException(aexn) => aexn.exn_name(),
449                }
450            }
451
452            fn exn_value(&self) -> String {
453                match self {
454                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
455                    Self::ApplicationException(aexn) => aexn.exn_value(),
456                }
457            }
458
459            fn exn_is_declared(&self) -> bool {
460                match self {
461                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
462                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
463                }
464            }
465        }
466
467        impl ::fbthrift::ResultInfo for ExecuteWithParameterExn {
468            fn result_type(&self) -> ::fbthrift::ResultType {
469                match self {
470                    Self::Success(_) => ::fbthrift::ResultType::Return,
471                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
472                }
473            }
474        }
475
476        impl ::fbthrift::GetTType for ExecuteWithParameterExn {
477            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
478        }
479
480        impl<P> ::fbthrift::Serialize<P> for ExecuteWithParameterExn
481        where
482            P: ::fbthrift::ProtocolWriter,
483        {
484            fn write(&self, p: &mut P) {
485                if let Self::ApplicationException(aexn) = self {
486                    return aexn.write(p);
487                }
488                p.write_struct_begin("ExecuteWithParameter");
489                match self {
490                    Self::Success(inner) => {
491                        p.write_field_begin(
492                            "Success",
493                            ::fbthrift::TType::Struct,
494                            0i16,
495                        );
496                        inner.write(p);
497                        p.write_field_end();
498                    }
499                    Self::ApplicationException(_aexn) => unreachable!(),
500                }
501                p.write_field_stop();
502                p.write_struct_end();
503            }
504        }
505
506        impl<P> ::fbthrift::Deserialize<P> for ExecuteWithParameterExn
507        where
508            P: ::fbthrift::ProtocolReader,
509        {
510            fn read(p: &mut P) -> ::anyhow::Result<Self> {
511                static RETURNS: &[::fbthrift::Field] = &[
512                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
513                ];
514                let _ = p.read_struct_begin(|_| ())?;
515                let mut once = false;
516                let mut alt = ::std::option::Option::None;
517                loop {
518                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
519                    match ((fty, fid as ::std::primitive::i32), once) {
520                        ((::fbthrift::TType::Stop, _), _) => {
521                            p.read_field_end()?;
522                            break;
523                        }
524                        ((::fbthrift::TType::Struct, 0i32), false) => {
525                            once = true;
526                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
527                        }
528                        ((ty, _id), false) => p.skip(ty)?,
529                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
530                            ::fbthrift::ApplicationException::new(
531                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
532                                format!(
533                                    "unwanted extra union {} field ty {:?} id {}",
534                                    "ExecuteWithParameterExn",
535                                    badty,
536                                    badid,
537                                ),
538                            )
539                        )),
540                    }
541                    p.read_field_end()?;
542                }
543                p.read_struct_end()?;
544                alt.ok_or_else(||
545                    ::fbthrift::ApplicationException::new(
546                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
547                        format!("Empty union {}", "ExecuteWithParameterExn"),
548                    )
549                    .into(),
550                )
551            }
552        }
553
554        #[derive(Clone, Debug)]
555        pub enum ExecuteJsonExn {
556            #[doc(hidden)]
557            Success(::std::vec::Vec<::std::primitive::u8>),
558            ApplicationException(::fbthrift::ApplicationException),
559        }
560
561        impl ::std::convert::From<crate::errors::graph_service::ExecuteJsonError> for ExecuteJsonExn {
562            fn from(err: crate::errors::graph_service::ExecuteJsonError) -> Self {
563                match err {
564                    crate::errors::graph_service::ExecuteJsonError::ApplicationException(aexn) => ExecuteJsonExn::ApplicationException(aexn),
565                    crate::errors::graph_service::ExecuteJsonError::ThriftError(err) => ExecuteJsonExn::ApplicationException(::fbthrift::ApplicationException {
566                        message: err.to_string(),
567                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
568                    }),
569                }
570            }
571        }
572
573        impl ::std::convert::From<::fbthrift::ApplicationException> for ExecuteJsonExn {
574            fn from(exn: ::fbthrift::ApplicationException) -> Self {
575                Self::ApplicationException(exn)
576            }
577        }
578
579        impl ::fbthrift::ExceptionInfo for ExecuteJsonExn {
580            fn exn_name(&self) -> &'static str {
581                match self {
582                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
583                    Self::ApplicationException(aexn) => aexn.exn_name(),
584                }
585            }
586
587            fn exn_value(&self) -> String {
588                match self {
589                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
590                    Self::ApplicationException(aexn) => aexn.exn_value(),
591                }
592            }
593
594            fn exn_is_declared(&self) -> bool {
595                match self {
596                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
597                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
598                }
599            }
600        }
601
602        impl ::fbthrift::ResultInfo for ExecuteJsonExn {
603            fn result_type(&self) -> ::fbthrift::ResultType {
604                match self {
605                    Self::Success(_) => ::fbthrift::ResultType::Return,
606                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
607                }
608            }
609        }
610
611        impl ::fbthrift::GetTType for ExecuteJsonExn {
612            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
613        }
614
615        impl<P> ::fbthrift::Serialize<P> for ExecuteJsonExn
616        where
617            P: ::fbthrift::ProtocolWriter,
618        {
619            fn write(&self, p: &mut P) {
620                if let Self::ApplicationException(aexn) = self {
621                    return aexn.write(p);
622                }
623                p.write_struct_begin("ExecuteJson");
624                match self {
625                    Self::Success(inner) => {
626                        p.write_field_begin(
627                            "Success",
628                            ::fbthrift::TType::String,
629                            0i16,
630                        );
631                        inner.write(p);
632                        p.write_field_end();
633                    }
634                    Self::ApplicationException(_aexn) => unreachable!(),
635                }
636                p.write_field_stop();
637                p.write_struct_end();
638            }
639        }
640
641        impl<P> ::fbthrift::Deserialize<P> for ExecuteJsonExn
642        where
643            P: ::fbthrift::ProtocolReader,
644        {
645            fn read(p: &mut P) -> ::anyhow::Result<Self> {
646                static RETURNS: &[::fbthrift::Field] = &[
647                    ::fbthrift::Field::new("Success", ::fbthrift::TType::String, 0),
648                ];
649                let _ = p.read_struct_begin(|_| ())?;
650                let mut once = false;
651                let mut alt = ::std::option::Option::None;
652                loop {
653                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
654                    match ((fty, fid as ::std::primitive::i32), once) {
655                        ((::fbthrift::TType::Stop, _), _) => {
656                            p.read_field_end()?;
657                            break;
658                        }
659                        ((::fbthrift::TType::String, 0i32), false) => {
660                            once = true;
661                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
662                        }
663                        ((ty, _id), false) => p.skip(ty)?,
664                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
665                            ::fbthrift::ApplicationException::new(
666                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
667                                format!(
668                                    "unwanted extra union {} field ty {:?} id {}",
669                                    "ExecuteJsonExn",
670                                    badty,
671                                    badid,
672                                ),
673                            )
674                        )),
675                    }
676                    p.read_field_end()?;
677                }
678                p.read_struct_end()?;
679                alt.ok_or_else(||
680                    ::fbthrift::ApplicationException::new(
681                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
682                        format!("Empty union {}", "ExecuteJsonExn"),
683                    )
684                    .into(),
685                )
686            }
687        }
688
689        #[derive(Clone, Debug)]
690        pub enum ExecuteJsonWithParameterExn {
691            #[doc(hidden)]
692            Success(::std::vec::Vec<::std::primitive::u8>),
693            ApplicationException(::fbthrift::ApplicationException),
694        }
695
696        impl ::std::convert::From<crate::errors::graph_service::ExecuteJsonWithParameterError> for ExecuteJsonWithParameterExn {
697            fn from(err: crate::errors::graph_service::ExecuteJsonWithParameterError) -> Self {
698                match err {
699                    crate::errors::graph_service::ExecuteJsonWithParameterError::ApplicationException(aexn) => ExecuteJsonWithParameterExn::ApplicationException(aexn),
700                    crate::errors::graph_service::ExecuteJsonWithParameterError::ThriftError(err) => ExecuteJsonWithParameterExn::ApplicationException(::fbthrift::ApplicationException {
701                        message: err.to_string(),
702                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
703                    }),
704                }
705            }
706        }
707
708        impl ::std::convert::From<::fbthrift::ApplicationException> for ExecuteJsonWithParameterExn {
709            fn from(exn: ::fbthrift::ApplicationException) -> Self {
710                Self::ApplicationException(exn)
711            }
712        }
713
714        impl ::fbthrift::ExceptionInfo for ExecuteJsonWithParameterExn {
715            fn exn_name(&self) -> &'static str {
716                match self {
717                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
718                    Self::ApplicationException(aexn) => aexn.exn_name(),
719                }
720            }
721
722            fn exn_value(&self) -> String {
723                match self {
724                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
725                    Self::ApplicationException(aexn) => aexn.exn_value(),
726                }
727            }
728
729            fn exn_is_declared(&self) -> bool {
730                match self {
731                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
732                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
733                }
734            }
735        }
736
737        impl ::fbthrift::ResultInfo for ExecuteJsonWithParameterExn {
738            fn result_type(&self) -> ::fbthrift::ResultType {
739                match self {
740                    Self::Success(_) => ::fbthrift::ResultType::Return,
741                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
742                }
743            }
744        }
745
746        impl ::fbthrift::GetTType for ExecuteJsonWithParameterExn {
747            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
748        }
749
750        impl<P> ::fbthrift::Serialize<P> for ExecuteJsonWithParameterExn
751        where
752            P: ::fbthrift::ProtocolWriter,
753        {
754            fn write(&self, p: &mut P) {
755                if let Self::ApplicationException(aexn) = self {
756                    return aexn.write(p);
757                }
758                p.write_struct_begin("ExecuteJsonWithParameter");
759                match self {
760                    Self::Success(inner) => {
761                        p.write_field_begin(
762                            "Success",
763                            ::fbthrift::TType::String,
764                            0i16,
765                        );
766                        inner.write(p);
767                        p.write_field_end();
768                    }
769                    Self::ApplicationException(_aexn) => unreachable!(),
770                }
771                p.write_field_stop();
772                p.write_struct_end();
773            }
774        }
775
776        impl<P> ::fbthrift::Deserialize<P> for ExecuteJsonWithParameterExn
777        where
778            P: ::fbthrift::ProtocolReader,
779        {
780            fn read(p: &mut P) -> ::anyhow::Result<Self> {
781                static RETURNS: &[::fbthrift::Field] = &[
782                    ::fbthrift::Field::new("Success", ::fbthrift::TType::String, 0),
783                ];
784                let _ = p.read_struct_begin(|_| ())?;
785                let mut once = false;
786                let mut alt = ::std::option::Option::None;
787                loop {
788                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
789                    match ((fty, fid as ::std::primitive::i32), once) {
790                        ((::fbthrift::TType::Stop, _), _) => {
791                            p.read_field_end()?;
792                            break;
793                        }
794                        ((::fbthrift::TType::String, 0i32), false) => {
795                            once = true;
796                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
797                        }
798                        ((ty, _id), false) => p.skip(ty)?,
799                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
800                            ::fbthrift::ApplicationException::new(
801                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
802                                format!(
803                                    "unwanted extra union {} field ty {:?} id {}",
804                                    "ExecuteJsonWithParameterExn",
805                                    badty,
806                                    badid,
807                                ),
808                            )
809                        )),
810                    }
811                    p.read_field_end()?;
812                }
813                p.read_struct_end()?;
814                alt.ok_or_else(||
815                    ::fbthrift::ApplicationException::new(
816                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
817                        format!("Empty union {}", "ExecuteJsonWithParameterExn"),
818                    )
819                    .into(),
820                )
821            }
822        }
823
824        #[derive(Clone, Debug)]
825        pub enum VerifyClientVersionExn {
826            #[doc(hidden)]
827            Success(crate::types::VerifyClientVersionResp),
828            ApplicationException(::fbthrift::ApplicationException),
829        }
830
831        impl ::std::convert::From<crate::errors::graph_service::VerifyClientVersionError> for VerifyClientVersionExn {
832            fn from(err: crate::errors::graph_service::VerifyClientVersionError) -> Self {
833                match err {
834                    crate::errors::graph_service::VerifyClientVersionError::ApplicationException(aexn) => VerifyClientVersionExn::ApplicationException(aexn),
835                    crate::errors::graph_service::VerifyClientVersionError::ThriftError(err) => VerifyClientVersionExn::ApplicationException(::fbthrift::ApplicationException {
836                        message: err.to_string(),
837                        type_: ::fbthrift::ApplicationExceptionErrorCode::InternalError,
838                    }),
839                }
840            }
841        }
842
843        impl ::std::convert::From<::fbthrift::ApplicationException> for VerifyClientVersionExn {
844            fn from(exn: ::fbthrift::ApplicationException) -> Self {
845                Self::ApplicationException(exn)
846            }
847        }
848
849        impl ::fbthrift::ExceptionInfo for VerifyClientVersionExn {
850            fn exn_name(&self) -> &'static str {
851                match self {
852                    Self::Success(_) => panic!("ExceptionInfo::exn_name called on Success"),
853                    Self::ApplicationException(aexn) => aexn.exn_name(),
854                }
855            }
856
857            fn exn_value(&self) -> String {
858                match self {
859                    Self::Success(_) => panic!("ExceptionInfo::exn_value called on Success"),
860                    Self::ApplicationException(aexn) => aexn.exn_value(),
861                }
862            }
863
864            fn exn_is_declared(&self) -> bool {
865                match self {
866                    Self::Success(_) => panic!("ExceptionInfo::exn_is_declared called on Success"),
867                    Self::ApplicationException(aexn) => aexn.exn_is_declared(),
868                }
869            }
870        }
871
872        impl ::fbthrift::ResultInfo for VerifyClientVersionExn {
873            fn result_type(&self) -> ::fbthrift::ResultType {
874                match self {
875                    Self::Success(_) => ::fbthrift::ResultType::Return,
876                    Self::ApplicationException(_aexn) => ::fbthrift::ResultType::Exception,
877                }
878            }
879        }
880
881        impl ::fbthrift::GetTType for VerifyClientVersionExn {
882            const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct;
883        }
884
885        impl<P> ::fbthrift::Serialize<P> for VerifyClientVersionExn
886        where
887            P: ::fbthrift::ProtocolWriter,
888        {
889            fn write(&self, p: &mut P) {
890                if let Self::ApplicationException(aexn) = self {
891                    return aexn.write(p);
892                }
893                p.write_struct_begin("VerifyClientVersion");
894                match self {
895                    Self::Success(inner) => {
896                        p.write_field_begin(
897                            "Success",
898                            ::fbthrift::TType::Struct,
899                            0i16,
900                        );
901                        inner.write(p);
902                        p.write_field_end();
903                    }
904                    Self::ApplicationException(_aexn) => unreachable!(),
905                }
906                p.write_field_stop();
907                p.write_struct_end();
908            }
909        }
910
911        impl<P> ::fbthrift::Deserialize<P> for VerifyClientVersionExn
912        where
913            P: ::fbthrift::ProtocolReader,
914        {
915            fn read(p: &mut P) -> ::anyhow::Result<Self> {
916                static RETURNS: &[::fbthrift::Field] = &[
917                    ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0),
918                ];
919                let _ = p.read_struct_begin(|_| ())?;
920                let mut once = false;
921                let mut alt = ::std::option::Option::None;
922                loop {
923                    let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?;
924                    match ((fty, fid as ::std::primitive::i32), once) {
925                        ((::fbthrift::TType::Stop, _), _) => {
926                            p.read_field_end()?;
927                            break;
928                        }
929                        ((::fbthrift::TType::Struct, 0i32), false) => {
930                            once = true;
931                            alt = ::std::option::Option::Some(Self::Success(::fbthrift::Deserialize::read(p)?));
932                        }
933                        ((ty, _id), false) => p.skip(ty)?,
934                        ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from(
935                            ::fbthrift::ApplicationException::new(
936                                ::fbthrift::ApplicationExceptionErrorCode::ProtocolError,
937                                format!(
938                                    "unwanted extra union {} field ty {:?} id {}",
939                                    "VerifyClientVersionExn",
940                                    badty,
941                                    badid,
942                                ),
943                            )
944                        )),
945                    }
946                    p.read_field_end()?;
947                }
948                p.read_struct_end()?;
949                alt.ok_or_else(||
950                    ::fbthrift::ApplicationException::new(
951                        ::fbthrift::ApplicationExceptionErrorCode::MissingResult,
952                        format!("Empty union {}", "VerifyClientVersionExn"),
953                    )
954                    .into(),
955                )
956            }
957        }
958    }
959}
960
961/// Client implementation for each service in `graph`.
962pub mod client {
963
964    pub struct GraphServiceImpl<P, T, S = ::fbthrift::NoopSpawner> {
965        transport: T,
966        _phantom: ::std::marker::PhantomData<fn() -> (P, S)>,
967    }
968
969    impl<P, T, S> GraphServiceImpl<P, T, S>
970    where
971        P: ::fbthrift::Protocol,
972        T: ::fbthrift::Transport,
973        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
974        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
975        P::Deserializer: ::std::marker::Send,
976        S: ::fbthrift::help::Spawner,
977    {
978        pub fn new(
979            transport: T,
980        ) -> Self {
981            Self {
982                transport,
983                _phantom: ::std::marker::PhantomData,
984            }
985        }
986
987        pub fn transport(&self) -> &T {
988            &self.transport
989        }
990
991
992        fn _authenticate_impl(
993            &self,
994            arg_username: &::std::vec::Vec<::std::primitive::u8>,
995            arg_password: &::std::vec::Vec<::std::primitive::u8>,
996            rpc_options: T::RpcOptions,
997        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AuthResponse, crate::errors::graph_service::AuthenticateError>> {
998            use ::const_cstr::const_cstr;
999            use ::tracing::Instrument as _;
1000            use ::futures::FutureExt as _;
1001
1002            const_cstr! {
1003                SERVICE_NAME = "GraphService";
1004                METHOD_NAME = "GraphService.authenticate";
1005            }
1006            let args = self::Args_GraphService_authenticate {
1007                username: arg_username,
1008                password: arg_password,
1009                _phantom: ::std::marker::PhantomData,
1010            };
1011
1012            let transport = self.transport();
1013
1014            // need to do call setup outside of async block because T: Transport isn't Send
1015            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("authenticate", &args) {
1016                ::std::result::Result::Ok(res) => res,
1017                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
1018            };
1019
1020            let call = transport
1021                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
1022                .instrument(::tracing::trace_span!("call", function = "GraphService.authenticate"));
1023
1024            async move {
1025                let reply_env = call.await?;
1026
1027                let de = P::deserializer(reply_env);
1028                let (res, _de): (::std::result::Result<crate::services::graph_service::AuthenticateExn, _>, _) =
1029                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
1030
1031                let res = match res {
1032                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
1033                    ::std::result::Result::Err(aexn) =>
1034                        ::std::result::Result::Err(crate::errors::graph_service::AuthenticateError::ApplicationException(aexn))
1035                };
1036                res
1037            }
1038            .instrument(::tracing::info_span!("GraphService.authenticate"))
1039            .boxed()
1040        }
1041
1042        fn _signout_impl(
1043            &self,
1044            arg_sessionId: ::std::primitive::i64,
1045            rpc_options: T::RpcOptions,
1046        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::graph_service::SignoutError>> {
1047            use ::const_cstr::const_cstr;
1048            use ::tracing::Instrument as _;
1049            use ::futures::FutureExt as _;
1050
1051            const_cstr! {
1052                SERVICE_NAME = "GraphService";
1053                METHOD_NAME = "GraphService.signout";
1054            }
1055            let args = self::Args_GraphService_signout {
1056                sessionId: arg_sessionId,
1057                _phantom: ::std::marker::PhantomData,
1058            };
1059
1060            let transport = self.transport();
1061
1062            // need to do call setup outside of async block because T: Transport isn't Send
1063            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("signout", &args) {
1064                ::std::result::Result::Ok(res) => res,
1065                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
1066            };
1067
1068            let call = transport
1069                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
1070                .instrument(::tracing::trace_span!("call", function = "GraphService.signout"));
1071
1072            async move {
1073                let reply_env = call.await?;
1074
1075                let de = P::deserializer(reply_env);
1076                let (res, _de): (::std::result::Result<crate::services::graph_service::SignoutExn, _>, _) =
1077                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
1078
1079                let res = match res {
1080                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
1081                    ::std::result::Result::Err(aexn) =>
1082                        ::std::result::Result::Err(crate::errors::graph_service::SignoutError::ApplicationException(aexn))
1083                };
1084                res
1085            }
1086            .instrument(::tracing::info_span!("GraphService.signout"))
1087            .boxed()
1088        }
1089
1090        fn _execute_impl(
1091            &self,
1092            arg_sessionId: ::std::primitive::i64,
1093            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1094            rpc_options: T::RpcOptions,
1095        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteError>> {
1096            use ::const_cstr::const_cstr;
1097            use ::tracing::Instrument as _;
1098            use ::futures::FutureExt as _;
1099
1100            const_cstr! {
1101                SERVICE_NAME = "GraphService";
1102                METHOD_NAME = "GraphService.execute";
1103            }
1104            let args = self::Args_GraphService_execute {
1105                sessionId: arg_sessionId,
1106                stmt: arg_stmt,
1107                _phantom: ::std::marker::PhantomData,
1108            };
1109
1110            let transport = self.transport();
1111
1112            // need to do call setup outside of async block because T: Transport isn't Send
1113            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("execute", &args) {
1114                ::std::result::Result::Ok(res) => res,
1115                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
1116            };
1117
1118            let call = transport
1119                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
1120                .instrument(::tracing::trace_span!("call", function = "GraphService.execute"));
1121
1122            async move {
1123                let reply_env = call.await?;
1124
1125                let de = P::deserializer(reply_env);
1126                let (res, _de): (::std::result::Result<crate::services::graph_service::ExecuteExn, _>, _) =
1127                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
1128
1129                let res = match res {
1130                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
1131                    ::std::result::Result::Err(aexn) =>
1132                        ::std::result::Result::Err(crate::errors::graph_service::ExecuteError::ApplicationException(aexn))
1133                };
1134                res
1135            }
1136            .instrument(::tracing::info_span!("GraphService.execute"))
1137            .boxed()
1138        }
1139
1140        fn _executeWithParameter_impl(
1141            &self,
1142            arg_sessionId: ::std::primitive::i64,
1143            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1144            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1145            rpc_options: T::RpcOptions,
1146        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteWithParameterError>> {
1147            use ::const_cstr::const_cstr;
1148            use ::tracing::Instrument as _;
1149            use ::futures::FutureExt as _;
1150
1151            const_cstr! {
1152                SERVICE_NAME = "GraphService";
1153                METHOD_NAME = "GraphService.executeWithParameter";
1154            }
1155            let args = self::Args_GraphService_executeWithParameter {
1156                sessionId: arg_sessionId,
1157                stmt: arg_stmt,
1158                parameterMap: arg_parameterMap,
1159                _phantom: ::std::marker::PhantomData,
1160            };
1161
1162            let transport = self.transport();
1163
1164            // need to do call setup outside of async block because T: Transport isn't Send
1165            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("executeWithParameter", &args) {
1166                ::std::result::Result::Ok(res) => res,
1167                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
1168            };
1169
1170            let call = transport
1171                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
1172                .instrument(::tracing::trace_span!("call", function = "GraphService.executeWithParameter"));
1173
1174            async move {
1175                let reply_env = call.await?;
1176
1177                let de = P::deserializer(reply_env);
1178                let (res, _de): (::std::result::Result<crate::services::graph_service::ExecuteWithParameterExn, _>, _) =
1179                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
1180
1181                let res = match res {
1182                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
1183                    ::std::result::Result::Err(aexn) =>
1184                        ::std::result::Result::Err(crate::errors::graph_service::ExecuteWithParameterError::ApplicationException(aexn))
1185                };
1186                res
1187            }
1188            .instrument(::tracing::info_span!("GraphService.executeWithParameter"))
1189            .boxed()
1190        }
1191
1192        fn _executeJson_impl(
1193            &self,
1194            arg_sessionId: ::std::primitive::i64,
1195            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1196            rpc_options: T::RpcOptions,
1197        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonError>> {
1198            use ::const_cstr::const_cstr;
1199            use ::tracing::Instrument as _;
1200            use ::futures::FutureExt as _;
1201
1202            const_cstr! {
1203                SERVICE_NAME = "GraphService";
1204                METHOD_NAME = "GraphService.executeJson";
1205            }
1206            let args = self::Args_GraphService_executeJson {
1207                sessionId: arg_sessionId,
1208                stmt: arg_stmt,
1209                _phantom: ::std::marker::PhantomData,
1210            };
1211
1212            let transport = self.transport();
1213
1214            // need to do call setup outside of async block because T: Transport isn't Send
1215            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("executeJson", &args) {
1216                ::std::result::Result::Ok(res) => res,
1217                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
1218            };
1219
1220            let call = transport
1221                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
1222                .instrument(::tracing::trace_span!("call", function = "GraphService.executeJson"));
1223
1224            async move {
1225                let reply_env = call.await?;
1226
1227                let de = P::deserializer(reply_env);
1228                let (res, _de): (::std::result::Result<crate::services::graph_service::ExecuteJsonExn, _>, _) =
1229                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
1230
1231                let res = match res {
1232                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
1233                    ::std::result::Result::Err(aexn) =>
1234                        ::std::result::Result::Err(crate::errors::graph_service::ExecuteJsonError::ApplicationException(aexn))
1235                };
1236                res
1237            }
1238            .instrument(::tracing::info_span!("GraphService.executeJson"))
1239            .boxed()
1240        }
1241
1242        fn _executeJsonWithParameter_impl(
1243            &self,
1244            arg_sessionId: ::std::primitive::i64,
1245            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1246            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1247            rpc_options: T::RpcOptions,
1248        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonWithParameterError>> {
1249            use ::const_cstr::const_cstr;
1250            use ::tracing::Instrument as _;
1251            use ::futures::FutureExt as _;
1252
1253            const_cstr! {
1254                SERVICE_NAME = "GraphService";
1255                METHOD_NAME = "GraphService.executeJsonWithParameter";
1256            }
1257            let args = self::Args_GraphService_executeJsonWithParameter {
1258                sessionId: arg_sessionId,
1259                stmt: arg_stmt,
1260                parameterMap: arg_parameterMap,
1261                _phantom: ::std::marker::PhantomData,
1262            };
1263
1264            let transport = self.transport();
1265
1266            // need to do call setup outside of async block because T: Transport isn't Send
1267            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("executeJsonWithParameter", &args) {
1268                ::std::result::Result::Ok(res) => res,
1269                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
1270            };
1271
1272            let call = transport
1273                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
1274                .instrument(::tracing::trace_span!("call", function = "GraphService.executeJsonWithParameter"));
1275
1276            async move {
1277                let reply_env = call.await?;
1278
1279                let de = P::deserializer(reply_env);
1280                let (res, _de): (::std::result::Result<crate::services::graph_service::ExecuteJsonWithParameterExn, _>, _) =
1281                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
1282
1283                let res = match res {
1284                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
1285                    ::std::result::Result::Err(aexn) =>
1286                        ::std::result::Result::Err(crate::errors::graph_service::ExecuteJsonWithParameterError::ApplicationException(aexn))
1287                };
1288                res
1289            }
1290            .instrument(::tracing::info_span!("GraphService.executeJsonWithParameter"))
1291            .boxed()
1292        }
1293
1294        fn _verifyClientVersion_impl(
1295            &self,
1296            arg_req: &crate::types::VerifyClientVersionReq,
1297            rpc_options: T::RpcOptions,
1298        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::VerifyClientVersionResp, crate::errors::graph_service::VerifyClientVersionError>> {
1299            use ::const_cstr::const_cstr;
1300            use ::tracing::Instrument as _;
1301            use ::futures::FutureExt as _;
1302
1303            const_cstr! {
1304                SERVICE_NAME = "GraphService";
1305                METHOD_NAME = "GraphService.verifyClientVersion";
1306            }
1307            let args = self::Args_GraphService_verifyClientVersion {
1308                req: arg_req,
1309                _phantom: ::std::marker::PhantomData,
1310            };
1311
1312            let transport = self.transport();
1313
1314            // need to do call setup outside of async block because T: Transport isn't Send
1315            let request_env = match ::fbthrift::help::serialize_request_envelope::<P, _>("verifyClientVersion", &args) {
1316                ::std::result::Result::Ok(res) => res,
1317                ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(),
1318            };
1319
1320            let call = transport
1321                .call(SERVICE_NAME.as_cstr(), METHOD_NAME.as_cstr(), request_env, rpc_options)
1322                .instrument(::tracing::trace_span!("call", function = "GraphService.verifyClientVersion"));
1323
1324            async move {
1325                let reply_env = call.await?;
1326
1327                let de = P::deserializer(reply_env);
1328                let (res, _de): (::std::result::Result<crate::services::graph_service::VerifyClientVersionExn, _>, _) =
1329                    ::fbthrift::help::async_deserialize_response_envelope::<P, _, S>(de).await?;
1330
1331                let res = match res {
1332                    ::std::result::Result::Ok(exn) => ::std::convert::From::from(exn),
1333                    ::std::result::Result::Err(aexn) =>
1334                        ::std::result::Result::Err(crate::errors::graph_service::VerifyClientVersionError::ApplicationException(aexn))
1335                };
1336                res
1337            }
1338            .instrument(::tracing::info_span!("GraphService.verifyClientVersion"))
1339            .boxed()
1340        }
1341    }
1342
1343    pub trait GraphService: ::std::marker::Send {
1344        fn authenticate(
1345            &self,
1346            arg_username: &::std::vec::Vec<::std::primitive::u8>,
1347            arg_password: &::std::vec::Vec<::std::primitive::u8>,
1348        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AuthResponse, crate::errors::graph_service::AuthenticateError>>;
1349
1350        fn signout(
1351            &self,
1352            arg_sessionId: ::std::primitive::i64,
1353        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::graph_service::SignoutError>>;
1354
1355        fn execute(
1356            &self,
1357            arg_sessionId: ::std::primitive::i64,
1358            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1359        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteError>>;
1360
1361        fn executeWithParameter(
1362            &self,
1363            arg_sessionId: ::std::primitive::i64,
1364            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1365            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1366        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteWithParameterError>>;
1367
1368        fn executeJson(
1369            &self,
1370            arg_sessionId: ::std::primitive::i64,
1371            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1372        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonError>>;
1373
1374        fn executeJsonWithParameter(
1375            &self,
1376            arg_sessionId: ::std::primitive::i64,
1377            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1378            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1379        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonWithParameterError>>;
1380
1381        fn verifyClientVersion(
1382            &self,
1383            arg_req: &crate::types::VerifyClientVersionReq,
1384        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::VerifyClientVersionResp, crate::errors::graph_service::VerifyClientVersionError>>;
1385    }
1386
1387    pub trait GraphServiceExt<T>: GraphService
1388    where
1389        T: ::fbthrift::Transport,
1390    {
1391        fn authenticate_with_rpc_opts(
1392            &self,
1393            arg_username: &::std::vec::Vec<::std::primitive::u8>,
1394            arg_password: &::std::vec::Vec<::std::primitive::u8>,
1395            rpc_options: T::RpcOptions,
1396        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AuthResponse, crate::errors::graph_service::AuthenticateError>>;
1397        fn signout_with_rpc_opts(
1398            &self,
1399            arg_sessionId: ::std::primitive::i64,
1400            rpc_options: T::RpcOptions,
1401        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::graph_service::SignoutError>>;
1402        fn execute_with_rpc_opts(
1403            &self,
1404            arg_sessionId: ::std::primitive::i64,
1405            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1406            rpc_options: T::RpcOptions,
1407        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteError>>;
1408        fn executeWithParameter_with_rpc_opts(
1409            &self,
1410            arg_sessionId: ::std::primitive::i64,
1411            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1412            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1413            rpc_options: T::RpcOptions,
1414        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteWithParameterError>>;
1415        fn executeJson_with_rpc_opts(
1416            &self,
1417            arg_sessionId: ::std::primitive::i64,
1418            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1419            rpc_options: T::RpcOptions,
1420        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonError>>;
1421        fn executeJsonWithParameter_with_rpc_opts(
1422            &self,
1423            arg_sessionId: ::std::primitive::i64,
1424            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1425            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1426            rpc_options: T::RpcOptions,
1427        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonWithParameterError>>;
1428        fn verifyClientVersion_with_rpc_opts(
1429            &self,
1430            arg_req: &crate::types::VerifyClientVersionReq,
1431            rpc_options: T::RpcOptions,
1432        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::VerifyClientVersionResp, crate::errors::graph_service::VerifyClientVersionError>>;
1433    }
1434
1435    struct Args_GraphService_authenticate<'a> {
1436        username: &'a ::std::vec::Vec<::std::primitive::u8>,
1437        password: &'a ::std::vec::Vec<::std::primitive::u8>,
1438        _phantom: ::std::marker::PhantomData<&'a ()>,
1439    }
1440
1441    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphService_authenticate<'a> {
1442        #[inline]
1443        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphService.authenticate"))]
1444        fn write(&self, p: &mut P) {
1445            p.write_struct_begin("args");
1446            p.write_field_begin("username", ::fbthrift::TType::String, 1i16);
1447            ::fbthrift::Serialize::write(&self.username, p);
1448            p.write_field_end();
1449            p.write_field_begin("password", ::fbthrift::TType::String, 2i16);
1450            ::fbthrift::Serialize::write(&self.password, p);
1451            p.write_field_end();
1452            p.write_field_stop();
1453            p.write_struct_end();
1454        }
1455    }
1456
1457    struct Args_GraphService_signout<'a> {
1458        sessionId: ::std::primitive::i64,
1459        _phantom: ::std::marker::PhantomData<&'a ()>,
1460    }
1461
1462    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphService_signout<'a> {
1463        #[inline]
1464        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphService.signout"))]
1465        fn write(&self, p: &mut P) {
1466            p.write_struct_begin("args");
1467            p.write_field_begin("sessionId", ::fbthrift::TType::I64, 1i16);
1468            ::fbthrift::Serialize::write(&self.sessionId, p);
1469            p.write_field_end();
1470            p.write_field_stop();
1471            p.write_struct_end();
1472        }
1473    }
1474
1475    struct Args_GraphService_execute<'a> {
1476        sessionId: ::std::primitive::i64,
1477        stmt: &'a ::std::vec::Vec<::std::primitive::u8>,
1478        _phantom: ::std::marker::PhantomData<&'a ()>,
1479    }
1480
1481    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphService_execute<'a> {
1482        #[inline]
1483        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphService.execute"))]
1484        fn write(&self, p: &mut P) {
1485            p.write_struct_begin("args");
1486            p.write_field_begin("sessionId", ::fbthrift::TType::I64, 1i16);
1487            ::fbthrift::Serialize::write(&self.sessionId, p);
1488            p.write_field_end();
1489            p.write_field_begin("stmt", ::fbthrift::TType::String, 2i16);
1490            ::fbthrift::Serialize::write(&self.stmt, p);
1491            p.write_field_end();
1492            p.write_field_stop();
1493            p.write_struct_end();
1494        }
1495    }
1496
1497    struct Args_GraphService_executeWithParameter<'a> {
1498        sessionId: ::std::primitive::i64,
1499        stmt: &'a ::std::vec::Vec<::std::primitive::u8>,
1500        parameterMap: &'a ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1501        _phantom: ::std::marker::PhantomData<&'a ()>,
1502    }
1503
1504    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphService_executeWithParameter<'a> {
1505        #[inline]
1506        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphService.executeWithParameter"))]
1507        fn write(&self, p: &mut P) {
1508            p.write_struct_begin("args");
1509            p.write_field_begin("sessionId", ::fbthrift::TType::I64, 1i16);
1510            ::fbthrift::Serialize::write(&self.sessionId, p);
1511            p.write_field_end();
1512            p.write_field_begin("stmt", ::fbthrift::TType::String, 2i16);
1513            ::fbthrift::Serialize::write(&self.stmt, p);
1514            p.write_field_end();
1515            p.write_field_begin("parameterMap", ::fbthrift::TType::Map, 3i16);
1516            ::fbthrift::Serialize::write(&self.parameterMap, p);
1517            p.write_field_end();
1518            p.write_field_stop();
1519            p.write_struct_end();
1520        }
1521    }
1522
1523    struct Args_GraphService_executeJson<'a> {
1524        sessionId: ::std::primitive::i64,
1525        stmt: &'a ::std::vec::Vec<::std::primitive::u8>,
1526        _phantom: ::std::marker::PhantomData<&'a ()>,
1527    }
1528
1529    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphService_executeJson<'a> {
1530        #[inline]
1531        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphService.executeJson"))]
1532        fn write(&self, p: &mut P) {
1533            p.write_struct_begin("args");
1534            p.write_field_begin("sessionId", ::fbthrift::TType::I64, 1i16);
1535            ::fbthrift::Serialize::write(&self.sessionId, p);
1536            p.write_field_end();
1537            p.write_field_begin("stmt", ::fbthrift::TType::String, 2i16);
1538            ::fbthrift::Serialize::write(&self.stmt, p);
1539            p.write_field_end();
1540            p.write_field_stop();
1541            p.write_struct_end();
1542        }
1543    }
1544
1545    struct Args_GraphService_executeJsonWithParameter<'a> {
1546        sessionId: ::std::primitive::i64,
1547        stmt: &'a ::std::vec::Vec<::std::primitive::u8>,
1548        parameterMap: &'a ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1549        _phantom: ::std::marker::PhantomData<&'a ()>,
1550    }
1551
1552    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphService_executeJsonWithParameter<'a> {
1553        #[inline]
1554        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphService.executeJsonWithParameter"))]
1555        fn write(&self, p: &mut P) {
1556            p.write_struct_begin("args");
1557            p.write_field_begin("sessionId", ::fbthrift::TType::I64, 1i16);
1558            ::fbthrift::Serialize::write(&self.sessionId, p);
1559            p.write_field_end();
1560            p.write_field_begin("stmt", ::fbthrift::TType::String, 2i16);
1561            ::fbthrift::Serialize::write(&self.stmt, p);
1562            p.write_field_end();
1563            p.write_field_begin("parameterMap", ::fbthrift::TType::Map, 3i16);
1564            ::fbthrift::Serialize::write(&self.parameterMap, p);
1565            p.write_field_end();
1566            p.write_field_stop();
1567            p.write_struct_end();
1568        }
1569    }
1570
1571    struct Args_GraphService_verifyClientVersion<'a> {
1572        req: &'a crate::types::VerifyClientVersionReq,
1573        _phantom: ::std::marker::PhantomData<&'a ()>,
1574    }
1575
1576    impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize<P> for self::Args_GraphService_verifyClientVersion<'a> {
1577        #[inline]
1578        #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "GraphService.verifyClientVersion"))]
1579        fn write(&self, p: &mut P) {
1580            p.write_struct_begin("args");
1581            p.write_field_begin("req", ::fbthrift::TType::Struct, 1i16);
1582            ::fbthrift::Serialize::write(&self.req, p);
1583            p.write_field_end();
1584            p.write_field_stop();
1585            p.write_struct_end();
1586        }
1587    }
1588
1589    impl<P, T, S> GraphService for GraphServiceImpl<P, T, S>
1590    where
1591        P: ::fbthrift::Protocol,
1592        T: ::fbthrift::Transport,
1593        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
1594        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
1595        P::Deserializer: ::std::marker::Send,
1596        S: ::fbthrift::help::Spawner,
1597    {
1598        fn authenticate(
1599            &self,
1600            arg_username: &::std::vec::Vec<::std::primitive::u8>,
1601            arg_password: &::std::vec::Vec<::std::primitive::u8>,
1602        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AuthResponse, crate::errors::graph_service::AuthenticateError>> {
1603            let rpc_options = T::RpcOptions::default();
1604            self._authenticate_impl(
1605                arg_username,
1606                arg_password,
1607                rpc_options,
1608            )
1609        }
1610        fn signout(
1611            &self,
1612            arg_sessionId: ::std::primitive::i64,
1613        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::graph_service::SignoutError>> {
1614            let rpc_options = T::RpcOptions::default();
1615            self._signout_impl(
1616                arg_sessionId,
1617                rpc_options,
1618            )
1619        }
1620        fn execute(
1621            &self,
1622            arg_sessionId: ::std::primitive::i64,
1623            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1624        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteError>> {
1625            let rpc_options = T::RpcOptions::default();
1626            self._execute_impl(
1627                arg_sessionId,
1628                arg_stmt,
1629                rpc_options,
1630            )
1631        }
1632        fn executeWithParameter(
1633            &self,
1634            arg_sessionId: ::std::primitive::i64,
1635            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1636            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1637        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteWithParameterError>> {
1638            let rpc_options = T::RpcOptions::default();
1639            self._executeWithParameter_impl(
1640                arg_sessionId,
1641                arg_stmt,
1642                arg_parameterMap,
1643                rpc_options,
1644            )
1645        }
1646        fn executeJson(
1647            &self,
1648            arg_sessionId: ::std::primitive::i64,
1649            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1650        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonError>> {
1651            let rpc_options = T::RpcOptions::default();
1652            self._executeJson_impl(
1653                arg_sessionId,
1654                arg_stmt,
1655                rpc_options,
1656            )
1657        }
1658        fn executeJsonWithParameter(
1659            &self,
1660            arg_sessionId: ::std::primitive::i64,
1661            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1662            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1663        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonWithParameterError>> {
1664            let rpc_options = T::RpcOptions::default();
1665            self._executeJsonWithParameter_impl(
1666                arg_sessionId,
1667                arg_stmt,
1668                arg_parameterMap,
1669                rpc_options,
1670            )
1671        }
1672        fn verifyClientVersion(
1673            &self,
1674            arg_req: &crate::types::VerifyClientVersionReq,
1675        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::VerifyClientVersionResp, crate::errors::graph_service::VerifyClientVersionError>> {
1676            let rpc_options = T::RpcOptions::default();
1677            self._verifyClientVersion_impl(
1678                arg_req,
1679                rpc_options,
1680            )
1681        }
1682    }
1683
1684    impl<P, T, S> GraphServiceExt<T> for GraphServiceImpl<P, T, S>
1685    where
1686        P: ::fbthrift::Protocol,
1687        T: ::fbthrift::Transport,
1688        P::Frame: ::fbthrift::Framing<DecBuf = ::fbthrift::FramingDecoded<T>>,
1689        ::fbthrift::ProtocolEncoded<P>: ::fbthrift::BufMutExt<Final = ::fbthrift::FramingEncodedFinal<T>>,
1690        P::Deserializer: ::std::marker::Send,
1691        S: ::fbthrift::help::Spawner,
1692    {
1693        fn authenticate_with_rpc_opts(
1694            &self,
1695            arg_username: &::std::vec::Vec<::std::primitive::u8>,
1696            arg_password: &::std::vec::Vec<::std::primitive::u8>,
1697            rpc_options: T::RpcOptions,
1698        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AuthResponse, crate::errors::graph_service::AuthenticateError>> {
1699            self._authenticate_impl(
1700                arg_username,
1701                arg_password,
1702                rpc_options,
1703            )
1704        }
1705        fn signout_with_rpc_opts(
1706            &self,
1707            arg_sessionId: ::std::primitive::i64,
1708            rpc_options: T::RpcOptions,
1709        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::graph_service::SignoutError>> {
1710            self._signout_impl(
1711                arg_sessionId,
1712                rpc_options,
1713            )
1714        }
1715        fn execute_with_rpc_opts(
1716            &self,
1717            arg_sessionId: ::std::primitive::i64,
1718            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1719            rpc_options: T::RpcOptions,
1720        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteError>> {
1721            self._execute_impl(
1722                arg_sessionId,
1723                arg_stmt,
1724                rpc_options,
1725            )
1726        }
1727        fn executeWithParameter_with_rpc_opts(
1728            &self,
1729            arg_sessionId: ::std::primitive::i64,
1730            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1731            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1732            rpc_options: T::RpcOptions,
1733        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteWithParameterError>> {
1734            self._executeWithParameter_impl(
1735                arg_sessionId,
1736                arg_stmt,
1737                arg_parameterMap,
1738                rpc_options,
1739            )
1740        }
1741        fn executeJson_with_rpc_opts(
1742            &self,
1743            arg_sessionId: ::std::primitive::i64,
1744            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1745            rpc_options: T::RpcOptions,
1746        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonError>> {
1747            self._executeJson_impl(
1748                arg_sessionId,
1749                arg_stmt,
1750                rpc_options,
1751            )
1752        }
1753        fn executeJsonWithParameter_with_rpc_opts(
1754            &self,
1755            arg_sessionId: ::std::primitive::i64,
1756            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1757            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1758            rpc_options: T::RpcOptions,
1759        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonWithParameterError>> {
1760            self._executeJsonWithParameter_impl(
1761                arg_sessionId,
1762                arg_stmt,
1763                arg_parameterMap,
1764                rpc_options,
1765            )
1766        }
1767        fn verifyClientVersion_with_rpc_opts(
1768            &self,
1769            arg_req: &crate::types::VerifyClientVersionReq,
1770            rpc_options: T::RpcOptions,
1771        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::VerifyClientVersionResp, crate::errors::graph_service::VerifyClientVersionError>> {
1772            self._verifyClientVersion_impl(
1773                arg_req,
1774                rpc_options,
1775            )
1776        }
1777    }
1778
1779    impl<'a, S> GraphService for S
1780    where
1781        S: ::std::convert::AsRef<dyn GraphService + 'a>,
1782        S: ::std::marker::Send,
1783    {
1784        fn authenticate(
1785            &self,
1786            arg_username: &::std::vec::Vec<::std::primitive::u8>,
1787            arg_password: &::std::vec::Vec<::std::primitive::u8>,
1788        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AuthResponse, crate::errors::graph_service::AuthenticateError>> {
1789            self.as_ref().authenticate(
1790                arg_username,
1791                arg_password,
1792            )
1793        }
1794        fn signout(
1795            &self,
1796            arg_sessionId: ::std::primitive::i64,
1797        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::graph_service::SignoutError>> {
1798            self.as_ref().signout(
1799                arg_sessionId,
1800            )
1801        }
1802        fn execute(
1803            &self,
1804            arg_sessionId: ::std::primitive::i64,
1805            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1806        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteError>> {
1807            self.as_ref().execute(
1808                arg_sessionId,
1809                arg_stmt,
1810            )
1811        }
1812        fn executeWithParameter(
1813            &self,
1814            arg_sessionId: ::std::primitive::i64,
1815            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1816            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1817        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteWithParameterError>> {
1818            self.as_ref().executeWithParameter(
1819                arg_sessionId,
1820                arg_stmt,
1821                arg_parameterMap,
1822            )
1823        }
1824        fn executeJson(
1825            &self,
1826            arg_sessionId: ::std::primitive::i64,
1827            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1828        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonError>> {
1829            self.as_ref().executeJson(
1830                arg_sessionId,
1831                arg_stmt,
1832            )
1833        }
1834        fn executeJsonWithParameter(
1835            &self,
1836            arg_sessionId: ::std::primitive::i64,
1837            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1838            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1839        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonWithParameterError>> {
1840            self.as_ref().executeJsonWithParameter(
1841                arg_sessionId,
1842                arg_stmt,
1843                arg_parameterMap,
1844            )
1845        }
1846        fn verifyClientVersion(
1847            &self,
1848            arg_req: &crate::types::VerifyClientVersionReq,
1849        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::VerifyClientVersionResp, crate::errors::graph_service::VerifyClientVersionError>> {
1850            self.as_ref().verifyClientVersion(
1851                arg_req,
1852            )
1853        }
1854    }
1855
1856    impl<'a, S, T> GraphServiceExt<T> for S
1857    where
1858        S: ::std::convert::AsRef<dyn GraphService + 'a>,
1859        S: ::std::convert::AsRef<dyn GraphServiceExt<T> + 'a>,
1860        S: ::std::marker::Send,
1861        T: ::fbthrift::Transport,
1862    {
1863        fn authenticate_with_rpc_opts(
1864            &self,
1865            arg_username: &::std::vec::Vec<::std::primitive::u8>,
1866            arg_password: &::std::vec::Vec<::std::primitive::u8>,
1867            rpc_options: T::RpcOptions,
1868        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AuthResponse, crate::errors::graph_service::AuthenticateError>> {
1869            <Self as ::std::convert::AsRef<dyn GraphServiceExt<T>>>::as_ref(self).authenticate_with_rpc_opts(
1870                arg_username,
1871                arg_password,
1872                rpc_options,
1873            )
1874        }
1875        fn signout_with_rpc_opts(
1876            &self,
1877            arg_sessionId: ::std::primitive::i64,
1878            rpc_options: T::RpcOptions,
1879        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::graph_service::SignoutError>> {
1880            <Self as ::std::convert::AsRef<dyn GraphServiceExt<T>>>::as_ref(self).signout_with_rpc_opts(
1881                arg_sessionId,
1882                rpc_options,
1883            )
1884        }
1885        fn execute_with_rpc_opts(
1886            &self,
1887            arg_sessionId: ::std::primitive::i64,
1888            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1889            rpc_options: T::RpcOptions,
1890        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteError>> {
1891            <Self as ::std::convert::AsRef<dyn GraphServiceExt<T>>>::as_ref(self).execute_with_rpc_opts(
1892                arg_sessionId,
1893                arg_stmt,
1894                rpc_options,
1895            )
1896        }
1897        fn executeWithParameter_with_rpc_opts(
1898            &self,
1899            arg_sessionId: ::std::primitive::i64,
1900            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1901            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1902            rpc_options: T::RpcOptions,
1903        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteWithParameterError>> {
1904            <Self as ::std::convert::AsRef<dyn GraphServiceExt<T>>>::as_ref(self).executeWithParameter_with_rpc_opts(
1905                arg_sessionId,
1906                arg_stmt,
1907                arg_parameterMap,
1908                rpc_options,
1909            )
1910        }
1911        fn executeJson_with_rpc_opts(
1912            &self,
1913            arg_sessionId: ::std::primitive::i64,
1914            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1915            rpc_options: T::RpcOptions,
1916        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonError>> {
1917            <Self as ::std::convert::AsRef<dyn GraphServiceExt<T>>>::as_ref(self).executeJson_with_rpc_opts(
1918                arg_sessionId,
1919                arg_stmt,
1920                rpc_options,
1921            )
1922        }
1923        fn executeJsonWithParameter_with_rpc_opts(
1924            &self,
1925            arg_sessionId: ::std::primitive::i64,
1926            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
1927            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
1928            rpc_options: T::RpcOptions,
1929        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonWithParameterError>> {
1930            <Self as ::std::convert::AsRef<dyn GraphServiceExt<T>>>::as_ref(self).executeJsonWithParameter_with_rpc_opts(
1931                arg_sessionId,
1932                arg_stmt,
1933                arg_parameterMap,
1934                rpc_options,
1935            )
1936        }
1937        fn verifyClientVersion_with_rpc_opts(
1938            &self,
1939            arg_req: &crate::types::VerifyClientVersionReq,
1940            rpc_options: T::RpcOptions,
1941        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::VerifyClientVersionResp, crate::errors::graph_service::VerifyClientVersionError>> {
1942            <Self as ::std::convert::AsRef<dyn GraphServiceExt<T>>>::as_ref(self).verifyClientVersion_with_rpc_opts(
1943                arg_req,
1944                rpc_options,
1945            )
1946        }
1947    }
1948
1949    #[derive(Clone)]
1950    pub struct make_GraphService;
1951
1952    /// To be called by user directly setting up a client. Avoids
1953    /// needing ClientFactory trait in scope, avoids unidiomatic
1954    /// make_Trait name.
1955    ///
1956    /// ```
1957    /// # const _: &str = stringify! {
1958    /// use bgs::client::BuckGraphService;
1959    ///
1960    /// let protocol = BinaryProtocol::new();
1961    /// let transport = HttpClient::new();
1962    /// let client = <dyn BuckGraphService>::new(protocol, transport);
1963    /// # };
1964    /// ```
1965    impl dyn GraphService {
1966        pub fn new<P, T>(
1967            protocol: P,
1968            transport: T,
1969        ) -> ::std::sync::Arc<impl GraphService + ::std::marker::Send + ::std::marker::Sync + 'static>
1970        where
1971            P: ::fbthrift::Protocol<Frame = T>,
1972            T: ::fbthrift::Transport,
1973            P::Deserializer: ::std::marker::Send,
1974        {
1975            let spawner = ::fbthrift::help::NoopSpawner;
1976            Self::with_spawner(protocol, transport, spawner)
1977        }
1978
1979        pub fn with_spawner<P, T, S>(
1980            protocol: P,
1981            transport: T,
1982            spawner: S,
1983        ) -> ::std::sync::Arc<impl GraphService + ::std::marker::Send + ::std::marker::Sync + 'static>
1984        where
1985            P: ::fbthrift::Protocol<Frame = T>,
1986            T: ::fbthrift::Transport,
1987            P::Deserializer: ::std::marker::Send,
1988            S: ::fbthrift::help::Spawner,
1989        {
1990            let _ = protocol;
1991            let _ = spawner;
1992            ::std::sync::Arc::new(GraphServiceImpl::<P, T, S>::new(transport))
1993        }
1994    }
1995
1996    impl<T> dyn GraphServiceExt<T>
1997    where
1998        T: ::fbthrift::Transport,
1999    {
2000        pub fn new<P>(
2001            protocol: P,
2002            transport: T,
2003        ) -> ::std::sync::Arc<impl GraphServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
2004        where
2005            P: ::fbthrift::Protocol<Frame = T>,
2006            P::Deserializer: ::std::marker::Send,
2007        {
2008            let spawner = ::fbthrift::help::NoopSpawner;
2009            Self::with_spawner(protocol, transport, spawner)
2010        }
2011
2012        pub fn with_spawner<P, S>(
2013            protocol: P,
2014            transport: T,
2015            spawner: S,
2016        ) -> ::std::sync::Arc<impl GraphServiceExt<T> + ::std::marker::Send + ::std::marker::Sync + 'static>
2017        where
2018            P: ::fbthrift::Protocol<Frame = T>,
2019            P::Deserializer: ::std::marker::Send,
2020            S: ::fbthrift::help::Spawner,
2021        {
2022            let _ = protocol;
2023            let _ = spawner;
2024            ::std::sync::Arc::new(GraphServiceImpl::<P, T, S>::new(transport))
2025        }
2026    }
2027
2028    pub type GraphServiceDynClient = <make_GraphService as ::fbthrift::ClientFactory>::Api;
2029    pub type GraphServiceClient = ::std::sync::Arc<GraphServiceDynClient>;
2030
2031    /// The same thing, but to be called from generic contexts where we are
2032    /// working with a type parameter `C: ClientFactory` to produce clients.
2033    impl ::fbthrift::ClientFactory for make_GraphService {
2034        type Api = dyn GraphService + ::std::marker::Send + ::std::marker::Sync + 'static;
2035
2036        fn with_spawner<P, T, S>(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc<Self::Api>
2037        where
2038            P: ::fbthrift::Protocol<Frame = T>,
2039            T: ::fbthrift::Transport,
2040            P::Deserializer: ::std::marker::Send,
2041            S: ::fbthrift::help::Spawner,
2042        {
2043            <dyn GraphService>::with_spawner(protocol, transport, spawner)
2044        }
2045    }
2046
2047}
2048
2049/// Server definitions for `graph`.
2050pub mod server {
2051    #[::async_trait::async_trait]
2052    pub trait GraphService: ::std::marker::Send + ::std::marker::Sync + 'static {
2053        async fn authenticate(
2054            &self,
2055            _username: ::std::vec::Vec<::std::primitive::u8>,
2056            _password: ::std::vec::Vec<::std::primitive::u8>,
2057        ) -> ::std::result::Result<crate::types::AuthResponse, crate::services::graph_service::AuthenticateExn> {
2058            ::std::result::Result::Err(crate::services::graph_service::AuthenticateExn::ApplicationException(
2059                ::fbthrift::ApplicationException::unimplemented_method(
2060                    "GraphService",
2061                    "authenticate",
2062                ),
2063            ))
2064        }
2065        async fn signout(
2066            &self,
2067            _sessionId: ::std::primitive::i64,
2068        ) -> ::std::result::Result<(), crate::services::graph_service::SignoutExn> {
2069            ::std::result::Result::Err(crate::services::graph_service::SignoutExn::ApplicationException(
2070                ::fbthrift::ApplicationException::unimplemented_method(
2071                    "GraphService",
2072                    "signout",
2073                ),
2074            ))
2075        }
2076        async fn execute(
2077            &self,
2078            _sessionId: ::std::primitive::i64,
2079            _stmt: ::std::vec::Vec<::std::primitive::u8>,
2080        ) -> ::std::result::Result<crate::types::ExecutionResponse, crate::services::graph_service::ExecuteExn> {
2081            ::std::result::Result::Err(crate::services::graph_service::ExecuteExn::ApplicationException(
2082                ::fbthrift::ApplicationException::unimplemented_method(
2083                    "GraphService",
2084                    "execute",
2085                ),
2086            ))
2087        }
2088        async fn executeWithParameter(
2089            &self,
2090            _sessionId: ::std::primitive::i64,
2091            _stmt: ::std::vec::Vec<::std::primitive::u8>,
2092            _parameterMap: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
2093        ) -> ::std::result::Result<crate::types::ExecutionResponse, crate::services::graph_service::ExecuteWithParameterExn> {
2094            ::std::result::Result::Err(crate::services::graph_service::ExecuteWithParameterExn::ApplicationException(
2095                ::fbthrift::ApplicationException::unimplemented_method(
2096                    "GraphService",
2097                    "executeWithParameter",
2098                ),
2099            ))
2100        }
2101        async fn executeJson(
2102            &self,
2103            _sessionId: ::std::primitive::i64,
2104            _stmt: ::std::vec::Vec<::std::primitive::u8>,
2105        ) -> ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::services::graph_service::ExecuteJsonExn> {
2106            ::std::result::Result::Err(crate::services::graph_service::ExecuteJsonExn::ApplicationException(
2107                ::fbthrift::ApplicationException::unimplemented_method(
2108                    "GraphService",
2109                    "executeJson",
2110                ),
2111            ))
2112        }
2113        async fn executeJsonWithParameter(
2114            &self,
2115            _sessionId: ::std::primitive::i64,
2116            _stmt: ::std::vec::Vec<::std::primitive::u8>,
2117            _parameterMap: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
2118        ) -> ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::services::graph_service::ExecuteJsonWithParameterExn> {
2119            ::std::result::Result::Err(crate::services::graph_service::ExecuteJsonWithParameterExn::ApplicationException(
2120                ::fbthrift::ApplicationException::unimplemented_method(
2121                    "GraphService",
2122                    "executeJsonWithParameter",
2123                ),
2124            ))
2125        }
2126        async fn verifyClientVersion(
2127            &self,
2128            _req: crate::types::VerifyClientVersionReq,
2129        ) -> ::std::result::Result<crate::types::VerifyClientVersionResp, crate::services::graph_service::VerifyClientVersionExn> {
2130            ::std::result::Result::Err(crate::services::graph_service::VerifyClientVersionExn::ApplicationException(
2131                ::fbthrift::ApplicationException::unimplemented_method(
2132                    "GraphService",
2133                    "verifyClientVersion",
2134                ),
2135            ))
2136        }
2137    }
2138
2139    #[::async_trait::async_trait]
2140    impl<T> GraphService for ::std::boxed::Box<T>
2141    where
2142        T: GraphService + Send + Sync + ?Sized,
2143    {
2144        async fn authenticate(
2145            &self,
2146            username: ::std::vec::Vec<::std::primitive::u8>,
2147            password: ::std::vec::Vec<::std::primitive::u8>,
2148        ) -> ::std::result::Result<crate::types::AuthResponse, crate::services::graph_service::AuthenticateExn> {
2149            (**self).authenticate(
2150                username,
2151                password,
2152            ).await
2153        }
2154        async fn signout(
2155            &self,
2156            sessionId: ::std::primitive::i64,
2157        ) -> ::std::result::Result<(), crate::services::graph_service::SignoutExn> {
2158            (**self).signout(
2159                sessionId,
2160            ).await
2161        }
2162        async fn execute(
2163            &self,
2164            sessionId: ::std::primitive::i64,
2165            stmt: ::std::vec::Vec<::std::primitive::u8>,
2166        ) -> ::std::result::Result<crate::types::ExecutionResponse, crate::services::graph_service::ExecuteExn> {
2167            (**self).execute(
2168                sessionId,
2169                stmt,
2170            ).await
2171        }
2172        async fn executeWithParameter(
2173            &self,
2174            sessionId: ::std::primitive::i64,
2175            stmt: ::std::vec::Vec<::std::primitive::u8>,
2176            parameterMap: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
2177        ) -> ::std::result::Result<crate::types::ExecutionResponse, crate::services::graph_service::ExecuteWithParameterExn> {
2178            (**self).executeWithParameter(
2179                sessionId,
2180                stmt,
2181                parameterMap,
2182            ).await
2183        }
2184        async fn executeJson(
2185            &self,
2186            sessionId: ::std::primitive::i64,
2187            stmt: ::std::vec::Vec<::std::primitive::u8>,
2188        ) -> ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::services::graph_service::ExecuteJsonExn> {
2189            (**self).executeJson(
2190                sessionId,
2191                stmt,
2192            ).await
2193        }
2194        async fn executeJsonWithParameter(
2195            &self,
2196            sessionId: ::std::primitive::i64,
2197            stmt: ::std::vec::Vec<::std::primitive::u8>,
2198            parameterMap: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
2199        ) -> ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::services::graph_service::ExecuteJsonWithParameterExn> {
2200            (**self).executeJsonWithParameter(
2201                sessionId,
2202                stmt,
2203                parameterMap,
2204            ).await
2205        }
2206        async fn verifyClientVersion(
2207            &self,
2208            req: crate::types::VerifyClientVersionReq,
2209        ) -> ::std::result::Result<crate::types::VerifyClientVersionResp, crate::services::graph_service::VerifyClientVersionExn> {
2210            (**self).verifyClientVersion(
2211                req,
2212            ).await
2213        }
2214    }
2215
2216    /// Processor for GraphService's methods.
2217    #[derive(Clone, Debug)]
2218    pub struct GraphServiceProcessor<P, H, R, RS> {
2219        service: H,
2220        supa: ::fbthrift::NullServiceProcessor<P, R, RS>,
2221        _phantom: ::std::marker::PhantomData<(P, H, R, RS)>,
2222    }
2223
2224    struct Args_GraphService_authenticate {
2225        username: ::std::vec::Vec<::std::primitive::u8>,
2226        password: ::std::vec::Vec<::std::primitive::u8>,
2227    }
2228    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphService_authenticate {
2229        #[inline]
2230        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphService.authenticate"))]
2231        fn read(p: &mut P) -> ::anyhow::Result<Self> {
2232            static ARGS: &[::fbthrift::Field] = &[
2233                ::fbthrift::Field::new("password", ::fbthrift::TType::String, 2),
2234                ::fbthrift::Field::new("username", ::fbthrift::TType::String, 1),
2235            ];
2236            let mut field_username = ::std::option::Option::None;
2237            let mut field_password = ::std::option::Option::None;
2238            let _ = p.read_struct_begin(|_| ())?;
2239            loop {
2240                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
2241                match (fty, fid as ::std::primitive::i32) {
2242                    (::fbthrift::TType::Stop, _) => break,
2243                    (::fbthrift::TType::String, 1) => field_username = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2244                    (::fbthrift::TType::String, 2) => field_password = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2245                    (fty, _) => p.skip(fty)?,
2246                }
2247                p.read_field_end()?;
2248            }
2249            p.read_struct_end()?;
2250            ::std::result::Result::Ok(Self {
2251                username: field_username.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.authenticate", "username"))?,
2252                password: field_password.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.authenticate", "password"))?,
2253            })
2254        }
2255    }
2256
2257    struct Args_GraphService_signout {
2258        sessionId: ::std::primitive::i64,
2259    }
2260    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphService_signout {
2261        #[inline]
2262        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphService.signout"))]
2263        fn read(p: &mut P) -> ::anyhow::Result<Self> {
2264            static ARGS: &[::fbthrift::Field] = &[
2265                ::fbthrift::Field::new("sessionId", ::fbthrift::TType::I64, 1),
2266            ];
2267            let mut field_sessionId = ::std::option::Option::None;
2268            let _ = p.read_struct_begin(|_| ())?;
2269            loop {
2270                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
2271                match (fty, fid as ::std::primitive::i32) {
2272                    (::fbthrift::TType::Stop, _) => break,
2273                    (::fbthrift::TType::I64, 1) => field_sessionId = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2274                    (fty, _) => p.skip(fty)?,
2275                }
2276                p.read_field_end()?;
2277            }
2278            p.read_struct_end()?;
2279            ::std::result::Result::Ok(Self {
2280                sessionId: field_sessionId.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.signout", "sessionId"))?,
2281            })
2282        }
2283    }
2284
2285    struct Args_GraphService_execute {
2286        sessionId: ::std::primitive::i64,
2287        stmt: ::std::vec::Vec<::std::primitive::u8>,
2288    }
2289    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphService_execute {
2290        #[inline]
2291        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphService.execute"))]
2292        fn read(p: &mut P) -> ::anyhow::Result<Self> {
2293            static ARGS: &[::fbthrift::Field] = &[
2294                ::fbthrift::Field::new("sessionId", ::fbthrift::TType::I64, 1),
2295                ::fbthrift::Field::new("stmt", ::fbthrift::TType::String, 2),
2296            ];
2297            let mut field_sessionId = ::std::option::Option::None;
2298            let mut field_stmt = ::std::option::Option::None;
2299            let _ = p.read_struct_begin(|_| ())?;
2300            loop {
2301                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
2302                match (fty, fid as ::std::primitive::i32) {
2303                    (::fbthrift::TType::Stop, _) => break,
2304                    (::fbthrift::TType::I64, 1) => field_sessionId = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2305                    (::fbthrift::TType::String, 2) => field_stmt = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2306                    (fty, _) => p.skip(fty)?,
2307                }
2308                p.read_field_end()?;
2309            }
2310            p.read_struct_end()?;
2311            ::std::result::Result::Ok(Self {
2312                sessionId: field_sessionId.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.execute", "sessionId"))?,
2313                stmt: field_stmt.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.execute", "stmt"))?,
2314            })
2315        }
2316    }
2317
2318    struct Args_GraphService_executeWithParameter {
2319        sessionId: ::std::primitive::i64,
2320        stmt: ::std::vec::Vec<::std::primitive::u8>,
2321        parameterMap: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
2322    }
2323    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphService_executeWithParameter {
2324        #[inline]
2325        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphService.executeWithParameter"))]
2326        fn read(p: &mut P) -> ::anyhow::Result<Self> {
2327            static ARGS: &[::fbthrift::Field] = &[
2328                ::fbthrift::Field::new("parameterMap", ::fbthrift::TType::Map, 3),
2329                ::fbthrift::Field::new("sessionId", ::fbthrift::TType::I64, 1),
2330                ::fbthrift::Field::new("stmt", ::fbthrift::TType::String, 2),
2331            ];
2332            let mut field_sessionId = ::std::option::Option::None;
2333            let mut field_stmt = ::std::option::Option::None;
2334            let mut field_parameterMap = ::std::option::Option::None;
2335            let _ = p.read_struct_begin(|_| ())?;
2336            loop {
2337                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
2338                match (fty, fid as ::std::primitive::i32) {
2339                    (::fbthrift::TType::Stop, _) => break,
2340                    (::fbthrift::TType::I64, 1) => field_sessionId = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2341                    (::fbthrift::TType::String, 2) => field_stmt = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2342                    (::fbthrift::TType::Map, 3) => field_parameterMap = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2343                    (fty, _) => p.skip(fty)?,
2344                }
2345                p.read_field_end()?;
2346            }
2347            p.read_struct_end()?;
2348            ::std::result::Result::Ok(Self {
2349                sessionId: field_sessionId.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.executeWithParameter", "sessionId"))?,
2350                stmt: field_stmt.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.executeWithParameter", "stmt"))?,
2351                parameterMap: field_parameterMap.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.executeWithParameter", "parameterMap"))?,
2352            })
2353        }
2354    }
2355
2356    struct Args_GraphService_executeJson {
2357        sessionId: ::std::primitive::i64,
2358        stmt: ::std::vec::Vec<::std::primitive::u8>,
2359    }
2360    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphService_executeJson {
2361        #[inline]
2362        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphService.executeJson"))]
2363        fn read(p: &mut P) -> ::anyhow::Result<Self> {
2364            static ARGS: &[::fbthrift::Field] = &[
2365                ::fbthrift::Field::new("sessionId", ::fbthrift::TType::I64, 1),
2366                ::fbthrift::Field::new("stmt", ::fbthrift::TType::String, 2),
2367            ];
2368            let mut field_sessionId = ::std::option::Option::None;
2369            let mut field_stmt = ::std::option::Option::None;
2370            let _ = p.read_struct_begin(|_| ())?;
2371            loop {
2372                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
2373                match (fty, fid as ::std::primitive::i32) {
2374                    (::fbthrift::TType::Stop, _) => break,
2375                    (::fbthrift::TType::I64, 1) => field_sessionId = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2376                    (::fbthrift::TType::String, 2) => field_stmt = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2377                    (fty, _) => p.skip(fty)?,
2378                }
2379                p.read_field_end()?;
2380            }
2381            p.read_struct_end()?;
2382            ::std::result::Result::Ok(Self {
2383                sessionId: field_sessionId.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.executeJson", "sessionId"))?,
2384                stmt: field_stmt.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.executeJson", "stmt"))?,
2385            })
2386        }
2387    }
2388
2389    struct Args_GraphService_executeJsonWithParameter {
2390        sessionId: ::std::primitive::i64,
2391        stmt: ::std::vec::Vec<::std::primitive::u8>,
2392        parameterMap: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
2393    }
2394    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphService_executeJsonWithParameter {
2395        #[inline]
2396        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphService.executeJsonWithParameter"))]
2397        fn read(p: &mut P) -> ::anyhow::Result<Self> {
2398            static ARGS: &[::fbthrift::Field] = &[
2399                ::fbthrift::Field::new("parameterMap", ::fbthrift::TType::Map, 3),
2400                ::fbthrift::Field::new("sessionId", ::fbthrift::TType::I64, 1),
2401                ::fbthrift::Field::new("stmt", ::fbthrift::TType::String, 2),
2402            ];
2403            let mut field_sessionId = ::std::option::Option::None;
2404            let mut field_stmt = ::std::option::Option::None;
2405            let mut field_parameterMap = ::std::option::Option::None;
2406            let _ = p.read_struct_begin(|_| ())?;
2407            loop {
2408                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
2409                match (fty, fid as ::std::primitive::i32) {
2410                    (::fbthrift::TType::Stop, _) => break,
2411                    (::fbthrift::TType::I64, 1) => field_sessionId = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2412                    (::fbthrift::TType::String, 2) => field_stmt = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2413                    (::fbthrift::TType::Map, 3) => field_parameterMap = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2414                    (fty, _) => p.skip(fty)?,
2415                }
2416                p.read_field_end()?;
2417            }
2418            p.read_struct_end()?;
2419            ::std::result::Result::Ok(Self {
2420                sessionId: field_sessionId.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.executeJsonWithParameter", "sessionId"))?,
2421                stmt: field_stmt.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.executeJsonWithParameter", "stmt"))?,
2422                parameterMap: field_parameterMap.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.executeJsonWithParameter", "parameterMap"))?,
2423            })
2424        }
2425    }
2426
2427    struct Args_GraphService_verifyClientVersion {
2428        req: crate::types::VerifyClientVersionReq,
2429    }
2430    impl<P: ::fbthrift::ProtocolReader> ::fbthrift::Deserialize<P> for self::Args_GraphService_verifyClientVersion {
2431        #[inline]
2432        #[::tracing::instrument(skip_all, level = "trace", name = "deserialize_args", fields(method = "GraphService.verifyClientVersion"))]
2433        fn read(p: &mut P) -> ::anyhow::Result<Self> {
2434            static ARGS: &[::fbthrift::Field] = &[
2435                ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1),
2436            ];
2437            let mut field_req = ::std::option::Option::None;
2438            let _ = p.read_struct_begin(|_| ())?;
2439            loop {
2440                let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?;
2441                match (fty, fid as ::std::primitive::i32) {
2442                    (::fbthrift::TType::Stop, _) => break,
2443                    (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?),
2444                    (fty, _) => p.skip(fty)?,
2445                }
2446                p.read_field_end()?;
2447            }
2448            p.read_struct_end()?;
2449            ::std::result::Result::Ok(Self {
2450                req: field_req.ok_or_else(|| ::anyhow::anyhow!("`{}` missing arg `{}`", "GraphService.verifyClientVersion", "req"))?,
2451            })
2452        }
2453    }
2454
2455
2456    impl<P, H, R, RS> GraphServiceProcessor<P, H, R, RS>
2457    where
2458        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
2459        P::Frame: ::std::marker::Send + 'static,
2460        P::Deserializer: ::std::marker::Send,
2461        H: GraphService,
2462        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
2463        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static,
2464        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
2465            + ::std::marker::Send + ::std::marker::Sync,
2466    {
2467        pub fn new(service: H) -> Self {
2468            Self {
2469                service,
2470                supa: ::fbthrift::NullServiceProcessor::new(),
2471                _phantom: ::std::marker::PhantomData,
2472            }
2473        }
2474
2475        pub fn into_inner(self) -> H {
2476            self.service
2477        }
2478
2479        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphService.authenticate"))]
2480        async fn handle_authenticate<'a>(
2481            &'a self,
2482            p: &'a mut P::Deserializer,
2483            req_ctxt: &R,
2484            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
2485            _seqid: ::std::primitive::u32,
2486        ) -> ::anyhow::Result<()> {
2487            use ::const_cstr::const_cstr;
2488            use ::futures::FutureExt as _;
2489
2490            const_cstr! {
2491                SERVICE_NAME = "GraphService";
2492                METHOD_NAME = "GraphService.authenticate";
2493            }
2494            let mut ctx_stack = req_ctxt.get_context_stack(
2495                SERVICE_NAME.as_cstr(),
2496                METHOD_NAME.as_cstr(),
2497            )?;
2498            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
2499            let _args: self::Args_GraphService_authenticate = ::fbthrift::Deserialize::read(p)?;
2500            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
2501                protocol: P::PROTOCOL_ID,
2502                method_name: METHOD_NAME.as_cstr(),
2503                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
2504            })?;
2505            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
2506
2507            let res = ::std::panic::AssertUnwindSafe(
2508                self.service.authenticate(
2509                    _args.username,
2510                    _args.password,
2511                )
2512            )
2513            .catch_unwind()
2514            .await;
2515
2516            // nested results - panic catch on the outside, method on the inside
2517            let res = match res {
2518                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
2519                    ::tracing::info!("success");
2520                    crate::services::graph_service::AuthenticateExn::Success(res)
2521                }
2522                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_service::AuthenticateExn::Success(_))) => {
2523                    panic!(
2524                        "{} attempted to return success via error",
2525                        "authenticate",
2526                    )
2527                }
2528                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
2529                    ::tracing::error!(exception = ?exn);
2530                    exn
2531                }
2532                ::std::result::Result::Err(exn) => {
2533                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphService.authenticate", exn);
2534                    crate::services::graph_service::AuthenticateExn::ApplicationException(aexn)
2535                }
2536            };
2537
2538            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
2539                "authenticate",
2540                METHOD_NAME.as_cstr(),
2541                _seqid,
2542                req_ctxt,
2543                &mut ctx_stack,
2544                res
2545            )?;
2546            reply_state.lock().unwrap().send_reply(env);
2547            Ok(())
2548        }
2549
2550        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphService.signout"))]
2551        async fn handle_signout<'a>(
2552            &'a self,
2553            p: &'a mut P::Deserializer,
2554            req_ctxt: &R,
2555            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
2556            _seqid: ::std::primitive::u32,
2557        ) -> ::anyhow::Result<()> {
2558            use ::const_cstr::const_cstr;
2559            use ::futures::FutureExt as _;
2560
2561            const_cstr! {
2562                SERVICE_NAME = "GraphService";
2563                METHOD_NAME = "GraphService.signout";
2564            }
2565            let mut ctx_stack = req_ctxt.get_context_stack(
2566                SERVICE_NAME.as_cstr(),
2567                METHOD_NAME.as_cstr(),
2568            )?;
2569            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
2570            let _args: self::Args_GraphService_signout = ::fbthrift::Deserialize::read(p)?;
2571            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
2572                protocol: P::PROTOCOL_ID,
2573                method_name: METHOD_NAME.as_cstr(),
2574                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
2575            })?;
2576            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
2577
2578            let res = ::std::panic::AssertUnwindSafe(
2579                self.service.signout(
2580                    _args.sessionId,
2581                )
2582            )
2583            .catch_unwind()
2584            .await;
2585
2586            // nested results - panic catch on the outside, method on the inside
2587            let res = match res {
2588                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
2589                    ::tracing::info!("success");
2590                    crate::services::graph_service::SignoutExn::Success(res)
2591                }
2592                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_service::SignoutExn::Success(_))) => {
2593                    panic!(
2594                        "{} attempted to return success via error",
2595                        "signout",
2596                    )
2597                }
2598                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
2599                    ::tracing::error!(exception = ?exn);
2600                    exn
2601                }
2602                ::std::result::Result::Err(exn) => {
2603                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphService.signout", exn);
2604                    crate::services::graph_service::SignoutExn::ApplicationException(aexn)
2605                }
2606            };
2607
2608            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
2609                "signout",
2610                METHOD_NAME.as_cstr(),
2611                _seqid,
2612                req_ctxt,
2613                &mut ctx_stack,
2614                res
2615            )?;
2616            reply_state.lock().unwrap().send_reply(env);
2617            Ok(())
2618        }
2619
2620        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphService.execute"))]
2621        async fn handle_execute<'a>(
2622            &'a self,
2623            p: &'a mut P::Deserializer,
2624            req_ctxt: &R,
2625            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
2626            _seqid: ::std::primitive::u32,
2627        ) -> ::anyhow::Result<()> {
2628            use ::const_cstr::const_cstr;
2629            use ::futures::FutureExt as _;
2630
2631            const_cstr! {
2632                SERVICE_NAME = "GraphService";
2633                METHOD_NAME = "GraphService.execute";
2634            }
2635            let mut ctx_stack = req_ctxt.get_context_stack(
2636                SERVICE_NAME.as_cstr(),
2637                METHOD_NAME.as_cstr(),
2638            )?;
2639            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
2640            let _args: self::Args_GraphService_execute = ::fbthrift::Deserialize::read(p)?;
2641            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
2642                protocol: P::PROTOCOL_ID,
2643                method_name: METHOD_NAME.as_cstr(),
2644                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
2645            })?;
2646            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
2647
2648            let res = ::std::panic::AssertUnwindSafe(
2649                self.service.execute(
2650                    _args.sessionId,
2651                    _args.stmt,
2652                )
2653            )
2654            .catch_unwind()
2655            .await;
2656
2657            // nested results - panic catch on the outside, method on the inside
2658            let res = match res {
2659                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
2660                    ::tracing::info!("success");
2661                    crate::services::graph_service::ExecuteExn::Success(res)
2662                }
2663                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_service::ExecuteExn::Success(_))) => {
2664                    panic!(
2665                        "{} attempted to return success via error",
2666                        "execute",
2667                    )
2668                }
2669                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
2670                    ::tracing::error!(exception = ?exn);
2671                    exn
2672                }
2673                ::std::result::Result::Err(exn) => {
2674                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphService.execute", exn);
2675                    crate::services::graph_service::ExecuteExn::ApplicationException(aexn)
2676                }
2677            };
2678
2679            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
2680                "execute",
2681                METHOD_NAME.as_cstr(),
2682                _seqid,
2683                req_ctxt,
2684                &mut ctx_stack,
2685                res
2686            )?;
2687            reply_state.lock().unwrap().send_reply(env);
2688            Ok(())
2689        }
2690
2691        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphService.executeWithParameter"))]
2692        async fn handle_executeWithParameter<'a>(
2693            &'a self,
2694            p: &'a mut P::Deserializer,
2695            req_ctxt: &R,
2696            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
2697            _seqid: ::std::primitive::u32,
2698        ) -> ::anyhow::Result<()> {
2699            use ::const_cstr::const_cstr;
2700            use ::futures::FutureExt as _;
2701
2702            const_cstr! {
2703                SERVICE_NAME = "GraphService";
2704                METHOD_NAME = "GraphService.executeWithParameter";
2705            }
2706            let mut ctx_stack = req_ctxt.get_context_stack(
2707                SERVICE_NAME.as_cstr(),
2708                METHOD_NAME.as_cstr(),
2709            )?;
2710            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
2711            let _args: self::Args_GraphService_executeWithParameter = ::fbthrift::Deserialize::read(p)?;
2712            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
2713                protocol: P::PROTOCOL_ID,
2714                method_name: METHOD_NAME.as_cstr(),
2715                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
2716            })?;
2717            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
2718
2719            let res = ::std::panic::AssertUnwindSafe(
2720                self.service.executeWithParameter(
2721                    _args.sessionId,
2722                    _args.stmt,
2723                    _args.parameterMap,
2724                )
2725            )
2726            .catch_unwind()
2727            .await;
2728
2729            // nested results - panic catch on the outside, method on the inside
2730            let res = match res {
2731                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
2732                    ::tracing::info!("success");
2733                    crate::services::graph_service::ExecuteWithParameterExn::Success(res)
2734                }
2735                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_service::ExecuteWithParameterExn::Success(_))) => {
2736                    panic!(
2737                        "{} attempted to return success via error",
2738                        "executeWithParameter",
2739                    )
2740                }
2741                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
2742                    ::tracing::error!(exception = ?exn);
2743                    exn
2744                }
2745                ::std::result::Result::Err(exn) => {
2746                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphService.executeWithParameter", exn);
2747                    crate::services::graph_service::ExecuteWithParameterExn::ApplicationException(aexn)
2748                }
2749            };
2750
2751            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
2752                "executeWithParameter",
2753                METHOD_NAME.as_cstr(),
2754                _seqid,
2755                req_ctxt,
2756                &mut ctx_stack,
2757                res
2758            )?;
2759            reply_state.lock().unwrap().send_reply(env);
2760            Ok(())
2761        }
2762
2763        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphService.executeJson"))]
2764        async fn handle_executeJson<'a>(
2765            &'a self,
2766            p: &'a mut P::Deserializer,
2767            req_ctxt: &R,
2768            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
2769            _seqid: ::std::primitive::u32,
2770        ) -> ::anyhow::Result<()> {
2771            use ::const_cstr::const_cstr;
2772            use ::futures::FutureExt as _;
2773
2774            const_cstr! {
2775                SERVICE_NAME = "GraphService";
2776                METHOD_NAME = "GraphService.executeJson";
2777            }
2778            let mut ctx_stack = req_ctxt.get_context_stack(
2779                SERVICE_NAME.as_cstr(),
2780                METHOD_NAME.as_cstr(),
2781            )?;
2782            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
2783            let _args: self::Args_GraphService_executeJson = ::fbthrift::Deserialize::read(p)?;
2784            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
2785                protocol: P::PROTOCOL_ID,
2786                method_name: METHOD_NAME.as_cstr(),
2787                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
2788            })?;
2789            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
2790
2791            let res = ::std::panic::AssertUnwindSafe(
2792                self.service.executeJson(
2793                    _args.sessionId,
2794                    _args.stmt,
2795                )
2796            )
2797            .catch_unwind()
2798            .await;
2799
2800            // nested results - panic catch on the outside, method on the inside
2801            let res = match res {
2802                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
2803                    ::tracing::info!("success");
2804                    crate::services::graph_service::ExecuteJsonExn::Success(res)
2805                }
2806                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_service::ExecuteJsonExn::Success(_))) => {
2807                    panic!(
2808                        "{} attempted to return success via error",
2809                        "executeJson",
2810                    )
2811                }
2812                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
2813                    ::tracing::error!(exception = ?exn);
2814                    exn
2815                }
2816                ::std::result::Result::Err(exn) => {
2817                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphService.executeJson", exn);
2818                    crate::services::graph_service::ExecuteJsonExn::ApplicationException(aexn)
2819                }
2820            };
2821
2822            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
2823                "executeJson",
2824                METHOD_NAME.as_cstr(),
2825                _seqid,
2826                req_ctxt,
2827                &mut ctx_stack,
2828                res
2829            )?;
2830            reply_state.lock().unwrap().send_reply(env);
2831            Ok(())
2832        }
2833
2834        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphService.executeJsonWithParameter"))]
2835        async fn handle_executeJsonWithParameter<'a>(
2836            &'a self,
2837            p: &'a mut P::Deserializer,
2838            req_ctxt: &R,
2839            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
2840            _seqid: ::std::primitive::u32,
2841        ) -> ::anyhow::Result<()> {
2842            use ::const_cstr::const_cstr;
2843            use ::futures::FutureExt as _;
2844
2845            const_cstr! {
2846                SERVICE_NAME = "GraphService";
2847                METHOD_NAME = "GraphService.executeJsonWithParameter";
2848            }
2849            let mut ctx_stack = req_ctxt.get_context_stack(
2850                SERVICE_NAME.as_cstr(),
2851                METHOD_NAME.as_cstr(),
2852            )?;
2853            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
2854            let _args: self::Args_GraphService_executeJsonWithParameter = ::fbthrift::Deserialize::read(p)?;
2855            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
2856                protocol: P::PROTOCOL_ID,
2857                method_name: METHOD_NAME.as_cstr(),
2858                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
2859            })?;
2860            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
2861
2862            let res = ::std::panic::AssertUnwindSafe(
2863                self.service.executeJsonWithParameter(
2864                    _args.sessionId,
2865                    _args.stmt,
2866                    _args.parameterMap,
2867                )
2868            )
2869            .catch_unwind()
2870            .await;
2871
2872            // nested results - panic catch on the outside, method on the inside
2873            let res = match res {
2874                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
2875                    ::tracing::info!("success");
2876                    crate::services::graph_service::ExecuteJsonWithParameterExn::Success(res)
2877                }
2878                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_service::ExecuteJsonWithParameterExn::Success(_))) => {
2879                    panic!(
2880                        "{} attempted to return success via error",
2881                        "executeJsonWithParameter",
2882                    )
2883                }
2884                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
2885                    ::tracing::error!(exception = ?exn);
2886                    exn
2887                }
2888                ::std::result::Result::Err(exn) => {
2889                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphService.executeJsonWithParameter", exn);
2890                    crate::services::graph_service::ExecuteJsonWithParameterExn::ApplicationException(aexn)
2891                }
2892            };
2893
2894            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
2895                "executeJsonWithParameter",
2896                METHOD_NAME.as_cstr(),
2897                _seqid,
2898                req_ctxt,
2899                &mut ctx_stack,
2900                res
2901            )?;
2902            reply_state.lock().unwrap().send_reply(env);
2903            Ok(())
2904        }
2905
2906        #[::tracing::instrument(skip_all, name = "handler", fields(method = "GraphService.verifyClientVersion"))]
2907        async fn handle_verifyClientVersion<'a>(
2908            &'a self,
2909            p: &'a mut P::Deserializer,
2910            req_ctxt: &R,
2911            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
2912            _seqid: ::std::primitive::u32,
2913        ) -> ::anyhow::Result<()> {
2914            use ::const_cstr::const_cstr;
2915            use ::futures::FutureExt as _;
2916
2917            const_cstr! {
2918                SERVICE_NAME = "GraphService";
2919                METHOD_NAME = "GraphService.verifyClientVersion";
2920            }
2921            let mut ctx_stack = req_ctxt.get_context_stack(
2922                SERVICE_NAME.as_cstr(),
2923                METHOD_NAME.as_cstr(),
2924            )?;
2925            ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?;
2926            let _args: self::Args_GraphService_verifyClientVersion = ::fbthrift::Deserialize::read(p)?;
2927            ::fbthrift::ContextStack::on_read_data(&mut ctx_stack, &::fbthrift::SerializedMessage {
2928                protocol: P::PROTOCOL_ID,
2929                method_name: METHOD_NAME.as_cstr(),
2930                buffer: ::std::marker::PhantomData, // FIXME P::into_buffer(p).reset(),
2931            })?;
2932            ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?;
2933
2934            let res = ::std::panic::AssertUnwindSafe(
2935                self.service.verifyClientVersion(
2936                    _args.req,
2937                )
2938            )
2939            .catch_unwind()
2940            .await;
2941
2942            // nested results - panic catch on the outside, method on the inside
2943            let res = match res {
2944                ::std::result::Result::Ok(::std::result::Result::Ok(res)) => {
2945                    ::tracing::info!("success");
2946                    crate::services::graph_service::VerifyClientVersionExn::Success(res)
2947                }
2948                ::std::result::Result::Ok(::std::result::Result::Err(crate::services::graph_service::VerifyClientVersionExn::Success(_))) => {
2949                    panic!(
2950                        "{} attempted to return success via error",
2951                        "verifyClientVersion",
2952                    )
2953                }
2954                ::std::result::Result::Ok(::std::result::Result::Err(exn)) => {
2955                    ::tracing::error!(exception = ?exn);
2956                    exn
2957                }
2958                ::std::result::Result::Err(exn) => {
2959                    let aexn = ::fbthrift::ApplicationException::handler_panic("GraphService.verifyClientVersion", exn);
2960                    crate::services::graph_service::VerifyClientVersionExn::ApplicationException(aexn)
2961                }
2962            };
2963
2964            let env = ::fbthrift::help::serialize_result_envelope::<P, R, _>(
2965                "verifyClientVersion",
2966                METHOD_NAME.as_cstr(),
2967                _seqid,
2968                req_ctxt,
2969                &mut ctx_stack,
2970                res
2971            )?;
2972            reply_state.lock().unwrap().send_reply(env);
2973            Ok(())
2974        }
2975    }
2976
2977    #[::async_trait::async_trait]
2978    impl<P, H, R, RS> ::fbthrift::ServiceProcessor<P> for GraphServiceProcessor<P, H, R, RS>
2979    where
2980        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
2981        P::Deserializer: ::std::marker::Send,
2982        H: GraphService,
2983        P::Frame: ::std::marker::Send + 'static,
2984        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
2985        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
2986            + ::std::marker::Send + ::std::marker::Sync + 'static,
2987        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
2988    {
2989        type RequestContext = R;
2990        type ReplyState = RS;
2991
2992        #[inline]
2993        fn method_idx(&self, name: &[::std::primitive::u8]) -> ::std::result::Result<::std::primitive::usize, ::fbthrift::ApplicationException> {
2994            match name {
2995                b"authenticate" => ::std::result::Result::Ok(0usize),
2996                b"signout" => ::std::result::Result::Ok(1usize),
2997                b"execute" => ::std::result::Result::Ok(2usize),
2998                b"executeWithParameter" => ::std::result::Result::Ok(3usize),
2999                b"executeJson" => ::std::result::Result::Ok(4usize),
3000                b"executeJsonWithParameter" => ::std::result::Result::Ok(5usize),
3001                b"verifyClientVersion" => ::std::result::Result::Ok(6usize),
3002                _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()),
3003            }
3004        }
3005
3006        #[allow(clippy::match_single_binding)]
3007        async fn handle_method(
3008            &self,
3009            idx: ::std::primitive::usize,
3010            _p: &mut P::Deserializer,
3011            _r: &R,
3012            _reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
3013            _seqid: ::std::primitive::u32,
3014        ) -> ::anyhow::Result<()> {
3015            match idx {
3016                0usize => {
3017                    self.handle_authenticate(_p, _r, _reply_state, _seqid).await
3018                }
3019                1usize => {
3020                    self.handle_signout(_p, _r, _reply_state, _seqid).await
3021                }
3022                2usize => {
3023                    self.handle_execute(_p, _r, _reply_state, _seqid).await
3024                }
3025                3usize => {
3026                    self.handle_executeWithParameter(_p, _r, _reply_state, _seqid).await
3027                }
3028                4usize => {
3029                    self.handle_executeJson(_p, _r, _reply_state, _seqid).await
3030                }
3031                5usize => {
3032                    self.handle_executeJsonWithParameter(_p, _r, _reply_state, _seqid).await
3033                }
3034                6usize => {
3035                    self.handle_verifyClientVersion(_p, _r, _reply_state, _seqid).await
3036                }
3037                bad => panic!(
3038                    "{}: unexpected method idx {}",
3039                    "GraphServiceProcessor",
3040                    bad
3041                ),
3042            }
3043        }
3044
3045        #[allow(clippy::match_single_binding)]
3046        #[inline]
3047        fn create_interaction_idx(&self, name: &str) -> ::anyhow::Result<::std::primitive::usize> {
3048            match name {
3049                _ => ::anyhow::bail!("Unknown interaction"),
3050            }
3051        }
3052
3053        #[allow(clippy::match_single_binding)]
3054        fn handle_create_interaction(
3055            &self,
3056            idx: ::std::primitive::usize,
3057        ) -> ::anyhow::Result<
3058            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + ::std::marker::Send + 'static>
3059        > {
3060            match idx {
3061                bad => panic!(
3062                    "{}: unexpected method idx {}",
3063                    "GraphServiceProcessor",
3064                    bad
3065                ),
3066            }
3067        }
3068    }
3069
3070    #[::async_trait::async_trait]
3071    impl<P, H, R, RS> ::fbthrift::ThriftService<P::Frame> for GraphServiceProcessor<P, H, R, RS>
3072    where
3073        P: ::fbthrift::Protocol + ::std::marker::Send + ::std::marker::Sync + 'static,
3074        P::Deserializer: ::std::marker::Send,
3075        P::Frame: ::std::marker::Send + 'static,
3076        H: GraphService,
3077        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
3078        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = ::fbthrift::ProtocolDecoded<P>>
3079            + ::std::marker::Send + ::std::marker::Sync + 'static,
3080        RS: ::fbthrift::ReplyState<P::Frame, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
3081    {
3082        type Handler = H;
3083        type RequestContext = R;
3084        type ReplyState = RS;
3085
3086        #[tracing::instrument(level="trace", skip_all, fields(service = "GraphService"))]
3087        async fn call(
3088            &self,
3089            req: ::fbthrift::ProtocolDecoded<P>,
3090            req_ctxt: &R,
3091            reply_state: ::std::sync::Arc<::std::sync::Mutex<RS>>,
3092        ) -> ::anyhow::Result<()> {
3093            use ::fbthrift::{BufExt as _, ProtocolReader as _, ServiceProcessor as _};
3094            let mut p = P::deserializer(req);
3095            let (idx, mty, seqid) = p.read_message_begin(|name| self.method_idx(name))?;
3096            if mty != ::fbthrift::MessageType::Call {
3097                return ::std::result::Result::Err(::std::convert::From::from(::fbthrift::ApplicationException::new(
3098                    ::fbthrift::ApplicationExceptionErrorCode::InvalidMessageType,
3099                    format!("message type {:?} not handled", mty)
3100                )));
3101            }
3102            let idx = match idx {
3103                ::std::result::Result::Ok(idx) => idx,
3104                ::std::result::Result::Err(_) => {
3105                    let cur = P::into_buffer(p).reset();
3106                    return self.supa.call(cur, req_ctxt, reply_state).await;
3107                }
3108            };
3109            self.handle_method(idx, &mut p, req_ctxt, reply_state, seqid).await?;
3110            p.read_message_end()?;
3111
3112            Ok(())
3113        }
3114
3115        fn create_interaction(
3116            &self,
3117            name: &str,
3118        ) -> ::anyhow::Result<
3119            ::std::sync::Arc<dyn ::fbthrift::ThriftService<P::Frame, Handler = (), RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>
3120        > {
3121            use ::fbthrift::{ServiceProcessor as _};
3122            let idx = self.create_interaction_idx(name);
3123            let idx = match idx {
3124                ::anyhow::Result::Ok(idx) => idx,
3125                ::anyhow::Result::Err(_) => {
3126                    return self.supa.create_interaction(name);
3127                }
3128            };
3129            self.handle_create_interaction(idx)
3130        }
3131
3132        fn get_method_names(&self) -> &'static [&'static str] {
3133            &[
3134                // from GraphService
3135                "authenticate",
3136                "signout",
3137                "execute",
3138                "executeWithParameter",
3139                "executeJson",
3140                "executeJsonWithParameter",
3141                "verifyClientVersion",
3142            ]
3143        }
3144    }
3145
3146    /// Construct a new instance of a GraphService service.
3147    ///
3148    /// This is called when a new instance of a Thrift service Processor
3149    /// is needed for a particular Thrift protocol.
3150    #[::tracing::instrument(level="debug", skip_all, fields(proto = ?proto))]
3151    pub fn make_GraphService_server<F, H, R, RS>(
3152        proto: ::fbthrift::ProtocolID,
3153        handler: H,
3154    ) -> ::std::result::Result<::std::boxed::Box<dyn ::fbthrift::ThriftService<F, Handler = H, RequestContext = R, ReplyState = RS> + ::std::marker::Send + 'static>, ::fbthrift::ApplicationException>
3155    where
3156        F: ::fbthrift::Framing + ::std::marker::Send + ::std::marker::Sync + 'static,
3157        H: GraphService,
3158        R: ::fbthrift::RequestContext<Name = ::std::ffi::CStr> + ::std::marker::Send + ::std::marker::Sync + 'static,
3159        <R as ::fbthrift::RequestContext>::ContextStack: ::fbthrift::ContextStack<Name = R::Name, Buffer = F::DecBuf> + ::std::marker::Send + ::std::marker::Sync + 'static,
3160        RS: ::fbthrift::ReplyState<F, RequestContext = R> + ::std::marker::Send + ::std::marker::Sync + 'static
3161    {
3162        match proto {
3163            ::fbthrift::ProtocolID::BinaryProtocol => {
3164                ::std::result::Result::Ok(::std::boxed::Box::new(GraphServiceProcessor::<::fbthrift::BinaryProtocol<F>, H, R, RS>::new(handler)))
3165            }
3166            ::fbthrift::ProtocolID::CompactProtocol => {
3167                ::std::result::Result::Ok(::std::boxed::Box::new(GraphServiceProcessor::<::fbthrift::CompactProtocol<F>, H, R, RS>::new(handler)))
3168            }
3169            bad => {
3170                ::tracing::error!(method = "GraphService.", invalid_protocol = ?bad);
3171                ::std::result::Result::Err(::fbthrift::ApplicationException::invalid_protocol(bad))
3172            }
3173        }
3174    }
3175}
3176
3177/// Client mocks. For every service, a struct mock::TheService that implements
3178/// client::TheService.
3179///
3180/// As an example of the generated API, for the following thrift service:
3181///
3182/// ```thrift
3183/// service MyService {
3184///     FunctionResponse myFunction(
3185///         1: FunctionRequest request,
3186///     ) throws {
3187///         1: StorageException s,
3188///         2: NotFoundException n,
3189///     ),
3190///
3191///     // other functions
3192/// }
3193/// ```
3194///
3195/// we would end up with this mock object under crate::mock::MyService:
3196///
3197/// ```
3198/// # const _: &str = stringify! {
3199/// impl crate::client::MyService for MyService<'mock> {...}
3200///
3201/// pub struct MyService<'mock> {
3202///     pub myFunction: myFunction<'mock>,
3203///     // ...
3204/// }
3205///
3206/// impl dyn crate::client::MyService {
3207///     pub fn mock<'mock>() -> MyService<'mock>;
3208/// }
3209///
3210/// impl myFunction<'mock> {
3211///     // directly return the given success response
3212///     pub fn ret(&self, value: FunctionResponse);
3213///
3214///     // invoke closure to compute success response
3215///     pub fn mock(
3216///         &self,
3217///         mock: impl FnMut(FunctionRequest) -> FunctionResponse + Send + Sync + 'mock,
3218///     );
3219///
3220///     // invoke closure to compute response
3221///     pub fn mock_result(
3222///         &self,
3223///         mock: impl FnMut(FunctionRequest) -> Result<FunctionResponse, crate::services::MyService::MyFunctionExn> + Send + Sync + 'mock,
3224///     );
3225///
3226///     // return one of the function's declared exceptions
3227///     pub fn throw<E>(&self, exception: E)
3228///     where
3229///         E: Clone + Into<crate::services::MyService::MyFunctionExn> + Send + Sync + 'mock;
3230/// }
3231///
3232/// impl From<StorageException> for MyFunctionExn {...}
3233/// impl From<NotFoundException> for MyFunctionExn {...}
3234/// # };
3235/// ```
3236///
3237/// The intended usage from a test would be:
3238///
3239/// ```
3240/// # const _: &str = stringify! {
3241/// use std::sync::Arc;
3242/// use thrift_if::client::MyService;
3243///
3244/// #[test]
3245/// fn test_my_client() {
3246///     let mock = Arc::new(<dyn MyService>::mock());
3247///
3248///     // directly return a success response
3249///     let resp = FunctionResponse {...};
3250///     mock.myFunction.ret(resp);
3251///
3252///     // or give a closure to compute the success response
3253///     mock.myFunction.mock(|request| FunctionResponse {...});
3254///
3255///     // or throw one of the function's exceptions
3256///     mock.myFunction.throw(StorageException::ItFailed);
3257///
3258///     // or compute a Result (useful if your exceptions aren't Clone)
3259///     mock.myFunction.mock_result(|request| Err(...));
3260///
3261///     let out = do_the_thing(mock).wait().unwrap();
3262///     assert!(out.what_i_expected());
3263/// }
3264///
3265/// fn do_the_thing(
3266///     client: Arc<dyn MyService + Send + Sync + 'static>,
3267/// ) -> impl Future<Item = Out> {...}
3268/// # };
3269/// ```
3270pub mod mock {
3271    pub struct GraphService<'mock> {
3272        pub authenticate: r#impl::graph_service::authenticate<'mock>,
3273        pub signout: r#impl::graph_service::signout<'mock>,
3274        pub execute: r#impl::graph_service::execute<'mock>,
3275        pub executeWithParameter: r#impl::graph_service::executeWithParameter<'mock>,
3276        pub executeJson: r#impl::graph_service::executeJson<'mock>,
3277        pub executeJsonWithParameter: r#impl::graph_service::executeJsonWithParameter<'mock>,
3278        pub verifyClientVersion: r#impl::graph_service::verifyClientVersion<'mock>,
3279        _marker: ::std::marker::PhantomData<&'mock ()>,
3280    }
3281
3282    impl dyn super::client::GraphService {
3283        pub fn mock<'mock>() -> GraphService<'mock> {
3284            GraphService {
3285                authenticate: r#impl::graph_service::authenticate::unimplemented(),
3286                signout: r#impl::graph_service::signout::unimplemented(),
3287                execute: r#impl::graph_service::execute::unimplemented(),
3288                executeWithParameter: r#impl::graph_service::executeWithParameter::unimplemented(),
3289                executeJson: r#impl::graph_service::executeJson::unimplemented(),
3290                executeJsonWithParameter: r#impl::graph_service::executeJsonWithParameter::unimplemented(),
3291                verifyClientVersion: r#impl::graph_service::verifyClientVersion::unimplemented(),
3292                _marker: ::std::marker::PhantomData,
3293            }
3294        }
3295    }
3296
3297    impl<'mock> super::client::GraphService for GraphService<'mock> {
3298        fn authenticate(
3299            &self,
3300            arg_username: &::std::vec::Vec<::std::primitive::u8>,
3301            arg_password: &::std::vec::Vec<::std::primitive::u8>,
3302        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::AuthResponse, crate::errors::graph_service::AuthenticateError>> {
3303            let mut closure = self.authenticate.closure.lock().unwrap();
3304            let closure: &mut dyn ::std::ops::FnMut(::std::vec::Vec<::std::primitive::u8>, ::std::vec::Vec<::std::primitive::u8>) -> _ = &mut **closure;
3305            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_username.clone(), arg_password.clone())))
3306        }
3307        fn signout(
3308            &self,
3309            arg_sessionId: ::std::primitive::i64,
3310        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::graph_service::SignoutError>> {
3311            let mut closure = self.signout.closure.lock().unwrap();
3312            let closure: &mut dyn ::std::ops::FnMut(::std::primitive::i64) -> _ = &mut **closure;
3313            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_sessionId.clone())))
3314        }
3315        fn execute(
3316            &self,
3317            arg_sessionId: ::std::primitive::i64,
3318            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
3319        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteError>> {
3320            let mut closure = self.execute.closure.lock().unwrap();
3321            let closure: &mut dyn ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>) -> _ = &mut **closure;
3322            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_sessionId.clone(), arg_stmt.clone())))
3323        }
3324        fn executeWithParameter(
3325            &self,
3326            arg_sessionId: ::std::primitive::i64,
3327            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
3328            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
3329        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteWithParameterError>> {
3330            let mut closure = self.executeWithParameter.closure.lock().unwrap();
3331            let closure: &mut dyn ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>, ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>) -> _ = &mut **closure;
3332            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_sessionId.clone(), arg_stmt.clone(), arg_parameterMap.clone())))
3333        }
3334        fn executeJson(
3335            &self,
3336            arg_sessionId: ::std::primitive::i64,
3337            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
3338        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonError>> {
3339            let mut closure = self.executeJson.closure.lock().unwrap();
3340            let closure: &mut dyn ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>) -> _ = &mut **closure;
3341            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_sessionId.clone(), arg_stmt.clone())))
3342        }
3343        fn executeJsonWithParameter(
3344            &self,
3345            arg_sessionId: ::std::primitive::i64,
3346            arg_stmt: &::std::vec::Vec<::std::primitive::u8>,
3347            arg_parameterMap: &::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>,
3348        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonWithParameterError>> {
3349            let mut closure = self.executeJsonWithParameter.closure.lock().unwrap();
3350            let closure: &mut dyn ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>, ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>) -> _ = &mut **closure;
3351            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_sessionId.clone(), arg_stmt.clone(), arg_parameterMap.clone())))
3352        }
3353        fn verifyClientVersion(
3354            &self,
3355            arg_req: &crate::types::VerifyClientVersionReq,
3356        ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<crate::types::VerifyClientVersionResp, crate::errors::graph_service::VerifyClientVersionError>> {
3357            let mut closure = self.verifyClientVersion.closure.lock().unwrap();
3358            let closure: &mut dyn ::std::ops::FnMut(crate::types::VerifyClientVersionReq) -> _ = &mut **closure;
3359            ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone())))
3360        }
3361    }
3362
3363    mod r#impl {
3364        pub mod graph_service {
3365
3366            pub struct authenticate<'mock> {
3367                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
3368                    dyn ::std::ops::FnMut(::std::vec::Vec<::std::primitive::u8>, ::std::vec::Vec<::std::primitive::u8>) -> ::std::result::Result<
3369                        crate::types::AuthResponse,
3370                        crate::errors::graph_service::AuthenticateError,
3371                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
3372                >>,
3373            }
3374
3375            #[allow(clippy::redundant_closure)]
3376            impl<'mock> authenticate<'mock> {
3377                pub fn unimplemented() -> Self {
3378                    Self {
3379                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: ::std::vec::Vec<::std::primitive::u8>, _: ::std::vec::Vec<::std::primitive::u8>| panic!(
3380                            "{}::{} is not mocked",
3381                            "GraphService",
3382                            "authenticate",
3383                        ))),
3384                    }
3385                }
3386
3387                pub fn ret(&self, value: crate::types::AuthResponse) {
3388                    self.mock(move |_: ::std::vec::Vec<::std::primitive::u8>, _: ::std::vec::Vec<::std::primitive::u8>| value.clone());
3389                }
3390
3391                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(::std::vec::Vec<::std::primitive::u8>, ::std::vec::Vec<::std::primitive::u8>) -> crate::types::AuthResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3392                    let mut closure = self.closure.lock().unwrap();
3393                    *closure = ::std::boxed::Box::new(move |username, password| ::std::result::Result::Ok(mock(username, password)));
3394                }
3395
3396                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(::std::vec::Vec<::std::primitive::u8>, ::std::vec::Vec<::std::primitive::u8>) -> ::std::result::Result<crate::types::AuthResponse, crate::errors::graph_service::AuthenticateError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3397                    let mut closure = self.closure.lock().unwrap();
3398                    *closure = ::std::boxed::Box::new(move |username, password| mock(username, password));
3399                }
3400
3401                pub fn throw<E>(&self, exception: E)
3402                where
3403                    E: ::std::convert::Into<crate::errors::graph_service::AuthenticateError>,
3404                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
3405                {
3406                    let mut closure = self.closure.lock().unwrap();
3407                    *closure = ::std::boxed::Box::new(move |_: ::std::vec::Vec<::std::primitive::u8>, _: ::std::vec::Vec<::std::primitive::u8>| ::std::result::Result::Err(exception.clone().into()));
3408                }
3409            }
3410
3411            pub struct signout<'mock> {
3412                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
3413                    dyn ::std::ops::FnMut(::std::primitive::i64) -> ::std::result::Result<
3414                        (),
3415                        crate::errors::graph_service::SignoutError,
3416                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
3417                >>,
3418            }
3419
3420            #[allow(clippy::redundant_closure)]
3421            impl<'mock> signout<'mock> {
3422                pub fn unimplemented() -> Self {
3423                    Self {
3424                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: ::std::primitive::i64| panic!(
3425                            "{}::{} is not mocked",
3426                            "GraphService",
3427                            "signout",
3428                        ))),
3429                    }
3430                }
3431
3432                pub fn ret(&self, value: ()) {
3433                    self.mock(move |_: ::std::primitive::i64| value.clone());
3434                }
3435
3436                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i64) -> () + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3437                    let mut closure = self.closure.lock().unwrap();
3438                    *closure = ::std::boxed::Box::new(move |sessionId| ::std::result::Result::Ok(mock(sessionId)));
3439                }
3440
3441                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i64) -> ::std::result::Result<(), crate::errors::graph_service::SignoutError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3442                    let mut closure = self.closure.lock().unwrap();
3443                    *closure = ::std::boxed::Box::new(move |sessionId| mock(sessionId));
3444                }
3445
3446                pub fn throw<E>(&self, exception: E)
3447                where
3448                    E: ::std::convert::Into<crate::errors::graph_service::SignoutError>,
3449                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
3450                {
3451                    let mut closure = self.closure.lock().unwrap();
3452                    *closure = ::std::boxed::Box::new(move |_: ::std::primitive::i64| ::std::result::Result::Err(exception.clone().into()));
3453                }
3454            }
3455
3456            pub struct execute<'mock> {
3457                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
3458                    dyn ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>) -> ::std::result::Result<
3459                        crate::types::ExecutionResponse,
3460                        crate::errors::graph_service::ExecuteError,
3461                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
3462                >>,
3463            }
3464
3465            #[allow(clippy::redundant_closure)]
3466            impl<'mock> execute<'mock> {
3467                pub fn unimplemented() -> Self {
3468                    Self {
3469                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>| panic!(
3470                            "{}::{} is not mocked",
3471                            "GraphService",
3472                            "execute",
3473                        ))),
3474                    }
3475                }
3476
3477                pub fn ret(&self, value: crate::types::ExecutionResponse) {
3478                    self.mock(move |_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>| value.clone());
3479                }
3480
3481                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>) -> crate::types::ExecutionResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3482                    let mut closure = self.closure.lock().unwrap();
3483                    *closure = ::std::boxed::Box::new(move |sessionId, stmt| ::std::result::Result::Ok(mock(sessionId, stmt)));
3484                }
3485
3486                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>) -> ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3487                    let mut closure = self.closure.lock().unwrap();
3488                    *closure = ::std::boxed::Box::new(move |sessionId, stmt| mock(sessionId, stmt));
3489                }
3490
3491                pub fn throw<E>(&self, exception: E)
3492                where
3493                    E: ::std::convert::Into<crate::errors::graph_service::ExecuteError>,
3494                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
3495                {
3496                    let mut closure = self.closure.lock().unwrap();
3497                    *closure = ::std::boxed::Box::new(move |_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>| ::std::result::Result::Err(exception.clone().into()));
3498                }
3499            }
3500
3501            pub struct executeWithParameter<'mock> {
3502                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
3503                    dyn ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>, ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>) -> ::std::result::Result<
3504                        crate::types::ExecutionResponse,
3505                        crate::errors::graph_service::ExecuteWithParameterError,
3506                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
3507                >>,
3508            }
3509
3510            #[allow(clippy::redundant_closure)]
3511            impl<'mock> executeWithParameter<'mock> {
3512                pub fn unimplemented() -> Self {
3513                    Self {
3514                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>, _: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>| panic!(
3515                            "{}::{} is not mocked",
3516                            "GraphService",
3517                            "executeWithParameter",
3518                        ))),
3519                    }
3520                }
3521
3522                pub fn ret(&self, value: crate::types::ExecutionResponse) {
3523                    self.mock(move |_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>, _: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>| value.clone());
3524                }
3525
3526                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>, ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>) -> crate::types::ExecutionResponse + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3527                    let mut closure = self.closure.lock().unwrap();
3528                    *closure = ::std::boxed::Box::new(move |sessionId, stmt, parameterMap| ::std::result::Result::Ok(mock(sessionId, stmt, parameterMap)));
3529                }
3530
3531                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>, ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>) -> ::std::result::Result<crate::types::ExecutionResponse, crate::errors::graph_service::ExecuteWithParameterError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3532                    let mut closure = self.closure.lock().unwrap();
3533                    *closure = ::std::boxed::Box::new(move |sessionId, stmt, parameterMap| mock(sessionId, stmt, parameterMap));
3534                }
3535
3536                pub fn throw<E>(&self, exception: E)
3537                where
3538                    E: ::std::convert::Into<crate::errors::graph_service::ExecuteWithParameterError>,
3539                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
3540                {
3541                    let mut closure = self.closure.lock().unwrap();
3542                    *closure = ::std::boxed::Box::new(move |_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>, _: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>| ::std::result::Result::Err(exception.clone().into()));
3543                }
3544            }
3545
3546            pub struct executeJson<'mock> {
3547                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
3548                    dyn ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>) -> ::std::result::Result<
3549                        ::std::vec::Vec<::std::primitive::u8>,
3550                        crate::errors::graph_service::ExecuteJsonError,
3551                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
3552                >>,
3553            }
3554
3555            #[allow(clippy::redundant_closure)]
3556            impl<'mock> executeJson<'mock> {
3557                pub fn unimplemented() -> Self {
3558                    Self {
3559                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>| panic!(
3560                            "{}::{} is not mocked",
3561                            "GraphService",
3562                            "executeJson",
3563                        ))),
3564                    }
3565                }
3566
3567                pub fn ret(&self, value: ::std::vec::Vec<::std::primitive::u8>) {
3568                    self.mock(move |_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>| value.clone());
3569                }
3570
3571                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>) -> ::std::vec::Vec<::std::primitive::u8> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3572                    let mut closure = self.closure.lock().unwrap();
3573                    *closure = ::std::boxed::Box::new(move |sessionId, stmt| ::std::result::Result::Ok(mock(sessionId, stmt)));
3574                }
3575
3576                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>) -> ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3577                    let mut closure = self.closure.lock().unwrap();
3578                    *closure = ::std::boxed::Box::new(move |sessionId, stmt| mock(sessionId, stmt));
3579                }
3580
3581                pub fn throw<E>(&self, exception: E)
3582                where
3583                    E: ::std::convert::Into<crate::errors::graph_service::ExecuteJsonError>,
3584                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
3585                {
3586                    let mut closure = self.closure.lock().unwrap();
3587                    *closure = ::std::boxed::Box::new(move |_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>| ::std::result::Result::Err(exception.clone().into()));
3588                }
3589            }
3590
3591            pub struct executeJsonWithParameter<'mock> {
3592                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
3593                    dyn ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>, ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>) -> ::std::result::Result<
3594                        ::std::vec::Vec<::std::primitive::u8>,
3595                        crate::errors::graph_service::ExecuteJsonWithParameterError,
3596                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
3597                >>,
3598            }
3599
3600            #[allow(clippy::redundant_closure)]
3601            impl<'mock> executeJsonWithParameter<'mock> {
3602                pub fn unimplemented() -> Self {
3603                    Self {
3604                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>, _: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>| panic!(
3605                            "{}::{} is not mocked",
3606                            "GraphService",
3607                            "executeJsonWithParameter",
3608                        ))),
3609                    }
3610                }
3611
3612                pub fn ret(&self, value: ::std::vec::Vec<::std::primitive::u8>) {
3613                    self.mock(move |_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>, _: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>| value.clone());
3614                }
3615
3616                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>, ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>) -> ::std::vec::Vec<::std::primitive::u8> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3617                    let mut closure = self.closure.lock().unwrap();
3618                    *closure = ::std::boxed::Box::new(move |sessionId, stmt, parameterMap| ::std::result::Result::Ok(mock(sessionId, stmt, parameterMap)));
3619                }
3620
3621                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(::std::primitive::i64, ::std::vec::Vec<::std::primitive::u8>, ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>) -> ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, crate::errors::graph_service::ExecuteJsonWithParameterError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3622                    let mut closure = self.closure.lock().unwrap();
3623                    *closure = ::std::boxed::Box::new(move |sessionId, stmt, parameterMap| mock(sessionId, stmt, parameterMap));
3624                }
3625
3626                pub fn throw<E>(&self, exception: E)
3627                where
3628                    E: ::std::convert::Into<crate::errors::graph_service::ExecuteJsonWithParameterError>,
3629                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
3630                {
3631                    let mut closure = self.closure.lock().unwrap();
3632                    *closure = ::std::boxed::Box::new(move |_: ::std::primitive::i64, _: ::std::vec::Vec<::std::primitive::u8>, _: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>| ::std::result::Result::Err(exception.clone().into()));
3633                }
3634            }
3635
3636            pub struct verifyClientVersion<'mock> {
3637                pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box<
3638                    dyn ::std::ops::FnMut(crate::types::VerifyClientVersionReq) -> ::std::result::Result<
3639                        crate::types::VerifyClientVersionResp,
3640                        crate::errors::graph_service::VerifyClientVersionError,
3641                    > + ::std::marker::Send + ::std::marker::Sync + 'mock,
3642                >>,
3643            }
3644
3645            #[allow(clippy::redundant_closure)]
3646            impl<'mock> verifyClientVersion<'mock> {
3647                pub fn unimplemented() -> Self {
3648                    Self {
3649                        closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::VerifyClientVersionReq| panic!(
3650                            "{}::{} is not mocked",
3651                            "GraphService",
3652                            "verifyClientVersion",
3653                        ))),
3654                    }
3655                }
3656
3657                pub fn ret(&self, value: crate::types::VerifyClientVersionResp) {
3658                    self.mock(move |_: crate::types::VerifyClientVersionReq| value.clone());
3659                }
3660
3661                pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::VerifyClientVersionReq) -> crate::types::VerifyClientVersionResp + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3662                    let mut closure = self.closure.lock().unwrap();
3663                    *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req)));
3664                }
3665
3666                pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::VerifyClientVersionReq) -> ::std::result::Result<crate::types::VerifyClientVersionResp, crate::errors::graph_service::VerifyClientVersionError> + ::std::marker::Send + ::std::marker::Sync + 'mock) {
3667                    let mut closure = self.closure.lock().unwrap();
3668                    *closure = ::std::boxed::Box::new(move |req| mock(req));
3669                }
3670
3671                pub fn throw<E>(&self, exception: E)
3672                where
3673                    E: ::std::convert::Into<crate::errors::graph_service::VerifyClientVersionError>,
3674                    E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock,
3675                {
3676                    let mut closure = self.closure.lock().unwrap();
3677                    *closure = ::std::boxed::Box::new(move |_: crate::types::VerifyClientVersionReq| ::std::result::Result::Err(exception.clone().into()));
3678                }
3679            }
3680        }
3681    }
3682}
3683
3684/// Error return types.
3685pub mod errors {
3686    /// Errors for GraphService functions.
3687    pub mod graph_service {
3688
3689        pub type AuthenticateError = ::fbthrift::NonthrowingFunctionError;
3690
3691        impl ::std::convert::From<crate::services::graph_service::AuthenticateExn> for
3692            ::std::result::Result<crate::types::AuthResponse, AuthenticateError>
3693        {
3694            fn from(e: crate::services::graph_service::AuthenticateExn) -> Self {
3695                match e {
3696                    crate::services::graph_service::AuthenticateExn::Success(res) => {
3697                        ::std::result::Result::Ok(res)
3698                    }
3699                    crate::services::graph_service::AuthenticateExn::ApplicationException(aexn) =>
3700                        ::std::result::Result::Err(AuthenticateError::ApplicationException(aexn)),
3701                }
3702            }
3703        }
3704
3705        pub type SignoutError = ::fbthrift::NonthrowingFunctionError;
3706
3707        impl ::std::convert::From<crate::services::graph_service::SignoutExn> for
3708            ::std::result::Result<(), SignoutError>
3709        {
3710            fn from(e: crate::services::graph_service::SignoutExn) -> Self {
3711                match e {
3712                    crate::services::graph_service::SignoutExn::Success(res) => {
3713                        ::std::result::Result::Ok(res)
3714                    }
3715                    crate::services::graph_service::SignoutExn::ApplicationException(aexn) =>
3716                        ::std::result::Result::Err(SignoutError::ApplicationException(aexn)),
3717                }
3718            }
3719        }
3720
3721        pub type ExecuteError = ::fbthrift::NonthrowingFunctionError;
3722
3723        impl ::std::convert::From<crate::services::graph_service::ExecuteExn> for
3724            ::std::result::Result<crate::types::ExecutionResponse, ExecuteError>
3725        {
3726            fn from(e: crate::services::graph_service::ExecuteExn) -> Self {
3727                match e {
3728                    crate::services::graph_service::ExecuteExn::Success(res) => {
3729                        ::std::result::Result::Ok(res)
3730                    }
3731                    crate::services::graph_service::ExecuteExn::ApplicationException(aexn) =>
3732                        ::std::result::Result::Err(ExecuteError::ApplicationException(aexn)),
3733                }
3734            }
3735        }
3736
3737        pub type ExecuteWithParameterError = ::fbthrift::NonthrowingFunctionError;
3738
3739        impl ::std::convert::From<crate::services::graph_service::ExecuteWithParameterExn> for
3740            ::std::result::Result<crate::types::ExecutionResponse, ExecuteWithParameterError>
3741        {
3742            fn from(e: crate::services::graph_service::ExecuteWithParameterExn) -> Self {
3743                match e {
3744                    crate::services::graph_service::ExecuteWithParameterExn::Success(res) => {
3745                        ::std::result::Result::Ok(res)
3746                    }
3747                    crate::services::graph_service::ExecuteWithParameterExn::ApplicationException(aexn) =>
3748                        ::std::result::Result::Err(ExecuteWithParameterError::ApplicationException(aexn)),
3749                }
3750            }
3751        }
3752
3753        pub type ExecuteJsonError = ::fbthrift::NonthrowingFunctionError;
3754
3755        impl ::std::convert::From<crate::services::graph_service::ExecuteJsonExn> for
3756            ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, ExecuteJsonError>
3757        {
3758            fn from(e: crate::services::graph_service::ExecuteJsonExn) -> Self {
3759                match e {
3760                    crate::services::graph_service::ExecuteJsonExn::Success(res) => {
3761                        ::std::result::Result::Ok(res)
3762                    }
3763                    crate::services::graph_service::ExecuteJsonExn::ApplicationException(aexn) =>
3764                        ::std::result::Result::Err(ExecuteJsonError::ApplicationException(aexn)),
3765                }
3766            }
3767        }
3768
3769        pub type ExecuteJsonWithParameterError = ::fbthrift::NonthrowingFunctionError;
3770
3771        impl ::std::convert::From<crate::services::graph_service::ExecuteJsonWithParameterExn> for
3772            ::std::result::Result<::std::vec::Vec<::std::primitive::u8>, ExecuteJsonWithParameterError>
3773        {
3774            fn from(e: crate::services::graph_service::ExecuteJsonWithParameterExn) -> Self {
3775                match e {
3776                    crate::services::graph_service::ExecuteJsonWithParameterExn::Success(res) => {
3777                        ::std::result::Result::Ok(res)
3778                    }
3779                    crate::services::graph_service::ExecuteJsonWithParameterExn::ApplicationException(aexn) =>
3780                        ::std::result::Result::Err(ExecuteJsonWithParameterError::ApplicationException(aexn)),
3781                }
3782            }
3783        }
3784
3785        pub type VerifyClientVersionError = ::fbthrift::NonthrowingFunctionError;
3786
3787        impl ::std::convert::From<crate::services::graph_service::VerifyClientVersionExn> for
3788            ::std::result::Result<crate::types::VerifyClientVersionResp, VerifyClientVersionError>
3789        {
3790            fn from(e: crate::services::graph_service::VerifyClientVersionExn) -> Self {
3791                match e {
3792                    crate::services::graph_service::VerifyClientVersionExn::Success(res) => {
3793                        ::std::result::Result::Ok(res)
3794                    }
3795                    crate::services::graph_service::VerifyClientVersionExn::ApplicationException(aexn) =>
3796                        ::std::result::Result::Err(VerifyClientVersionError::ApplicationException(aexn)),
3797                }
3798            }
3799        }
3800
3801    }
3802
3803}