hive/service/rpc/thrift/
t_c_l_i_service.rs

1// Autogenerated by Thrift Compiler (0.19.0)
2// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
3
4#![allow(dead_code)]
5#![allow(unused_imports)]
6#![allow(unused_extern_crates)]
7#![allow(clippy::too_many_arguments, clippy::type_complexity, clippy::vec_box, clippy::wrong_self_convention)]
8#![cfg_attr(rustfmt, rustfmt_skip)]
9
10use std::cell::RefCell;
11use std::collections::{BTreeMap, BTreeSet};
12use std::convert::{From, TryFrom};
13use std::default::Default;
14use std::error::Error;
15use std::fmt;
16use std::fmt::{Display, Formatter};
17use std::rc::Rc;
18
19use thrift::OrderedFloat;
20use thrift::{ApplicationError, ApplicationErrorKind, ProtocolError, ProtocolErrorKind, TThriftClient};
21use thrift::protocol::{TFieldIdentifier, TListIdentifier, TMapIdentifier, TMessageIdentifier, TMessageType, TInputProtocol, TOutputProtocol, TSerializable, TSetIdentifier, TStructIdentifier, TType};
22use thrift::protocol::field_id;
23use thrift::protocol::verify_expected_message_type;
24use thrift::protocol::verify_expected_sequence_number;
25use thrift::protocol::verify_expected_service_call;
26use thrift::protocol::verify_required_field_exists;
27use thrift::server::TProcessor;
28
29#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30pub struct TProtocolVersion(pub i32);
31
32impl TProtocolVersion {
33  pub const HIVE_CLI_SERVICE_PROTOCOL_V1: TProtocolVersion = TProtocolVersion(0);
34  pub const HIVE_CLI_SERVICE_PROTOCOL_V2: TProtocolVersion = TProtocolVersion(1);
35  pub const HIVE_CLI_SERVICE_PROTOCOL_V3: TProtocolVersion = TProtocolVersion(2);
36  pub const HIVE_CLI_SERVICE_PROTOCOL_V4: TProtocolVersion = TProtocolVersion(3);
37  pub const HIVE_CLI_SERVICE_PROTOCOL_V5: TProtocolVersion = TProtocolVersion(4);
38  pub const HIVE_CLI_SERVICE_PROTOCOL_V6: TProtocolVersion = TProtocolVersion(5);
39  pub const HIVE_CLI_SERVICE_PROTOCOL_V7: TProtocolVersion = TProtocolVersion(6);
40  pub const HIVE_CLI_SERVICE_PROTOCOL_V8: TProtocolVersion = TProtocolVersion(7);
41  pub const HIVE_CLI_SERVICE_PROTOCOL_V9: TProtocolVersion = TProtocolVersion(8);
42  pub const HIVE_CLI_SERVICE_PROTOCOL_V10: TProtocolVersion = TProtocolVersion(9);
43  pub const HIVE_CLI_SERVICE_PROTOCOL_V11: TProtocolVersion = TProtocolVersion(10);
44  pub const ENUM_VALUES: &'static [Self] = &[
45    Self::HIVE_CLI_SERVICE_PROTOCOL_V1,
46    Self::HIVE_CLI_SERVICE_PROTOCOL_V2,
47    Self::HIVE_CLI_SERVICE_PROTOCOL_V3,
48    Self::HIVE_CLI_SERVICE_PROTOCOL_V4,
49    Self::HIVE_CLI_SERVICE_PROTOCOL_V5,
50    Self::HIVE_CLI_SERVICE_PROTOCOL_V6,
51    Self::HIVE_CLI_SERVICE_PROTOCOL_V7,
52    Self::HIVE_CLI_SERVICE_PROTOCOL_V8,
53    Self::HIVE_CLI_SERVICE_PROTOCOL_V9,
54    Self::HIVE_CLI_SERVICE_PROTOCOL_V10,
55    Self::HIVE_CLI_SERVICE_PROTOCOL_V11,
56  ];
57}
58
59impl TSerializable for TProtocolVersion {
60  #[allow(clippy::trivially_copy_pass_by_ref)]
61  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
62    o_prot.write_i32(self.0)
63  }
64  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TProtocolVersion> {
65    let enum_value = i_prot.read_i32()?;
66    Ok(TProtocolVersion::from(enum_value))
67  }
68}
69
70impl From<i32> for TProtocolVersion {
71  fn from(i: i32) -> Self {
72    match i {
73      0 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V1,
74      1 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V2,
75      2 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V3,
76      3 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V4,
77      4 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V5,
78      5 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V6,
79      6 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V7,
80      7 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V8,
81      8 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V9,
82      9 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V10,
83      10 => TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V11,
84      _ => TProtocolVersion(i)
85    }
86  }
87}
88
89impl From<&i32> for TProtocolVersion {
90  fn from(i: &i32) -> Self {
91    TProtocolVersion::from(*i)
92  }
93}
94
95impl From<TProtocolVersion> for i32 {
96  fn from(e: TProtocolVersion) -> i32 {
97    e.0
98  }
99}
100
101impl From<&TProtocolVersion> for i32 {
102  fn from(e: &TProtocolVersion) -> i32 {
103    e.0
104  }
105}
106
107#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
108pub struct TTypeId(pub i32);
109
110impl TTypeId {
111  pub const BOOLEAN_TYPE: TTypeId = TTypeId(0);
112  pub const TINYINT_TYPE: TTypeId = TTypeId(1);
113  pub const SMALLINT_TYPE: TTypeId = TTypeId(2);
114  pub const INT_TYPE: TTypeId = TTypeId(3);
115  pub const BIGINT_TYPE: TTypeId = TTypeId(4);
116  pub const FLOAT_TYPE: TTypeId = TTypeId(5);
117  pub const DOUBLE_TYPE: TTypeId = TTypeId(6);
118  pub const STRING_TYPE: TTypeId = TTypeId(7);
119  pub const TIMESTAMP_TYPE: TTypeId = TTypeId(8);
120  pub const BINARY_TYPE: TTypeId = TTypeId(9);
121  pub const ARRAY_TYPE: TTypeId = TTypeId(10);
122  pub const MAP_TYPE: TTypeId = TTypeId(11);
123  pub const STRUCT_TYPE: TTypeId = TTypeId(12);
124  pub const UNION_TYPE: TTypeId = TTypeId(13);
125  pub const USER_DEFINED_TYPE: TTypeId = TTypeId(14);
126  pub const DECIMAL_TYPE: TTypeId = TTypeId(15);
127  pub const NULL_TYPE: TTypeId = TTypeId(16);
128  pub const DATE_TYPE: TTypeId = TTypeId(17);
129  pub const VARCHAR_TYPE: TTypeId = TTypeId(18);
130  pub const CHAR_TYPE: TTypeId = TTypeId(19);
131  pub const INTERVAL_YEAR_MONTH_TYPE: TTypeId = TTypeId(20);
132  pub const INTERVAL_DAY_TIME_TYPE: TTypeId = TTypeId(21);
133  pub const TIMESTAMPLOCALTZ_TYPE: TTypeId = TTypeId(22);
134  pub const ENUM_VALUES: &'static [Self] = &[
135    Self::BOOLEAN_TYPE,
136    Self::TINYINT_TYPE,
137    Self::SMALLINT_TYPE,
138    Self::INT_TYPE,
139    Self::BIGINT_TYPE,
140    Self::FLOAT_TYPE,
141    Self::DOUBLE_TYPE,
142    Self::STRING_TYPE,
143    Self::TIMESTAMP_TYPE,
144    Self::BINARY_TYPE,
145    Self::ARRAY_TYPE,
146    Self::MAP_TYPE,
147    Self::STRUCT_TYPE,
148    Self::UNION_TYPE,
149    Self::USER_DEFINED_TYPE,
150    Self::DECIMAL_TYPE,
151    Self::NULL_TYPE,
152    Self::DATE_TYPE,
153    Self::VARCHAR_TYPE,
154    Self::CHAR_TYPE,
155    Self::INTERVAL_YEAR_MONTH_TYPE,
156    Self::INTERVAL_DAY_TIME_TYPE,
157    Self::TIMESTAMPLOCALTZ_TYPE,
158  ];
159}
160
161impl TSerializable for TTypeId {
162  #[allow(clippy::trivially_copy_pass_by_ref)]
163  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
164    o_prot.write_i32(self.0)
165  }
166  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TTypeId> {
167    let enum_value = i_prot.read_i32()?;
168    Ok(TTypeId::from(enum_value))
169  }
170}
171
172impl From<i32> for TTypeId {
173  fn from(i: i32) -> Self {
174    match i {
175      0 => TTypeId::BOOLEAN_TYPE,
176      1 => TTypeId::TINYINT_TYPE,
177      2 => TTypeId::SMALLINT_TYPE,
178      3 => TTypeId::INT_TYPE,
179      4 => TTypeId::BIGINT_TYPE,
180      5 => TTypeId::FLOAT_TYPE,
181      6 => TTypeId::DOUBLE_TYPE,
182      7 => TTypeId::STRING_TYPE,
183      8 => TTypeId::TIMESTAMP_TYPE,
184      9 => TTypeId::BINARY_TYPE,
185      10 => TTypeId::ARRAY_TYPE,
186      11 => TTypeId::MAP_TYPE,
187      12 => TTypeId::STRUCT_TYPE,
188      13 => TTypeId::UNION_TYPE,
189      14 => TTypeId::USER_DEFINED_TYPE,
190      15 => TTypeId::DECIMAL_TYPE,
191      16 => TTypeId::NULL_TYPE,
192      17 => TTypeId::DATE_TYPE,
193      18 => TTypeId::VARCHAR_TYPE,
194      19 => TTypeId::CHAR_TYPE,
195      20 => TTypeId::INTERVAL_YEAR_MONTH_TYPE,
196      21 => TTypeId::INTERVAL_DAY_TIME_TYPE,
197      22 => TTypeId::TIMESTAMPLOCALTZ_TYPE,
198      _ => TTypeId(i)
199    }
200  }
201}
202
203impl From<&i32> for TTypeId {
204  fn from(i: &i32) -> Self {
205    TTypeId::from(*i)
206  }
207}
208
209impl From<TTypeId> for i32 {
210  fn from(e: TTypeId) -> i32 {
211    e.0
212  }
213}
214
215impl From<&TTypeId> for i32 {
216  fn from(e: &TTypeId) -> i32 {
217    e.0
218  }
219}
220
221#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
222pub struct TStatusCode(pub i32);
223
224impl TStatusCode {
225  pub const SUCCESS_STATUS: TStatusCode = TStatusCode(0);
226  pub const SUCCESS_WITH_INFO_STATUS: TStatusCode = TStatusCode(1);
227  pub const STILL_EXECUTING_STATUS: TStatusCode = TStatusCode(2);
228  pub const ERROR_STATUS: TStatusCode = TStatusCode(3);
229  pub const INVALID_HANDLE_STATUS: TStatusCode = TStatusCode(4);
230  pub const ENUM_VALUES: &'static [Self] = &[
231    Self::SUCCESS_STATUS,
232    Self::SUCCESS_WITH_INFO_STATUS,
233    Self::STILL_EXECUTING_STATUS,
234    Self::ERROR_STATUS,
235    Self::INVALID_HANDLE_STATUS,
236  ];
237}
238
239impl TSerializable for TStatusCode {
240  #[allow(clippy::trivially_copy_pass_by_ref)]
241  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
242    o_prot.write_i32(self.0)
243  }
244  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TStatusCode> {
245    let enum_value = i_prot.read_i32()?;
246    Ok(TStatusCode::from(enum_value))
247  }
248}
249
250impl From<i32> for TStatusCode {
251  fn from(i: i32) -> Self {
252    match i {
253      0 => TStatusCode::SUCCESS_STATUS,
254      1 => TStatusCode::SUCCESS_WITH_INFO_STATUS,
255      2 => TStatusCode::STILL_EXECUTING_STATUS,
256      3 => TStatusCode::ERROR_STATUS,
257      4 => TStatusCode::INVALID_HANDLE_STATUS,
258      _ => TStatusCode(i)
259    }
260  }
261}
262
263impl From<&i32> for TStatusCode {
264  fn from(i: &i32) -> Self {
265    TStatusCode::from(*i)
266  }
267}
268
269impl From<TStatusCode> for i32 {
270  fn from(e: TStatusCode) -> i32 {
271    e.0
272  }
273}
274
275impl From<&TStatusCode> for i32 {
276  fn from(e: &TStatusCode) -> i32 {
277    e.0
278  }
279}
280
281#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
282pub struct TOperationState(pub i32);
283
284impl TOperationState {
285  pub const INITIALIZED_STATE: TOperationState = TOperationState(0);
286  pub const RUNNING_STATE: TOperationState = TOperationState(1);
287  pub const FINISHED_STATE: TOperationState = TOperationState(2);
288  pub const CANCELED_STATE: TOperationState = TOperationState(3);
289  pub const CLOSED_STATE: TOperationState = TOperationState(4);
290  pub const ERROR_STATE: TOperationState = TOperationState(5);
291  pub const UKNOWN_STATE: TOperationState = TOperationState(6);
292  pub const PENDING_STATE: TOperationState = TOperationState(7);
293  pub const TIMEDOUT_STATE: TOperationState = TOperationState(8);
294  pub const ENUM_VALUES: &'static [Self] = &[
295    Self::INITIALIZED_STATE,
296    Self::RUNNING_STATE,
297    Self::FINISHED_STATE,
298    Self::CANCELED_STATE,
299    Self::CLOSED_STATE,
300    Self::ERROR_STATE,
301    Self::UKNOWN_STATE,
302    Self::PENDING_STATE,
303    Self::TIMEDOUT_STATE,
304  ];
305}
306
307impl TSerializable for TOperationState {
308  #[allow(clippy::trivially_copy_pass_by_ref)]
309  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
310    o_prot.write_i32(self.0)
311  }
312  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TOperationState> {
313    let enum_value = i_prot.read_i32()?;
314    Ok(TOperationState::from(enum_value))
315  }
316}
317
318impl From<i32> for TOperationState {
319  fn from(i: i32) -> Self {
320    match i {
321      0 => TOperationState::INITIALIZED_STATE,
322      1 => TOperationState::RUNNING_STATE,
323      2 => TOperationState::FINISHED_STATE,
324      3 => TOperationState::CANCELED_STATE,
325      4 => TOperationState::CLOSED_STATE,
326      5 => TOperationState::ERROR_STATE,
327      6 => TOperationState::UKNOWN_STATE,
328      7 => TOperationState::PENDING_STATE,
329      8 => TOperationState::TIMEDOUT_STATE,
330      _ => TOperationState(i)
331    }
332  }
333}
334
335impl From<&i32> for TOperationState {
336  fn from(i: &i32) -> Self {
337    TOperationState::from(*i)
338  }
339}
340
341impl From<TOperationState> for i32 {
342  fn from(e: TOperationState) -> i32 {
343    e.0
344  }
345}
346
347impl From<&TOperationState> for i32 {
348  fn from(e: &TOperationState) -> i32 {
349    e.0
350  }
351}
352
353#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
354pub struct TOperationType(pub i32);
355
356impl TOperationType {
357  pub const EXECUTE_STATEMENT: TOperationType = TOperationType(0);
358  pub const GET_TYPE_INFO: TOperationType = TOperationType(1);
359  pub const GET_CATALOGS: TOperationType = TOperationType(2);
360  pub const GET_SCHEMAS: TOperationType = TOperationType(3);
361  pub const GET_TABLES: TOperationType = TOperationType(4);
362  pub const GET_TABLE_TYPES: TOperationType = TOperationType(5);
363  pub const GET_COLUMNS: TOperationType = TOperationType(6);
364  pub const GET_FUNCTIONS: TOperationType = TOperationType(7);
365  pub const UNKNOWN: TOperationType = TOperationType(8);
366  pub const PROCEDURAL_SQL: TOperationType = TOperationType(9);
367  pub const ENUM_VALUES: &'static [Self] = &[
368    Self::EXECUTE_STATEMENT,
369    Self::GET_TYPE_INFO,
370    Self::GET_CATALOGS,
371    Self::GET_SCHEMAS,
372    Self::GET_TABLES,
373    Self::GET_TABLE_TYPES,
374    Self::GET_COLUMNS,
375    Self::GET_FUNCTIONS,
376    Self::UNKNOWN,
377    Self::PROCEDURAL_SQL,
378  ];
379}
380
381impl TSerializable for TOperationType {
382  #[allow(clippy::trivially_copy_pass_by_ref)]
383  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
384    o_prot.write_i32(self.0)
385  }
386  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TOperationType> {
387    let enum_value = i_prot.read_i32()?;
388    Ok(TOperationType::from(enum_value))
389  }
390}
391
392impl From<i32> for TOperationType {
393  fn from(i: i32) -> Self {
394    match i {
395      0 => TOperationType::EXECUTE_STATEMENT,
396      1 => TOperationType::GET_TYPE_INFO,
397      2 => TOperationType::GET_CATALOGS,
398      3 => TOperationType::GET_SCHEMAS,
399      4 => TOperationType::GET_TABLES,
400      5 => TOperationType::GET_TABLE_TYPES,
401      6 => TOperationType::GET_COLUMNS,
402      7 => TOperationType::GET_FUNCTIONS,
403      8 => TOperationType::UNKNOWN,
404      9 => TOperationType::PROCEDURAL_SQL,
405      _ => TOperationType(i)
406    }
407  }
408}
409
410impl From<&i32> for TOperationType {
411  fn from(i: &i32) -> Self {
412    TOperationType::from(*i)
413  }
414}
415
416impl From<TOperationType> for i32 {
417  fn from(e: TOperationType) -> i32 {
418    e.0
419  }
420}
421
422impl From<&TOperationType> for i32 {
423  fn from(e: &TOperationType) -> i32 {
424    e.0
425  }
426}
427
428#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
429pub struct TGetInfoType(pub i32);
430
431impl TGetInfoType {
432  pub const CLI_MAX_DRIVER_CONNECTIONS: TGetInfoType = TGetInfoType(0);
433  pub const CLI_MAX_CONCURRENT_ACTIVITIES: TGetInfoType = TGetInfoType(1);
434  pub const CLI_DATA_SOURCE_NAME: TGetInfoType = TGetInfoType(2);
435  pub const CLI_FETCH_DIRECTION: TGetInfoType = TGetInfoType(8);
436  pub const CLI_SERVER_NAME: TGetInfoType = TGetInfoType(13);
437  pub const CLI_SEARCH_PATTERN_ESCAPE: TGetInfoType = TGetInfoType(14);
438  pub const CLI_DBMS_NAME: TGetInfoType = TGetInfoType(17);
439  pub const CLI_DBMS_VER: TGetInfoType = TGetInfoType(18);
440  pub const CLI_ACCESSIBLE_TABLES: TGetInfoType = TGetInfoType(19);
441  pub const CLI_ACCESSIBLE_PROCEDURES: TGetInfoType = TGetInfoType(20);
442  pub const CLI_CURSOR_COMMIT_BEHAVIOR: TGetInfoType = TGetInfoType(23);
443  pub const CLI_DATA_SOURCE_READ_ONLY: TGetInfoType = TGetInfoType(25);
444  pub const CLI_DEFAULT_TXN_ISOLATION: TGetInfoType = TGetInfoType(26);
445  pub const CLI_IDENTIFIER_CASE: TGetInfoType = TGetInfoType(28);
446  pub const CLI_IDENTIFIER_QUOTE_CHAR: TGetInfoType = TGetInfoType(29);
447  pub const CLI_MAX_COLUMN_NAME_LEN: TGetInfoType = TGetInfoType(30);
448  pub const CLI_MAX_CURSOR_NAME_LEN: TGetInfoType = TGetInfoType(31);
449  pub const CLI_MAX_SCHEMA_NAME_LEN: TGetInfoType = TGetInfoType(32);
450  pub const CLI_MAX_CATALOG_NAME_LEN: TGetInfoType = TGetInfoType(34);
451  pub const CLI_MAX_TABLE_NAME_LEN: TGetInfoType = TGetInfoType(35);
452  pub const CLI_SCROLL_CONCURRENCY: TGetInfoType = TGetInfoType(43);
453  pub const CLI_TXN_CAPABLE: TGetInfoType = TGetInfoType(46);
454  pub const CLI_USER_NAME: TGetInfoType = TGetInfoType(47);
455  pub const CLI_TXN_ISOLATION_OPTION: TGetInfoType = TGetInfoType(72);
456  pub const CLI_INTEGRITY: TGetInfoType = TGetInfoType(73);
457  pub const CLI_GETDATA_EXTENSIONS: TGetInfoType = TGetInfoType(81);
458  pub const CLI_NULL_COLLATION: TGetInfoType = TGetInfoType(85);
459  pub const CLI_ALTER_TABLE: TGetInfoType = TGetInfoType(86);
460  pub const CLI_ORDER_BY_COLUMNS_IN_SELECT: TGetInfoType = TGetInfoType(90);
461  pub const CLI_SPECIAL_CHARACTERS: TGetInfoType = TGetInfoType(94);
462  pub const CLI_MAX_COLUMNS_IN_GROUP_BY: TGetInfoType = TGetInfoType(97);
463  pub const CLI_MAX_COLUMNS_IN_INDEX: TGetInfoType = TGetInfoType(98);
464  pub const CLI_MAX_COLUMNS_IN_ORDER_BY: TGetInfoType = TGetInfoType(99);
465  pub const CLI_MAX_COLUMNS_IN_SELECT: TGetInfoType = TGetInfoType(100);
466  pub const CLI_MAX_COLUMNS_IN_TABLE: TGetInfoType = TGetInfoType(101);
467  pub const CLI_MAX_INDEX_SIZE: TGetInfoType = TGetInfoType(102);
468  pub const CLI_MAX_ROW_SIZE: TGetInfoType = TGetInfoType(104);
469  pub const CLI_MAX_STATEMENT_LEN: TGetInfoType = TGetInfoType(105);
470  pub const CLI_MAX_TABLES_IN_SELECT: TGetInfoType = TGetInfoType(106);
471  pub const CLI_MAX_USER_NAME_LEN: TGetInfoType = TGetInfoType(107);
472  pub const CLI_OJ_CAPABILITIES: TGetInfoType = TGetInfoType(115);
473  pub const CLI_XOPEN_CLI_YEAR: TGetInfoType = TGetInfoType(10000);
474  pub const CLI_CURSOR_SENSITIVITY: TGetInfoType = TGetInfoType(10001);
475  pub const CLI_DESCRIBE_PARAMETER: TGetInfoType = TGetInfoType(10002);
476  pub const CLI_CATALOG_NAME: TGetInfoType = TGetInfoType(10003);
477  pub const CLI_COLLATION_SEQ: TGetInfoType = TGetInfoType(10004);
478  pub const CLI_MAX_IDENTIFIER_LEN: TGetInfoType = TGetInfoType(10005);
479  pub const CLI_ODBC_KEYWORDS: TGetInfoType = TGetInfoType(10006);
480  pub const ENUM_VALUES: &'static [Self] = &[
481    Self::CLI_MAX_DRIVER_CONNECTIONS,
482    Self::CLI_MAX_CONCURRENT_ACTIVITIES,
483    Self::CLI_DATA_SOURCE_NAME,
484    Self::CLI_FETCH_DIRECTION,
485    Self::CLI_SERVER_NAME,
486    Self::CLI_SEARCH_PATTERN_ESCAPE,
487    Self::CLI_DBMS_NAME,
488    Self::CLI_DBMS_VER,
489    Self::CLI_ACCESSIBLE_TABLES,
490    Self::CLI_ACCESSIBLE_PROCEDURES,
491    Self::CLI_CURSOR_COMMIT_BEHAVIOR,
492    Self::CLI_DATA_SOURCE_READ_ONLY,
493    Self::CLI_DEFAULT_TXN_ISOLATION,
494    Self::CLI_IDENTIFIER_CASE,
495    Self::CLI_IDENTIFIER_QUOTE_CHAR,
496    Self::CLI_MAX_COLUMN_NAME_LEN,
497    Self::CLI_MAX_CURSOR_NAME_LEN,
498    Self::CLI_MAX_SCHEMA_NAME_LEN,
499    Self::CLI_MAX_CATALOG_NAME_LEN,
500    Self::CLI_MAX_TABLE_NAME_LEN,
501    Self::CLI_SCROLL_CONCURRENCY,
502    Self::CLI_TXN_CAPABLE,
503    Self::CLI_USER_NAME,
504    Self::CLI_TXN_ISOLATION_OPTION,
505    Self::CLI_INTEGRITY,
506    Self::CLI_GETDATA_EXTENSIONS,
507    Self::CLI_NULL_COLLATION,
508    Self::CLI_ALTER_TABLE,
509    Self::CLI_ORDER_BY_COLUMNS_IN_SELECT,
510    Self::CLI_SPECIAL_CHARACTERS,
511    Self::CLI_MAX_COLUMNS_IN_GROUP_BY,
512    Self::CLI_MAX_COLUMNS_IN_INDEX,
513    Self::CLI_MAX_COLUMNS_IN_ORDER_BY,
514    Self::CLI_MAX_COLUMNS_IN_SELECT,
515    Self::CLI_MAX_COLUMNS_IN_TABLE,
516    Self::CLI_MAX_INDEX_SIZE,
517    Self::CLI_MAX_ROW_SIZE,
518    Self::CLI_MAX_STATEMENT_LEN,
519    Self::CLI_MAX_TABLES_IN_SELECT,
520    Self::CLI_MAX_USER_NAME_LEN,
521    Self::CLI_OJ_CAPABILITIES,
522    Self::CLI_XOPEN_CLI_YEAR,
523    Self::CLI_CURSOR_SENSITIVITY,
524    Self::CLI_DESCRIBE_PARAMETER,
525    Self::CLI_CATALOG_NAME,
526    Self::CLI_COLLATION_SEQ,
527    Self::CLI_MAX_IDENTIFIER_LEN,
528    Self::CLI_ODBC_KEYWORDS,
529  ];
530}
531
532impl TSerializable for TGetInfoType {
533  #[allow(clippy::trivially_copy_pass_by_ref)]
534  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
535    o_prot.write_i32(self.0)
536  }
537  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetInfoType> {
538    let enum_value = i_prot.read_i32()?;
539    Ok(TGetInfoType::from(enum_value))
540  }
541}
542
543impl From<i32> for TGetInfoType {
544  fn from(i: i32) -> Self {
545    match i {
546      0 => TGetInfoType::CLI_MAX_DRIVER_CONNECTIONS,
547      1 => TGetInfoType::CLI_MAX_CONCURRENT_ACTIVITIES,
548      2 => TGetInfoType::CLI_DATA_SOURCE_NAME,
549      8 => TGetInfoType::CLI_FETCH_DIRECTION,
550      13 => TGetInfoType::CLI_SERVER_NAME,
551      14 => TGetInfoType::CLI_SEARCH_PATTERN_ESCAPE,
552      17 => TGetInfoType::CLI_DBMS_NAME,
553      18 => TGetInfoType::CLI_DBMS_VER,
554      19 => TGetInfoType::CLI_ACCESSIBLE_TABLES,
555      20 => TGetInfoType::CLI_ACCESSIBLE_PROCEDURES,
556      23 => TGetInfoType::CLI_CURSOR_COMMIT_BEHAVIOR,
557      25 => TGetInfoType::CLI_DATA_SOURCE_READ_ONLY,
558      26 => TGetInfoType::CLI_DEFAULT_TXN_ISOLATION,
559      28 => TGetInfoType::CLI_IDENTIFIER_CASE,
560      29 => TGetInfoType::CLI_IDENTIFIER_QUOTE_CHAR,
561      30 => TGetInfoType::CLI_MAX_COLUMN_NAME_LEN,
562      31 => TGetInfoType::CLI_MAX_CURSOR_NAME_LEN,
563      32 => TGetInfoType::CLI_MAX_SCHEMA_NAME_LEN,
564      34 => TGetInfoType::CLI_MAX_CATALOG_NAME_LEN,
565      35 => TGetInfoType::CLI_MAX_TABLE_NAME_LEN,
566      43 => TGetInfoType::CLI_SCROLL_CONCURRENCY,
567      46 => TGetInfoType::CLI_TXN_CAPABLE,
568      47 => TGetInfoType::CLI_USER_NAME,
569      72 => TGetInfoType::CLI_TXN_ISOLATION_OPTION,
570      73 => TGetInfoType::CLI_INTEGRITY,
571      81 => TGetInfoType::CLI_GETDATA_EXTENSIONS,
572      85 => TGetInfoType::CLI_NULL_COLLATION,
573      86 => TGetInfoType::CLI_ALTER_TABLE,
574      90 => TGetInfoType::CLI_ORDER_BY_COLUMNS_IN_SELECT,
575      94 => TGetInfoType::CLI_SPECIAL_CHARACTERS,
576      97 => TGetInfoType::CLI_MAX_COLUMNS_IN_GROUP_BY,
577      98 => TGetInfoType::CLI_MAX_COLUMNS_IN_INDEX,
578      99 => TGetInfoType::CLI_MAX_COLUMNS_IN_ORDER_BY,
579      100 => TGetInfoType::CLI_MAX_COLUMNS_IN_SELECT,
580      101 => TGetInfoType::CLI_MAX_COLUMNS_IN_TABLE,
581      102 => TGetInfoType::CLI_MAX_INDEX_SIZE,
582      104 => TGetInfoType::CLI_MAX_ROW_SIZE,
583      105 => TGetInfoType::CLI_MAX_STATEMENT_LEN,
584      106 => TGetInfoType::CLI_MAX_TABLES_IN_SELECT,
585      107 => TGetInfoType::CLI_MAX_USER_NAME_LEN,
586      115 => TGetInfoType::CLI_OJ_CAPABILITIES,
587      10000 => TGetInfoType::CLI_XOPEN_CLI_YEAR,
588      10001 => TGetInfoType::CLI_CURSOR_SENSITIVITY,
589      10002 => TGetInfoType::CLI_DESCRIBE_PARAMETER,
590      10003 => TGetInfoType::CLI_CATALOG_NAME,
591      10004 => TGetInfoType::CLI_COLLATION_SEQ,
592      10005 => TGetInfoType::CLI_MAX_IDENTIFIER_LEN,
593      10006 => TGetInfoType::CLI_ODBC_KEYWORDS,
594      _ => TGetInfoType(i)
595    }
596  }
597}
598
599impl From<&i32> for TGetInfoType {
600  fn from(i: &i32) -> Self {
601    TGetInfoType::from(*i)
602  }
603}
604
605impl From<TGetInfoType> for i32 {
606  fn from(e: TGetInfoType) -> i32 {
607    e.0
608  }
609}
610
611impl From<&TGetInfoType> for i32 {
612  fn from(e: &TGetInfoType) -> i32 {
613    e.0
614  }
615}
616
617#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
618pub struct TFetchOrientation(pub i32);
619
620impl TFetchOrientation {
621  pub const FETCH_NEXT: TFetchOrientation = TFetchOrientation(0);
622  pub const FETCH_PRIOR: TFetchOrientation = TFetchOrientation(1);
623  pub const FETCH_RELATIVE: TFetchOrientation = TFetchOrientation(2);
624  pub const FETCH_ABSOLUTE: TFetchOrientation = TFetchOrientation(3);
625  pub const FETCH_FIRST: TFetchOrientation = TFetchOrientation(4);
626  pub const FETCH_LAST: TFetchOrientation = TFetchOrientation(5);
627  pub const ENUM_VALUES: &'static [Self] = &[
628    Self::FETCH_NEXT,
629    Self::FETCH_PRIOR,
630    Self::FETCH_RELATIVE,
631    Self::FETCH_ABSOLUTE,
632    Self::FETCH_FIRST,
633    Self::FETCH_LAST,
634  ];
635}
636
637impl TSerializable for TFetchOrientation {
638  #[allow(clippy::trivially_copy_pass_by_ref)]
639  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
640    o_prot.write_i32(self.0)
641  }
642  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TFetchOrientation> {
643    let enum_value = i_prot.read_i32()?;
644    Ok(TFetchOrientation::from(enum_value))
645  }
646}
647
648impl From<i32> for TFetchOrientation {
649  fn from(i: i32) -> Self {
650    match i {
651      0 => TFetchOrientation::FETCH_NEXT,
652      1 => TFetchOrientation::FETCH_PRIOR,
653      2 => TFetchOrientation::FETCH_RELATIVE,
654      3 => TFetchOrientation::FETCH_ABSOLUTE,
655      4 => TFetchOrientation::FETCH_FIRST,
656      5 => TFetchOrientation::FETCH_LAST,
657      _ => TFetchOrientation(i)
658    }
659  }
660}
661
662impl From<&i32> for TFetchOrientation {
663  fn from(i: &i32) -> Self {
664    TFetchOrientation::from(*i)
665  }
666}
667
668impl From<TFetchOrientation> for i32 {
669  fn from(e: TFetchOrientation) -> i32 {
670    e.0
671  }
672}
673
674impl From<&TFetchOrientation> for i32 {
675  fn from(e: &TFetchOrientation) -> i32 {
676    e.0
677  }
678}
679
680#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
681pub struct TJobExecutionStatus(pub i32);
682
683impl TJobExecutionStatus {
684  pub const IN_PROGRESS: TJobExecutionStatus = TJobExecutionStatus(0);
685  pub const COMPLETE: TJobExecutionStatus = TJobExecutionStatus(1);
686  pub const NOT_AVAILABLE: TJobExecutionStatus = TJobExecutionStatus(2);
687  pub const ENUM_VALUES: &'static [Self] = &[
688    Self::IN_PROGRESS,
689    Self::COMPLETE,
690    Self::NOT_AVAILABLE,
691  ];
692}
693
694impl TSerializable for TJobExecutionStatus {
695  #[allow(clippy::trivially_copy_pass_by_ref)]
696  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
697    o_prot.write_i32(self.0)
698  }
699  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TJobExecutionStatus> {
700    let enum_value = i_prot.read_i32()?;
701    Ok(TJobExecutionStatus::from(enum_value))
702  }
703}
704
705impl From<i32> for TJobExecutionStatus {
706  fn from(i: i32) -> Self {
707    match i {
708      0 => TJobExecutionStatus::IN_PROGRESS,
709      1 => TJobExecutionStatus::COMPLETE,
710      2 => TJobExecutionStatus::NOT_AVAILABLE,
711      _ => TJobExecutionStatus(i)
712    }
713  }
714}
715
716impl From<&i32> for TJobExecutionStatus {
717  fn from(i: &i32) -> Self {
718    TJobExecutionStatus::from(*i)
719  }
720}
721
722impl From<TJobExecutionStatus> for i32 {
723  fn from(e: TJobExecutionStatus) -> i32 {
724    e.0
725  }
726}
727
728impl From<&TJobExecutionStatus> for i32 {
729  fn from(e: &TJobExecutionStatus) -> i32 {
730    e.0
731  }
732}
733
734pub type TTypeEntryPtr = i32;
735
736pub type TIdentifier = String;
737
738pub type TPattern = String;
739
740pub type TPatternOrIdentifier = String;
741
742//
743// TTypeQualifierValue
744//
745
746#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
747pub enum TTypeQualifierValue {
748  I32Value(i32),
749  StringValue(String),
750}
751
752impl TSerializable for TTypeQualifierValue {
753  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TTypeQualifierValue> {
754    let mut ret: Option<TTypeQualifierValue> = None;
755    let mut received_field_count = 0;
756    i_prot.read_struct_begin()?;
757    loop {
758      let field_ident = i_prot.read_field_begin()?;
759      if field_ident.field_type == TType::Stop {
760        break;
761      }
762      let field_id = field_id(&field_ident)?;
763      match field_id {
764        1 => {
765          let val = i_prot.read_i32()?;
766          if ret.is_none() {
767            ret = Some(TTypeQualifierValue::I32Value(val));
768          }
769          received_field_count += 1;
770        },
771        2 => {
772          let val = i_prot.read_string()?;
773          if ret.is_none() {
774            ret = Some(TTypeQualifierValue::StringValue(val));
775          }
776          received_field_count += 1;
777        },
778        _ => {
779          i_prot.skip(field_ident.field_type)?;
780          received_field_count += 1;
781        },
782      };
783      i_prot.read_field_end()?;
784    }
785    i_prot.read_struct_end()?;
786    if received_field_count == 0 {
787      Err(
788        thrift::Error::Protocol(
789          ProtocolError::new(
790            ProtocolErrorKind::InvalidData,
791            "received empty union from remote TTypeQualifierValue"
792          )
793        )
794      )
795    } else if received_field_count > 1 {
796      Err(
797        thrift::Error::Protocol(
798          ProtocolError::new(
799            ProtocolErrorKind::InvalidData,
800            "received multiple fields for union from remote TTypeQualifierValue"
801          )
802        )
803      )
804    } else {
805      Ok(ret.expect("return value should have been constructed"))
806    }
807  }
808  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
809    let struct_ident = TStructIdentifier::new("TTypeQualifierValue");
810    o_prot.write_struct_begin(&struct_ident)?;
811    match *self {
812      TTypeQualifierValue::I32Value(f) => {
813        o_prot.write_field_begin(&TFieldIdentifier::new("i32Value", TType::I32, 1))?;
814        o_prot.write_i32(f)?;
815        o_prot.write_field_end()?;
816      },
817      TTypeQualifierValue::StringValue(ref f) => {
818        o_prot.write_field_begin(&TFieldIdentifier::new("stringValue", TType::String, 2))?;
819        o_prot.write_string(f)?;
820        o_prot.write_field_end()?;
821      },
822    }
823    o_prot.write_field_stop()?;
824    o_prot.write_struct_end()
825  }
826}
827
828//
829// TTypeQualifiers
830//
831
832#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
833pub struct TTypeQualifiers {
834  pub qualifiers: BTreeMap<String, TTypeQualifierValue>,
835}
836
837impl TTypeQualifiers {
838  pub fn new(qualifiers: BTreeMap<String, TTypeQualifierValue>) -> TTypeQualifiers {
839    TTypeQualifiers {
840      qualifiers,
841    }
842  }
843}
844
845impl TSerializable for TTypeQualifiers {
846  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TTypeQualifiers> {
847    i_prot.read_struct_begin()?;
848    let mut f_1: Option<BTreeMap<String, TTypeQualifierValue>> = None;
849    loop {
850      let field_ident = i_prot.read_field_begin()?;
851      if field_ident.field_type == TType::Stop {
852        break;
853      }
854      let field_id = field_id(&field_ident)?;
855      match field_id {
856        1 => {
857          let map_ident = i_prot.read_map_begin()?;
858          let mut val: BTreeMap<String, TTypeQualifierValue> = BTreeMap::new();
859          for _ in 0..map_ident.size {
860            let map_key_0 = i_prot.read_string()?;
861            let map_val_1 = TTypeQualifierValue::read_from_in_protocol(i_prot)?;
862            val.insert(map_key_0, map_val_1);
863          }
864          i_prot.read_map_end()?;
865          f_1 = Some(val);
866        },
867        _ => {
868          i_prot.skip(field_ident.field_type)?;
869        },
870      };
871      i_prot.read_field_end()?;
872    }
873    i_prot.read_struct_end()?;
874    verify_required_field_exists("TTypeQualifiers.qualifiers", &f_1)?;
875    let ret = TTypeQualifiers {
876      qualifiers: f_1.expect("auto-generated code should have checked for presence of required fields"),
877    };
878    Ok(ret)
879  }
880  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
881    let struct_ident = TStructIdentifier::new("TTypeQualifiers");
882    o_prot.write_struct_begin(&struct_ident)?;
883    o_prot.write_field_begin(&TFieldIdentifier::new("qualifiers", TType::Map, 1))?;
884    o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::Struct, self.qualifiers.len() as i32))?;
885    for (k, v) in &self.qualifiers {
886      o_prot.write_string(k)?;
887      v.write_to_out_protocol(o_prot)?;
888    }
889    o_prot.write_map_end()?;
890    o_prot.write_field_end()?;
891    o_prot.write_field_stop()?;
892    o_prot.write_struct_end()
893  }
894}
895
896//
897// TPrimitiveTypeEntry
898//
899
900#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
901pub struct TPrimitiveTypeEntry {
902  pub type_: TTypeId,
903  pub type_qualifiers: Option<TTypeQualifiers>,
904}
905
906impl TPrimitiveTypeEntry {
907  pub fn new<F2>(type_: TTypeId, type_qualifiers: F2) -> TPrimitiveTypeEntry where F2: Into<Option<TTypeQualifiers>> {
908    TPrimitiveTypeEntry {
909      type_,
910      type_qualifiers: type_qualifiers.into(),
911    }
912  }
913}
914
915impl TSerializable for TPrimitiveTypeEntry {
916  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TPrimitiveTypeEntry> {
917    i_prot.read_struct_begin()?;
918    let mut f_1: Option<TTypeId> = None;
919    let mut f_2: Option<TTypeQualifiers> = None;
920    loop {
921      let field_ident = i_prot.read_field_begin()?;
922      if field_ident.field_type == TType::Stop {
923        break;
924      }
925      let field_id = field_id(&field_ident)?;
926      match field_id {
927        1 => {
928          let val = TTypeId::read_from_in_protocol(i_prot)?;
929          f_1 = Some(val);
930        },
931        2 => {
932          let val = TTypeQualifiers::read_from_in_protocol(i_prot)?;
933          f_2 = Some(val);
934        },
935        _ => {
936          i_prot.skip(field_ident.field_type)?;
937        },
938      };
939      i_prot.read_field_end()?;
940    }
941    i_prot.read_struct_end()?;
942    verify_required_field_exists("TPrimitiveTypeEntry.type_", &f_1)?;
943    let ret = TPrimitiveTypeEntry {
944      type_: f_1.expect("auto-generated code should have checked for presence of required fields"),
945      type_qualifiers: f_2,
946    };
947    Ok(ret)
948  }
949  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
950    let struct_ident = TStructIdentifier::new("TPrimitiveTypeEntry");
951    o_prot.write_struct_begin(&struct_ident)?;
952    o_prot.write_field_begin(&TFieldIdentifier::new("type", TType::I32, 1))?;
953    self.type_.write_to_out_protocol(o_prot)?;
954    o_prot.write_field_end()?;
955    if let Some(ref fld_var) = self.type_qualifiers {
956      o_prot.write_field_begin(&TFieldIdentifier::new("typeQualifiers", TType::Struct, 2))?;
957      fld_var.write_to_out_protocol(o_prot)?;
958      o_prot.write_field_end()?
959    }
960    o_prot.write_field_stop()?;
961    o_prot.write_struct_end()
962  }
963}
964
965//
966// TArrayTypeEntry
967//
968
969#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
970pub struct TArrayTypeEntry {
971  pub object_type_ptr: TTypeEntryPtr,
972}
973
974impl TArrayTypeEntry {
975  pub fn new(object_type_ptr: TTypeEntryPtr) -> TArrayTypeEntry {
976    TArrayTypeEntry {
977      object_type_ptr,
978    }
979  }
980}
981
982impl TSerializable for TArrayTypeEntry {
983  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TArrayTypeEntry> {
984    i_prot.read_struct_begin()?;
985    let mut f_1: Option<TTypeEntryPtr> = None;
986    loop {
987      let field_ident = i_prot.read_field_begin()?;
988      if field_ident.field_type == TType::Stop {
989        break;
990      }
991      let field_id = field_id(&field_ident)?;
992      match field_id {
993        1 => {
994          let val = i_prot.read_i32()?;
995          f_1 = Some(val);
996        },
997        _ => {
998          i_prot.skip(field_ident.field_type)?;
999        },
1000      };
1001      i_prot.read_field_end()?;
1002    }
1003    i_prot.read_struct_end()?;
1004    verify_required_field_exists("TArrayTypeEntry.object_type_ptr", &f_1)?;
1005    let ret = TArrayTypeEntry {
1006      object_type_ptr: f_1.expect("auto-generated code should have checked for presence of required fields"),
1007    };
1008    Ok(ret)
1009  }
1010  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1011    let struct_ident = TStructIdentifier::new("TArrayTypeEntry");
1012    o_prot.write_struct_begin(&struct_ident)?;
1013    o_prot.write_field_begin(&TFieldIdentifier::new("objectTypePtr", TType::I32, 1))?;
1014    o_prot.write_i32(self.object_type_ptr)?;
1015    o_prot.write_field_end()?;
1016    o_prot.write_field_stop()?;
1017    o_prot.write_struct_end()
1018  }
1019}
1020
1021//
1022// TMapTypeEntry
1023//
1024
1025#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1026pub struct TMapTypeEntry {
1027  pub key_type_ptr: TTypeEntryPtr,
1028  pub value_type_ptr: TTypeEntryPtr,
1029}
1030
1031impl TMapTypeEntry {
1032  pub fn new(key_type_ptr: TTypeEntryPtr, value_type_ptr: TTypeEntryPtr) -> TMapTypeEntry {
1033    TMapTypeEntry {
1034      key_type_ptr,
1035      value_type_ptr,
1036    }
1037  }
1038}
1039
1040impl TSerializable for TMapTypeEntry {
1041  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TMapTypeEntry> {
1042    i_prot.read_struct_begin()?;
1043    let mut f_1: Option<TTypeEntryPtr> = None;
1044    let mut f_2: Option<TTypeEntryPtr> = None;
1045    loop {
1046      let field_ident = i_prot.read_field_begin()?;
1047      if field_ident.field_type == TType::Stop {
1048        break;
1049      }
1050      let field_id = field_id(&field_ident)?;
1051      match field_id {
1052        1 => {
1053          let val = i_prot.read_i32()?;
1054          f_1 = Some(val);
1055        },
1056        2 => {
1057          let val = i_prot.read_i32()?;
1058          f_2 = Some(val);
1059        },
1060        _ => {
1061          i_prot.skip(field_ident.field_type)?;
1062        },
1063      };
1064      i_prot.read_field_end()?;
1065    }
1066    i_prot.read_struct_end()?;
1067    verify_required_field_exists("TMapTypeEntry.key_type_ptr", &f_1)?;
1068    verify_required_field_exists("TMapTypeEntry.value_type_ptr", &f_2)?;
1069    let ret = TMapTypeEntry {
1070      key_type_ptr: f_1.expect("auto-generated code should have checked for presence of required fields"),
1071      value_type_ptr: f_2.expect("auto-generated code should have checked for presence of required fields"),
1072    };
1073    Ok(ret)
1074  }
1075  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1076    let struct_ident = TStructIdentifier::new("TMapTypeEntry");
1077    o_prot.write_struct_begin(&struct_ident)?;
1078    o_prot.write_field_begin(&TFieldIdentifier::new("keyTypePtr", TType::I32, 1))?;
1079    o_prot.write_i32(self.key_type_ptr)?;
1080    o_prot.write_field_end()?;
1081    o_prot.write_field_begin(&TFieldIdentifier::new("valueTypePtr", TType::I32, 2))?;
1082    o_prot.write_i32(self.value_type_ptr)?;
1083    o_prot.write_field_end()?;
1084    o_prot.write_field_stop()?;
1085    o_prot.write_struct_end()
1086  }
1087}
1088
1089//
1090// TStructTypeEntry
1091//
1092
1093#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1094pub struct TStructTypeEntry {
1095  pub name_to_type_ptr: BTreeMap<String, TTypeEntryPtr>,
1096}
1097
1098impl TStructTypeEntry {
1099  pub fn new(name_to_type_ptr: BTreeMap<String, TTypeEntryPtr>) -> TStructTypeEntry {
1100    TStructTypeEntry {
1101      name_to_type_ptr,
1102    }
1103  }
1104}
1105
1106impl TSerializable for TStructTypeEntry {
1107  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TStructTypeEntry> {
1108    i_prot.read_struct_begin()?;
1109    let mut f_1: Option<BTreeMap<String, TTypeEntryPtr>> = None;
1110    loop {
1111      let field_ident = i_prot.read_field_begin()?;
1112      if field_ident.field_type == TType::Stop {
1113        break;
1114      }
1115      let field_id = field_id(&field_ident)?;
1116      match field_id {
1117        1 => {
1118          let map_ident = i_prot.read_map_begin()?;
1119          let mut val: BTreeMap<String, TTypeEntryPtr> = BTreeMap::new();
1120          for _ in 0..map_ident.size {
1121            let map_key_2 = i_prot.read_string()?;
1122            let map_val_3 = i_prot.read_i32()?;
1123            val.insert(map_key_2, map_val_3);
1124          }
1125          i_prot.read_map_end()?;
1126          f_1 = Some(val);
1127        },
1128        _ => {
1129          i_prot.skip(field_ident.field_type)?;
1130        },
1131      };
1132      i_prot.read_field_end()?;
1133    }
1134    i_prot.read_struct_end()?;
1135    verify_required_field_exists("TStructTypeEntry.name_to_type_ptr", &f_1)?;
1136    let ret = TStructTypeEntry {
1137      name_to_type_ptr: f_1.expect("auto-generated code should have checked for presence of required fields"),
1138    };
1139    Ok(ret)
1140  }
1141  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1142    let struct_ident = TStructIdentifier::new("TStructTypeEntry");
1143    o_prot.write_struct_begin(&struct_ident)?;
1144    o_prot.write_field_begin(&TFieldIdentifier::new("nameToTypePtr", TType::Map, 1))?;
1145    o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::I32, self.name_to_type_ptr.len() as i32))?;
1146    for (k, v) in &self.name_to_type_ptr {
1147      o_prot.write_string(k)?;
1148      o_prot.write_i32(*v)?;
1149    }
1150    o_prot.write_map_end()?;
1151    o_prot.write_field_end()?;
1152    o_prot.write_field_stop()?;
1153    o_prot.write_struct_end()
1154  }
1155}
1156
1157//
1158// TUnionTypeEntry
1159//
1160
1161#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1162pub struct TUnionTypeEntry {
1163  pub name_to_type_ptr: BTreeMap<String, TTypeEntryPtr>,
1164}
1165
1166impl TUnionTypeEntry {
1167  pub fn new(name_to_type_ptr: BTreeMap<String, TTypeEntryPtr>) -> TUnionTypeEntry {
1168    TUnionTypeEntry {
1169      name_to_type_ptr,
1170    }
1171  }
1172}
1173
1174impl TSerializable for TUnionTypeEntry {
1175  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TUnionTypeEntry> {
1176    i_prot.read_struct_begin()?;
1177    let mut f_1: Option<BTreeMap<String, TTypeEntryPtr>> = None;
1178    loop {
1179      let field_ident = i_prot.read_field_begin()?;
1180      if field_ident.field_type == TType::Stop {
1181        break;
1182      }
1183      let field_id = field_id(&field_ident)?;
1184      match field_id {
1185        1 => {
1186          let map_ident = i_prot.read_map_begin()?;
1187          let mut val: BTreeMap<String, TTypeEntryPtr> = BTreeMap::new();
1188          for _ in 0..map_ident.size {
1189            let map_key_4 = i_prot.read_string()?;
1190            let map_val_5 = i_prot.read_i32()?;
1191            val.insert(map_key_4, map_val_5);
1192          }
1193          i_prot.read_map_end()?;
1194          f_1 = Some(val);
1195        },
1196        _ => {
1197          i_prot.skip(field_ident.field_type)?;
1198        },
1199      };
1200      i_prot.read_field_end()?;
1201    }
1202    i_prot.read_struct_end()?;
1203    verify_required_field_exists("TUnionTypeEntry.name_to_type_ptr", &f_1)?;
1204    let ret = TUnionTypeEntry {
1205      name_to_type_ptr: f_1.expect("auto-generated code should have checked for presence of required fields"),
1206    };
1207    Ok(ret)
1208  }
1209  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1210    let struct_ident = TStructIdentifier::new("TUnionTypeEntry");
1211    o_prot.write_struct_begin(&struct_ident)?;
1212    o_prot.write_field_begin(&TFieldIdentifier::new("nameToTypePtr", TType::Map, 1))?;
1213    o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::I32, self.name_to_type_ptr.len() as i32))?;
1214    for (k, v) in &self.name_to_type_ptr {
1215      o_prot.write_string(k)?;
1216      o_prot.write_i32(*v)?;
1217    }
1218    o_prot.write_map_end()?;
1219    o_prot.write_field_end()?;
1220    o_prot.write_field_stop()?;
1221    o_prot.write_struct_end()
1222  }
1223}
1224
1225//
1226// TUserDefinedTypeEntry
1227//
1228
1229#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1230pub struct TUserDefinedTypeEntry {
1231  pub type_class_name: String,
1232}
1233
1234impl TUserDefinedTypeEntry {
1235  pub fn new(type_class_name: String) -> TUserDefinedTypeEntry {
1236    TUserDefinedTypeEntry {
1237      type_class_name,
1238    }
1239  }
1240}
1241
1242impl TSerializable for TUserDefinedTypeEntry {
1243  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TUserDefinedTypeEntry> {
1244    i_prot.read_struct_begin()?;
1245    let mut f_1: Option<String> = None;
1246    loop {
1247      let field_ident = i_prot.read_field_begin()?;
1248      if field_ident.field_type == TType::Stop {
1249        break;
1250      }
1251      let field_id = field_id(&field_ident)?;
1252      match field_id {
1253        1 => {
1254          let val = i_prot.read_string()?;
1255          f_1 = Some(val);
1256        },
1257        _ => {
1258          i_prot.skip(field_ident.field_type)?;
1259        },
1260      };
1261      i_prot.read_field_end()?;
1262    }
1263    i_prot.read_struct_end()?;
1264    verify_required_field_exists("TUserDefinedTypeEntry.type_class_name", &f_1)?;
1265    let ret = TUserDefinedTypeEntry {
1266      type_class_name: f_1.expect("auto-generated code should have checked for presence of required fields"),
1267    };
1268    Ok(ret)
1269  }
1270  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1271    let struct_ident = TStructIdentifier::new("TUserDefinedTypeEntry");
1272    o_prot.write_struct_begin(&struct_ident)?;
1273    o_prot.write_field_begin(&TFieldIdentifier::new("typeClassName", TType::String, 1))?;
1274    o_prot.write_string(&self.type_class_name)?;
1275    o_prot.write_field_end()?;
1276    o_prot.write_field_stop()?;
1277    o_prot.write_struct_end()
1278  }
1279}
1280
1281//
1282// TTypeEntry
1283//
1284
1285#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1286pub enum TTypeEntry {
1287  PrimitiveEntry(TPrimitiveTypeEntry),
1288  ArrayEntry(TArrayTypeEntry),
1289  MapEntry(TMapTypeEntry),
1290  StructEntry(TStructTypeEntry),
1291  UnionEntry(TUnionTypeEntry),
1292  UserDefinedTypeEntry(TUserDefinedTypeEntry),
1293}
1294
1295impl TSerializable for TTypeEntry {
1296  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TTypeEntry> {
1297    let mut ret: Option<TTypeEntry> = None;
1298    let mut received_field_count = 0;
1299    i_prot.read_struct_begin()?;
1300    loop {
1301      let field_ident = i_prot.read_field_begin()?;
1302      if field_ident.field_type == TType::Stop {
1303        break;
1304      }
1305      let field_id = field_id(&field_ident)?;
1306      match field_id {
1307        1 => {
1308          let val = TPrimitiveTypeEntry::read_from_in_protocol(i_prot)?;
1309          if ret.is_none() {
1310            ret = Some(TTypeEntry::PrimitiveEntry(val));
1311          }
1312          received_field_count += 1;
1313        },
1314        2 => {
1315          let val = TArrayTypeEntry::read_from_in_protocol(i_prot)?;
1316          if ret.is_none() {
1317            ret = Some(TTypeEntry::ArrayEntry(val));
1318          }
1319          received_field_count += 1;
1320        },
1321        3 => {
1322          let val = TMapTypeEntry::read_from_in_protocol(i_prot)?;
1323          if ret.is_none() {
1324            ret = Some(TTypeEntry::MapEntry(val));
1325          }
1326          received_field_count += 1;
1327        },
1328        4 => {
1329          let val = TStructTypeEntry::read_from_in_protocol(i_prot)?;
1330          if ret.is_none() {
1331            ret = Some(TTypeEntry::StructEntry(val));
1332          }
1333          received_field_count += 1;
1334        },
1335        5 => {
1336          let val = TUnionTypeEntry::read_from_in_protocol(i_prot)?;
1337          if ret.is_none() {
1338            ret = Some(TTypeEntry::UnionEntry(val));
1339          }
1340          received_field_count += 1;
1341        },
1342        6 => {
1343          let val = TUserDefinedTypeEntry::read_from_in_protocol(i_prot)?;
1344          if ret.is_none() {
1345            ret = Some(TTypeEntry::UserDefinedTypeEntry(val));
1346          }
1347          received_field_count += 1;
1348        },
1349        _ => {
1350          i_prot.skip(field_ident.field_type)?;
1351          received_field_count += 1;
1352        },
1353      };
1354      i_prot.read_field_end()?;
1355    }
1356    i_prot.read_struct_end()?;
1357    if received_field_count == 0 {
1358      Err(
1359        thrift::Error::Protocol(
1360          ProtocolError::new(
1361            ProtocolErrorKind::InvalidData,
1362            "received empty union from remote TTypeEntry"
1363          )
1364        )
1365      )
1366    } else if received_field_count > 1 {
1367      Err(
1368        thrift::Error::Protocol(
1369          ProtocolError::new(
1370            ProtocolErrorKind::InvalidData,
1371            "received multiple fields for union from remote TTypeEntry"
1372          )
1373        )
1374      )
1375    } else {
1376      Ok(ret.expect("return value should have been constructed"))
1377    }
1378  }
1379  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1380    let struct_ident = TStructIdentifier::new("TTypeEntry");
1381    o_prot.write_struct_begin(&struct_ident)?;
1382    match *self {
1383      TTypeEntry::PrimitiveEntry(ref f) => {
1384        o_prot.write_field_begin(&TFieldIdentifier::new("primitiveEntry", TType::Struct, 1))?;
1385        f.write_to_out_protocol(o_prot)?;
1386        o_prot.write_field_end()?;
1387      },
1388      TTypeEntry::ArrayEntry(ref f) => {
1389        o_prot.write_field_begin(&TFieldIdentifier::new("arrayEntry", TType::Struct, 2))?;
1390        f.write_to_out_protocol(o_prot)?;
1391        o_prot.write_field_end()?;
1392      },
1393      TTypeEntry::MapEntry(ref f) => {
1394        o_prot.write_field_begin(&TFieldIdentifier::new("mapEntry", TType::Struct, 3))?;
1395        f.write_to_out_protocol(o_prot)?;
1396        o_prot.write_field_end()?;
1397      },
1398      TTypeEntry::StructEntry(ref f) => {
1399        o_prot.write_field_begin(&TFieldIdentifier::new("structEntry", TType::Struct, 4))?;
1400        f.write_to_out_protocol(o_prot)?;
1401        o_prot.write_field_end()?;
1402      },
1403      TTypeEntry::UnionEntry(ref f) => {
1404        o_prot.write_field_begin(&TFieldIdentifier::new("unionEntry", TType::Struct, 5))?;
1405        f.write_to_out_protocol(o_prot)?;
1406        o_prot.write_field_end()?;
1407      },
1408      TTypeEntry::UserDefinedTypeEntry(ref f) => {
1409        o_prot.write_field_begin(&TFieldIdentifier::new("userDefinedTypeEntry", TType::Struct, 6))?;
1410        f.write_to_out_protocol(o_prot)?;
1411        o_prot.write_field_end()?;
1412      },
1413    }
1414    o_prot.write_field_stop()?;
1415    o_prot.write_struct_end()
1416  }
1417}
1418
1419//
1420// TTypeDesc
1421//
1422
1423#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1424pub struct TTypeDesc {
1425  pub types: Vec<TTypeEntry>,
1426}
1427
1428impl TTypeDesc {
1429  pub fn new(types: Vec<TTypeEntry>) -> TTypeDesc {
1430    TTypeDesc {
1431      types,
1432    }
1433  }
1434}
1435
1436impl TSerializable for TTypeDesc {
1437  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TTypeDesc> {
1438    i_prot.read_struct_begin()?;
1439    let mut f_1: Option<Vec<TTypeEntry>> = None;
1440    loop {
1441      let field_ident = i_prot.read_field_begin()?;
1442      if field_ident.field_type == TType::Stop {
1443        break;
1444      }
1445      let field_id = field_id(&field_ident)?;
1446      match field_id {
1447        1 => {
1448          let list_ident = i_prot.read_list_begin()?;
1449          let mut val: Vec<TTypeEntry> = Vec::with_capacity(list_ident.size as usize);
1450          for _ in 0..list_ident.size {
1451            let list_elem_6 = TTypeEntry::read_from_in_protocol(i_prot)?;
1452            val.push(list_elem_6);
1453          }
1454          i_prot.read_list_end()?;
1455          f_1 = Some(val);
1456        },
1457        _ => {
1458          i_prot.skip(field_ident.field_type)?;
1459        },
1460      };
1461      i_prot.read_field_end()?;
1462    }
1463    i_prot.read_struct_end()?;
1464    verify_required_field_exists("TTypeDesc.types", &f_1)?;
1465    let ret = TTypeDesc {
1466      types: f_1.expect("auto-generated code should have checked for presence of required fields"),
1467    };
1468    Ok(ret)
1469  }
1470  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1471    let struct_ident = TStructIdentifier::new("TTypeDesc");
1472    o_prot.write_struct_begin(&struct_ident)?;
1473    o_prot.write_field_begin(&TFieldIdentifier::new("types", TType::List, 1))?;
1474    o_prot.write_list_begin(&TListIdentifier::new(TType::Struct, self.types.len() as i32))?;
1475    for e in &self.types {
1476      e.write_to_out_protocol(o_prot)?;
1477    }
1478    o_prot.write_list_end()?;
1479    o_prot.write_field_end()?;
1480    o_prot.write_field_stop()?;
1481    o_prot.write_struct_end()
1482  }
1483}
1484
1485//
1486// TColumnDesc
1487//
1488
1489#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1490pub struct TColumnDesc {
1491  pub column_name: String,
1492  pub type_desc: TTypeDesc,
1493  pub position: i32,
1494  pub comment: Option<String>,
1495}
1496
1497impl TColumnDesc {
1498  pub fn new<F4>(column_name: String, type_desc: TTypeDesc, position: i32, comment: F4) -> TColumnDesc where F4: Into<Option<String>> {
1499    TColumnDesc {
1500      column_name,
1501      type_desc,
1502      position,
1503      comment: comment.into(),
1504    }
1505  }
1506}
1507
1508impl TSerializable for TColumnDesc {
1509  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TColumnDesc> {
1510    i_prot.read_struct_begin()?;
1511    let mut f_1: Option<String> = None;
1512    let mut f_2: Option<TTypeDesc> = None;
1513    let mut f_3: Option<i32> = None;
1514    let mut f_4: Option<String> = None;
1515    loop {
1516      let field_ident = i_prot.read_field_begin()?;
1517      if field_ident.field_type == TType::Stop {
1518        break;
1519      }
1520      let field_id = field_id(&field_ident)?;
1521      match field_id {
1522        1 => {
1523          let val = i_prot.read_string()?;
1524          f_1 = Some(val);
1525        },
1526        2 => {
1527          let val = TTypeDesc::read_from_in_protocol(i_prot)?;
1528          f_2 = Some(val);
1529        },
1530        3 => {
1531          let val = i_prot.read_i32()?;
1532          f_3 = Some(val);
1533        },
1534        4 => {
1535          let val = i_prot.read_string()?;
1536          f_4 = Some(val);
1537        },
1538        _ => {
1539          i_prot.skip(field_ident.field_type)?;
1540        },
1541      };
1542      i_prot.read_field_end()?;
1543    }
1544    i_prot.read_struct_end()?;
1545    verify_required_field_exists("TColumnDesc.column_name", &f_1)?;
1546    verify_required_field_exists("TColumnDesc.type_desc", &f_2)?;
1547    verify_required_field_exists("TColumnDesc.position", &f_3)?;
1548    let ret = TColumnDesc {
1549      column_name: f_1.expect("auto-generated code should have checked for presence of required fields"),
1550      type_desc: f_2.expect("auto-generated code should have checked for presence of required fields"),
1551      position: f_3.expect("auto-generated code should have checked for presence of required fields"),
1552      comment: f_4,
1553    };
1554    Ok(ret)
1555  }
1556  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1557    let struct_ident = TStructIdentifier::new("TColumnDesc");
1558    o_prot.write_struct_begin(&struct_ident)?;
1559    o_prot.write_field_begin(&TFieldIdentifier::new("columnName", TType::String, 1))?;
1560    o_prot.write_string(&self.column_name)?;
1561    o_prot.write_field_end()?;
1562    o_prot.write_field_begin(&TFieldIdentifier::new("typeDesc", TType::Struct, 2))?;
1563    self.type_desc.write_to_out_protocol(o_prot)?;
1564    o_prot.write_field_end()?;
1565    o_prot.write_field_begin(&TFieldIdentifier::new("position", TType::I32, 3))?;
1566    o_prot.write_i32(self.position)?;
1567    o_prot.write_field_end()?;
1568    if let Some(ref fld_var) = self.comment {
1569      o_prot.write_field_begin(&TFieldIdentifier::new("comment", TType::String, 4))?;
1570      o_prot.write_string(fld_var)?;
1571      o_prot.write_field_end()?
1572    }
1573    o_prot.write_field_stop()?;
1574    o_prot.write_struct_end()
1575  }
1576}
1577
1578//
1579// TTableSchema
1580//
1581
1582#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1583pub struct TTableSchema {
1584  pub columns: Vec<TColumnDesc>,
1585}
1586
1587impl TTableSchema {
1588  pub fn new(columns: Vec<TColumnDesc>) -> TTableSchema {
1589    TTableSchema {
1590      columns,
1591    }
1592  }
1593}
1594
1595impl TSerializable for TTableSchema {
1596  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TTableSchema> {
1597    i_prot.read_struct_begin()?;
1598    let mut f_1: Option<Vec<TColumnDesc>> = None;
1599    loop {
1600      let field_ident = i_prot.read_field_begin()?;
1601      if field_ident.field_type == TType::Stop {
1602        break;
1603      }
1604      let field_id = field_id(&field_ident)?;
1605      match field_id {
1606        1 => {
1607          let list_ident = i_prot.read_list_begin()?;
1608          let mut val: Vec<TColumnDesc> = Vec::with_capacity(list_ident.size as usize);
1609          for _ in 0..list_ident.size {
1610            let list_elem_7 = TColumnDesc::read_from_in_protocol(i_prot)?;
1611            val.push(list_elem_7);
1612          }
1613          i_prot.read_list_end()?;
1614          f_1 = Some(val);
1615        },
1616        _ => {
1617          i_prot.skip(field_ident.field_type)?;
1618        },
1619      };
1620      i_prot.read_field_end()?;
1621    }
1622    i_prot.read_struct_end()?;
1623    verify_required_field_exists("TTableSchema.columns", &f_1)?;
1624    let ret = TTableSchema {
1625      columns: f_1.expect("auto-generated code should have checked for presence of required fields"),
1626    };
1627    Ok(ret)
1628  }
1629  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1630    let struct_ident = TStructIdentifier::new("TTableSchema");
1631    o_prot.write_struct_begin(&struct_ident)?;
1632    o_prot.write_field_begin(&TFieldIdentifier::new("columns", TType::List, 1))?;
1633    o_prot.write_list_begin(&TListIdentifier::new(TType::Struct, self.columns.len() as i32))?;
1634    for e in &self.columns {
1635      e.write_to_out_protocol(o_prot)?;
1636    }
1637    o_prot.write_list_end()?;
1638    o_prot.write_field_end()?;
1639    o_prot.write_field_stop()?;
1640    o_prot.write_struct_end()
1641  }
1642}
1643
1644//
1645// TBoolValue
1646//
1647
1648#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
1649pub struct TBoolValue {
1650  pub value: Option<bool>,
1651}
1652
1653impl TBoolValue {
1654  pub fn new<F1>(value: F1) -> TBoolValue where F1: Into<Option<bool>> {
1655    TBoolValue {
1656      value: value.into(),
1657    }
1658  }
1659}
1660
1661impl TSerializable for TBoolValue {
1662  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TBoolValue> {
1663    i_prot.read_struct_begin()?;
1664    let mut f_1: Option<bool> = None;
1665    loop {
1666      let field_ident = i_prot.read_field_begin()?;
1667      if field_ident.field_type == TType::Stop {
1668        break;
1669      }
1670      let field_id = field_id(&field_ident)?;
1671      match field_id {
1672        1 => {
1673          let val = i_prot.read_bool()?;
1674          f_1 = Some(val);
1675        },
1676        _ => {
1677          i_prot.skip(field_ident.field_type)?;
1678        },
1679      };
1680      i_prot.read_field_end()?;
1681    }
1682    i_prot.read_struct_end()?;
1683    let ret = TBoolValue {
1684      value: f_1,
1685    };
1686    Ok(ret)
1687  }
1688  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1689    let struct_ident = TStructIdentifier::new("TBoolValue");
1690    o_prot.write_struct_begin(&struct_ident)?;
1691    if let Some(fld_var) = self.value {
1692      o_prot.write_field_begin(&TFieldIdentifier::new("value", TType::Bool, 1))?;
1693      o_prot.write_bool(fld_var)?;
1694      o_prot.write_field_end()?
1695    }
1696    o_prot.write_field_stop()?;
1697    o_prot.write_struct_end()
1698  }
1699}
1700
1701//
1702// TByteValue
1703//
1704
1705#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
1706pub struct TByteValue {
1707  pub value: Option<i8>,
1708}
1709
1710impl TByteValue {
1711  pub fn new<F1>(value: F1) -> TByteValue where F1: Into<Option<i8>> {
1712    TByteValue {
1713      value: value.into(),
1714    }
1715  }
1716}
1717
1718impl TSerializable for TByteValue {
1719  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TByteValue> {
1720    i_prot.read_struct_begin()?;
1721    let mut f_1: Option<i8> = None;
1722    loop {
1723      let field_ident = i_prot.read_field_begin()?;
1724      if field_ident.field_type == TType::Stop {
1725        break;
1726      }
1727      let field_id = field_id(&field_ident)?;
1728      match field_id {
1729        1 => {
1730          let val = i_prot.read_i8()?;
1731          f_1 = Some(val);
1732        },
1733        _ => {
1734          i_prot.skip(field_ident.field_type)?;
1735        },
1736      };
1737      i_prot.read_field_end()?;
1738    }
1739    i_prot.read_struct_end()?;
1740    let ret = TByteValue {
1741      value: f_1,
1742    };
1743    Ok(ret)
1744  }
1745  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1746    let struct_ident = TStructIdentifier::new("TByteValue");
1747    o_prot.write_struct_begin(&struct_ident)?;
1748    if let Some(fld_var) = self.value {
1749      o_prot.write_field_begin(&TFieldIdentifier::new("value", TType::I08, 1))?;
1750      o_prot.write_i8(fld_var)?;
1751      o_prot.write_field_end()?
1752    }
1753    o_prot.write_field_stop()?;
1754    o_prot.write_struct_end()
1755  }
1756}
1757
1758//
1759// TI16Value
1760//
1761
1762#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
1763pub struct TI16Value {
1764  pub value: Option<i16>,
1765}
1766
1767impl TI16Value {
1768  pub fn new<F1>(value: F1) -> TI16Value where F1: Into<Option<i16>> {
1769    TI16Value {
1770      value: value.into(),
1771    }
1772  }
1773}
1774
1775impl TSerializable for TI16Value {
1776  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TI16Value> {
1777    i_prot.read_struct_begin()?;
1778    let mut f_1: Option<i16> = None;
1779    loop {
1780      let field_ident = i_prot.read_field_begin()?;
1781      if field_ident.field_type == TType::Stop {
1782        break;
1783      }
1784      let field_id = field_id(&field_ident)?;
1785      match field_id {
1786        1 => {
1787          let val = i_prot.read_i16()?;
1788          f_1 = Some(val);
1789        },
1790        _ => {
1791          i_prot.skip(field_ident.field_type)?;
1792        },
1793      };
1794      i_prot.read_field_end()?;
1795    }
1796    i_prot.read_struct_end()?;
1797    let ret = TI16Value {
1798      value: f_1,
1799    };
1800    Ok(ret)
1801  }
1802  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1803    let struct_ident = TStructIdentifier::new("TI16Value");
1804    o_prot.write_struct_begin(&struct_ident)?;
1805    if let Some(fld_var) = self.value {
1806      o_prot.write_field_begin(&TFieldIdentifier::new("value", TType::I16, 1))?;
1807      o_prot.write_i16(fld_var)?;
1808      o_prot.write_field_end()?
1809    }
1810    o_prot.write_field_stop()?;
1811    o_prot.write_struct_end()
1812  }
1813}
1814
1815//
1816// TI32Value
1817//
1818
1819#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
1820pub struct TI32Value {
1821  pub value: Option<i32>,
1822}
1823
1824impl TI32Value {
1825  pub fn new<F1>(value: F1) -> TI32Value where F1: Into<Option<i32>> {
1826    TI32Value {
1827      value: value.into(),
1828    }
1829  }
1830}
1831
1832impl TSerializable for TI32Value {
1833  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TI32Value> {
1834    i_prot.read_struct_begin()?;
1835    let mut f_1: Option<i32> = None;
1836    loop {
1837      let field_ident = i_prot.read_field_begin()?;
1838      if field_ident.field_type == TType::Stop {
1839        break;
1840      }
1841      let field_id = field_id(&field_ident)?;
1842      match field_id {
1843        1 => {
1844          let val = i_prot.read_i32()?;
1845          f_1 = Some(val);
1846        },
1847        _ => {
1848          i_prot.skip(field_ident.field_type)?;
1849        },
1850      };
1851      i_prot.read_field_end()?;
1852    }
1853    i_prot.read_struct_end()?;
1854    let ret = TI32Value {
1855      value: f_1,
1856    };
1857    Ok(ret)
1858  }
1859  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1860    let struct_ident = TStructIdentifier::new("TI32Value");
1861    o_prot.write_struct_begin(&struct_ident)?;
1862    if let Some(fld_var) = self.value {
1863      o_prot.write_field_begin(&TFieldIdentifier::new("value", TType::I32, 1))?;
1864      o_prot.write_i32(fld_var)?;
1865      o_prot.write_field_end()?
1866    }
1867    o_prot.write_field_stop()?;
1868    o_prot.write_struct_end()
1869  }
1870}
1871
1872//
1873// TI64Value
1874//
1875
1876#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
1877pub struct TI64Value {
1878  pub value: Option<i64>,
1879}
1880
1881impl TI64Value {
1882  pub fn new<F1>(value: F1) -> TI64Value where F1: Into<Option<i64>> {
1883    TI64Value {
1884      value: value.into(),
1885    }
1886  }
1887}
1888
1889impl TSerializable for TI64Value {
1890  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TI64Value> {
1891    i_prot.read_struct_begin()?;
1892    let mut f_1: Option<i64> = None;
1893    loop {
1894      let field_ident = i_prot.read_field_begin()?;
1895      if field_ident.field_type == TType::Stop {
1896        break;
1897      }
1898      let field_id = field_id(&field_ident)?;
1899      match field_id {
1900        1 => {
1901          let val = i_prot.read_i64()?;
1902          f_1 = Some(val);
1903        },
1904        _ => {
1905          i_prot.skip(field_ident.field_type)?;
1906        },
1907      };
1908      i_prot.read_field_end()?;
1909    }
1910    i_prot.read_struct_end()?;
1911    let ret = TI64Value {
1912      value: f_1,
1913    };
1914    Ok(ret)
1915  }
1916  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1917    let struct_ident = TStructIdentifier::new("TI64Value");
1918    o_prot.write_struct_begin(&struct_ident)?;
1919    if let Some(fld_var) = self.value {
1920      o_prot.write_field_begin(&TFieldIdentifier::new("value", TType::I64, 1))?;
1921      o_prot.write_i64(fld_var)?;
1922      o_prot.write_field_end()?
1923    }
1924    o_prot.write_field_stop()?;
1925    o_prot.write_struct_end()
1926  }
1927}
1928
1929//
1930// TDoubleValue
1931//
1932
1933#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
1934pub struct TDoubleValue {
1935  pub value: Option<OrderedFloat<f64>>,
1936}
1937
1938impl TDoubleValue {
1939  pub fn new<F1>(value: F1) -> TDoubleValue where F1: Into<Option<OrderedFloat<f64>>> {
1940    TDoubleValue {
1941      value: value.into(),
1942    }
1943  }
1944}
1945
1946impl TSerializable for TDoubleValue {
1947  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TDoubleValue> {
1948    i_prot.read_struct_begin()?;
1949    let mut f_1: Option<OrderedFloat<f64>> = None;
1950    loop {
1951      let field_ident = i_prot.read_field_begin()?;
1952      if field_ident.field_type == TType::Stop {
1953        break;
1954      }
1955      let field_id = field_id(&field_ident)?;
1956      match field_id {
1957        1 => {
1958          let val = OrderedFloat::from(i_prot.read_double()?);
1959          f_1 = Some(val);
1960        },
1961        _ => {
1962          i_prot.skip(field_ident.field_type)?;
1963        },
1964      };
1965      i_prot.read_field_end()?;
1966    }
1967    i_prot.read_struct_end()?;
1968    let ret = TDoubleValue {
1969      value: f_1,
1970    };
1971    Ok(ret)
1972  }
1973  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1974    let struct_ident = TStructIdentifier::new("TDoubleValue");
1975    o_prot.write_struct_begin(&struct_ident)?;
1976    if let Some(fld_var) = self.value {
1977      o_prot.write_field_begin(&TFieldIdentifier::new("value", TType::Double, 1))?;
1978      o_prot.write_double(fld_var.into())?;
1979      o_prot.write_field_end()?
1980    }
1981    o_prot.write_field_stop()?;
1982    o_prot.write_struct_end()
1983  }
1984}
1985
1986//
1987// TStringValue
1988//
1989
1990#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
1991pub struct TStringValue {
1992  pub value: Option<String>,
1993}
1994
1995impl TStringValue {
1996  pub fn new<F1>(value: F1) -> TStringValue where F1: Into<Option<String>> {
1997    TStringValue {
1998      value: value.into(),
1999    }
2000  }
2001}
2002
2003impl TSerializable for TStringValue {
2004  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TStringValue> {
2005    i_prot.read_struct_begin()?;
2006    let mut f_1: Option<String> = None;
2007    loop {
2008      let field_ident = i_prot.read_field_begin()?;
2009      if field_ident.field_type == TType::Stop {
2010        break;
2011      }
2012      let field_id = field_id(&field_ident)?;
2013      match field_id {
2014        1 => {
2015          let val = i_prot.read_string()?;
2016          f_1 = Some(val);
2017        },
2018        _ => {
2019          i_prot.skip(field_ident.field_type)?;
2020        },
2021      };
2022      i_prot.read_field_end()?;
2023    }
2024    i_prot.read_struct_end()?;
2025    let ret = TStringValue {
2026      value: f_1,
2027    };
2028    Ok(ret)
2029  }
2030  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2031    let struct_ident = TStructIdentifier::new("TStringValue");
2032    o_prot.write_struct_begin(&struct_ident)?;
2033    if let Some(ref fld_var) = self.value {
2034      o_prot.write_field_begin(&TFieldIdentifier::new("value", TType::String, 1))?;
2035      o_prot.write_string(fld_var)?;
2036      o_prot.write_field_end()?
2037    }
2038    o_prot.write_field_stop()?;
2039    o_prot.write_struct_end()
2040  }
2041}
2042
2043//
2044// TColumnValue
2045//
2046
2047#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2048pub enum TColumnValue {
2049  BoolVal(TBoolValue),
2050  ByteVal(TByteValue),
2051  I16Val(TI16Value),
2052  I32Val(TI32Value),
2053  I64Val(TI64Value),
2054  DoubleVal(TDoubleValue),
2055  StringVal(TStringValue),
2056}
2057
2058impl TSerializable for TColumnValue {
2059  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TColumnValue> {
2060    let mut ret: Option<TColumnValue> = None;
2061    let mut received_field_count = 0;
2062    i_prot.read_struct_begin()?;
2063    loop {
2064      let field_ident = i_prot.read_field_begin()?;
2065      if field_ident.field_type == TType::Stop {
2066        break;
2067      }
2068      let field_id = field_id(&field_ident)?;
2069      match field_id {
2070        1 => {
2071          let val = TBoolValue::read_from_in_protocol(i_prot)?;
2072          if ret.is_none() {
2073            ret = Some(TColumnValue::BoolVal(val));
2074          }
2075          received_field_count += 1;
2076        },
2077        2 => {
2078          let val = TByteValue::read_from_in_protocol(i_prot)?;
2079          if ret.is_none() {
2080            ret = Some(TColumnValue::ByteVal(val));
2081          }
2082          received_field_count += 1;
2083        },
2084        3 => {
2085          let val = TI16Value::read_from_in_protocol(i_prot)?;
2086          if ret.is_none() {
2087            ret = Some(TColumnValue::I16Val(val));
2088          }
2089          received_field_count += 1;
2090        },
2091        4 => {
2092          let val = TI32Value::read_from_in_protocol(i_prot)?;
2093          if ret.is_none() {
2094            ret = Some(TColumnValue::I32Val(val));
2095          }
2096          received_field_count += 1;
2097        },
2098        5 => {
2099          let val = TI64Value::read_from_in_protocol(i_prot)?;
2100          if ret.is_none() {
2101            ret = Some(TColumnValue::I64Val(val));
2102          }
2103          received_field_count += 1;
2104        },
2105        6 => {
2106          let val = TDoubleValue::read_from_in_protocol(i_prot)?;
2107          if ret.is_none() {
2108            ret = Some(TColumnValue::DoubleVal(val));
2109          }
2110          received_field_count += 1;
2111        },
2112        7 => {
2113          let val = TStringValue::read_from_in_protocol(i_prot)?;
2114          if ret.is_none() {
2115            ret = Some(TColumnValue::StringVal(val));
2116          }
2117          received_field_count += 1;
2118        },
2119        _ => {
2120          i_prot.skip(field_ident.field_type)?;
2121          received_field_count += 1;
2122        },
2123      };
2124      i_prot.read_field_end()?;
2125    }
2126    i_prot.read_struct_end()?;
2127    if received_field_count == 0 {
2128      Err(
2129        thrift::Error::Protocol(
2130          ProtocolError::new(
2131            ProtocolErrorKind::InvalidData,
2132            "received empty union from remote TColumnValue"
2133          )
2134        )
2135      )
2136    } else if received_field_count > 1 {
2137      Err(
2138        thrift::Error::Protocol(
2139          ProtocolError::new(
2140            ProtocolErrorKind::InvalidData,
2141            "received multiple fields for union from remote TColumnValue"
2142          )
2143        )
2144      )
2145    } else {
2146      Ok(ret.expect("return value should have been constructed"))
2147    }
2148  }
2149  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2150    let struct_ident = TStructIdentifier::new("TColumnValue");
2151    o_prot.write_struct_begin(&struct_ident)?;
2152    match *self {
2153      TColumnValue::BoolVal(ref f) => {
2154        o_prot.write_field_begin(&TFieldIdentifier::new("boolVal", TType::Struct, 1))?;
2155        f.write_to_out_protocol(o_prot)?;
2156        o_prot.write_field_end()?;
2157      },
2158      TColumnValue::ByteVal(ref f) => {
2159        o_prot.write_field_begin(&TFieldIdentifier::new("byteVal", TType::Struct, 2))?;
2160        f.write_to_out_protocol(o_prot)?;
2161        o_prot.write_field_end()?;
2162      },
2163      TColumnValue::I16Val(ref f) => {
2164        o_prot.write_field_begin(&TFieldIdentifier::new("i16Val", TType::Struct, 3))?;
2165        f.write_to_out_protocol(o_prot)?;
2166        o_prot.write_field_end()?;
2167      },
2168      TColumnValue::I32Val(ref f) => {
2169        o_prot.write_field_begin(&TFieldIdentifier::new("i32Val", TType::Struct, 4))?;
2170        f.write_to_out_protocol(o_prot)?;
2171        o_prot.write_field_end()?;
2172      },
2173      TColumnValue::I64Val(ref f) => {
2174        o_prot.write_field_begin(&TFieldIdentifier::new("i64Val", TType::Struct, 5))?;
2175        f.write_to_out_protocol(o_prot)?;
2176        o_prot.write_field_end()?;
2177      },
2178      TColumnValue::DoubleVal(ref f) => {
2179        o_prot.write_field_begin(&TFieldIdentifier::new("doubleVal", TType::Struct, 6))?;
2180        f.write_to_out_protocol(o_prot)?;
2181        o_prot.write_field_end()?;
2182      },
2183      TColumnValue::StringVal(ref f) => {
2184        o_prot.write_field_begin(&TFieldIdentifier::new("stringVal", TType::Struct, 7))?;
2185        f.write_to_out_protocol(o_prot)?;
2186        o_prot.write_field_end()?;
2187      },
2188    }
2189    o_prot.write_field_stop()?;
2190    o_prot.write_struct_end()
2191  }
2192}
2193
2194//
2195// TRow
2196//
2197
2198#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2199pub struct TRow {
2200  pub col_vals: Vec<TColumnValue>,
2201}
2202
2203impl TRow {
2204  pub fn new(col_vals: Vec<TColumnValue>) -> TRow {
2205    TRow {
2206      col_vals,
2207    }
2208  }
2209}
2210
2211impl TSerializable for TRow {
2212  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TRow> {
2213    i_prot.read_struct_begin()?;
2214    let mut f_1: Option<Vec<TColumnValue>> = None;
2215    loop {
2216      let field_ident = i_prot.read_field_begin()?;
2217      if field_ident.field_type == TType::Stop {
2218        break;
2219      }
2220      let field_id = field_id(&field_ident)?;
2221      match field_id {
2222        1 => {
2223          let list_ident = i_prot.read_list_begin()?;
2224          let mut val: Vec<TColumnValue> = Vec::with_capacity(list_ident.size as usize);
2225          for _ in 0..list_ident.size {
2226            let list_elem_8 = TColumnValue::read_from_in_protocol(i_prot)?;
2227            val.push(list_elem_8);
2228          }
2229          i_prot.read_list_end()?;
2230          f_1 = Some(val);
2231        },
2232        _ => {
2233          i_prot.skip(field_ident.field_type)?;
2234        },
2235      };
2236      i_prot.read_field_end()?;
2237    }
2238    i_prot.read_struct_end()?;
2239    verify_required_field_exists("TRow.col_vals", &f_1)?;
2240    let ret = TRow {
2241      col_vals: f_1.expect("auto-generated code should have checked for presence of required fields"),
2242    };
2243    Ok(ret)
2244  }
2245  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2246    let struct_ident = TStructIdentifier::new("TRow");
2247    o_prot.write_struct_begin(&struct_ident)?;
2248    o_prot.write_field_begin(&TFieldIdentifier::new("colVals", TType::List, 1))?;
2249    o_prot.write_list_begin(&TListIdentifier::new(TType::Struct, self.col_vals.len() as i32))?;
2250    for e in &self.col_vals {
2251      e.write_to_out_protocol(o_prot)?;
2252    }
2253    o_prot.write_list_end()?;
2254    o_prot.write_field_end()?;
2255    o_prot.write_field_stop()?;
2256    o_prot.write_struct_end()
2257  }
2258}
2259
2260//
2261// TBoolColumn
2262//
2263
2264#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2265pub struct TBoolColumn {
2266  pub values: Vec<bool>,
2267  pub nulls: Vec<u8>,
2268}
2269
2270impl TBoolColumn {
2271  pub fn new(values: Vec<bool>, nulls: Vec<u8>) -> TBoolColumn {
2272    TBoolColumn {
2273      values,
2274      nulls,
2275    }
2276  }
2277}
2278
2279impl TSerializable for TBoolColumn {
2280  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TBoolColumn> {
2281    i_prot.read_struct_begin()?;
2282    let mut f_1: Option<Vec<bool>> = None;
2283    let mut f_2: Option<Vec<u8>> = None;
2284    loop {
2285      let field_ident = i_prot.read_field_begin()?;
2286      if field_ident.field_type == TType::Stop {
2287        break;
2288      }
2289      let field_id = field_id(&field_ident)?;
2290      match field_id {
2291        1 => {
2292          let list_ident = i_prot.read_list_begin()?;
2293          let mut val: Vec<bool> = Vec::with_capacity(list_ident.size as usize);
2294          for _ in 0..list_ident.size {
2295            let list_elem_9 = i_prot.read_bool()?;
2296            val.push(list_elem_9);
2297          }
2298          i_prot.read_list_end()?;
2299          f_1 = Some(val);
2300        },
2301        2 => {
2302          let val = i_prot.read_bytes()?;
2303          f_2 = Some(val);
2304        },
2305        _ => {
2306          i_prot.skip(field_ident.field_type)?;
2307        },
2308      };
2309      i_prot.read_field_end()?;
2310    }
2311    i_prot.read_struct_end()?;
2312    verify_required_field_exists("TBoolColumn.values", &f_1)?;
2313    verify_required_field_exists("TBoolColumn.nulls", &f_2)?;
2314    let ret = TBoolColumn {
2315      values: f_1.expect("auto-generated code should have checked for presence of required fields"),
2316      nulls: f_2.expect("auto-generated code should have checked for presence of required fields"),
2317    };
2318    Ok(ret)
2319  }
2320  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2321    let struct_ident = TStructIdentifier::new("TBoolColumn");
2322    o_prot.write_struct_begin(&struct_ident)?;
2323    o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::List, 1))?;
2324    o_prot.write_list_begin(&TListIdentifier::new(TType::Bool, self.values.len() as i32))?;
2325    for e in &self.values {
2326      o_prot.write_bool(*e)?;
2327    }
2328    o_prot.write_list_end()?;
2329    o_prot.write_field_end()?;
2330    o_prot.write_field_begin(&TFieldIdentifier::new("nulls", TType::String, 2))?;
2331    o_prot.write_bytes(&self.nulls)?;
2332    o_prot.write_field_end()?;
2333    o_prot.write_field_stop()?;
2334    o_prot.write_struct_end()
2335  }
2336}
2337
2338//
2339// TByteColumn
2340//
2341
2342#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2343pub struct TByteColumn {
2344  pub values: Vec<i8>,
2345  pub nulls: Vec<u8>,
2346}
2347
2348impl TByteColumn {
2349  pub fn new(values: Vec<i8>, nulls: Vec<u8>) -> TByteColumn {
2350    TByteColumn {
2351      values,
2352      nulls,
2353    }
2354  }
2355}
2356
2357impl TSerializable for TByteColumn {
2358  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TByteColumn> {
2359    i_prot.read_struct_begin()?;
2360    let mut f_1: Option<Vec<i8>> = None;
2361    let mut f_2: Option<Vec<u8>> = None;
2362    loop {
2363      let field_ident = i_prot.read_field_begin()?;
2364      if field_ident.field_type == TType::Stop {
2365        break;
2366      }
2367      let field_id = field_id(&field_ident)?;
2368      match field_id {
2369        1 => {
2370          let list_ident = i_prot.read_list_begin()?;
2371          let mut val: Vec<i8> = Vec::with_capacity(list_ident.size as usize);
2372          for _ in 0..list_ident.size {
2373            let list_elem_10 = i_prot.read_i8()?;
2374            val.push(list_elem_10);
2375          }
2376          i_prot.read_list_end()?;
2377          f_1 = Some(val);
2378        },
2379        2 => {
2380          let val = i_prot.read_bytes()?;
2381          f_2 = Some(val);
2382        },
2383        _ => {
2384          i_prot.skip(field_ident.field_type)?;
2385        },
2386      };
2387      i_prot.read_field_end()?;
2388    }
2389    i_prot.read_struct_end()?;
2390    verify_required_field_exists("TByteColumn.values", &f_1)?;
2391    verify_required_field_exists("TByteColumn.nulls", &f_2)?;
2392    let ret = TByteColumn {
2393      values: f_1.expect("auto-generated code should have checked for presence of required fields"),
2394      nulls: f_2.expect("auto-generated code should have checked for presence of required fields"),
2395    };
2396    Ok(ret)
2397  }
2398  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2399    let struct_ident = TStructIdentifier::new("TByteColumn");
2400    o_prot.write_struct_begin(&struct_ident)?;
2401    o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::List, 1))?;
2402    o_prot.write_list_begin(&TListIdentifier::new(TType::I08, self.values.len() as i32))?;
2403    for e in &self.values {
2404      o_prot.write_i8(*e)?;
2405    }
2406    o_prot.write_list_end()?;
2407    o_prot.write_field_end()?;
2408    o_prot.write_field_begin(&TFieldIdentifier::new("nulls", TType::String, 2))?;
2409    o_prot.write_bytes(&self.nulls)?;
2410    o_prot.write_field_end()?;
2411    o_prot.write_field_stop()?;
2412    o_prot.write_struct_end()
2413  }
2414}
2415
2416//
2417// TI16Column
2418//
2419
2420#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2421pub struct TI16Column {
2422  pub values: Vec<i16>,
2423  pub nulls: Vec<u8>,
2424}
2425
2426impl TI16Column {
2427  pub fn new(values: Vec<i16>, nulls: Vec<u8>) -> TI16Column {
2428    TI16Column {
2429      values,
2430      nulls,
2431    }
2432  }
2433}
2434
2435impl TSerializable for TI16Column {
2436  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TI16Column> {
2437    i_prot.read_struct_begin()?;
2438    let mut f_1: Option<Vec<i16>> = None;
2439    let mut f_2: Option<Vec<u8>> = None;
2440    loop {
2441      let field_ident = i_prot.read_field_begin()?;
2442      if field_ident.field_type == TType::Stop {
2443        break;
2444      }
2445      let field_id = field_id(&field_ident)?;
2446      match field_id {
2447        1 => {
2448          let list_ident = i_prot.read_list_begin()?;
2449          let mut val: Vec<i16> = Vec::with_capacity(list_ident.size as usize);
2450          for _ in 0..list_ident.size {
2451            let list_elem_11 = i_prot.read_i16()?;
2452            val.push(list_elem_11);
2453          }
2454          i_prot.read_list_end()?;
2455          f_1 = Some(val);
2456        },
2457        2 => {
2458          let val = i_prot.read_bytes()?;
2459          f_2 = Some(val);
2460        },
2461        _ => {
2462          i_prot.skip(field_ident.field_type)?;
2463        },
2464      };
2465      i_prot.read_field_end()?;
2466    }
2467    i_prot.read_struct_end()?;
2468    verify_required_field_exists("TI16Column.values", &f_1)?;
2469    verify_required_field_exists("TI16Column.nulls", &f_2)?;
2470    let ret = TI16Column {
2471      values: f_1.expect("auto-generated code should have checked for presence of required fields"),
2472      nulls: f_2.expect("auto-generated code should have checked for presence of required fields"),
2473    };
2474    Ok(ret)
2475  }
2476  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2477    let struct_ident = TStructIdentifier::new("TI16Column");
2478    o_prot.write_struct_begin(&struct_ident)?;
2479    o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::List, 1))?;
2480    o_prot.write_list_begin(&TListIdentifier::new(TType::I16, self.values.len() as i32))?;
2481    for e in &self.values {
2482      o_prot.write_i16(*e)?;
2483    }
2484    o_prot.write_list_end()?;
2485    o_prot.write_field_end()?;
2486    o_prot.write_field_begin(&TFieldIdentifier::new("nulls", TType::String, 2))?;
2487    o_prot.write_bytes(&self.nulls)?;
2488    o_prot.write_field_end()?;
2489    o_prot.write_field_stop()?;
2490    o_prot.write_struct_end()
2491  }
2492}
2493
2494//
2495// TI32Column
2496//
2497
2498#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2499pub struct TI32Column {
2500  pub values: Vec<i32>,
2501  pub nulls: Vec<u8>,
2502}
2503
2504impl TI32Column {
2505  pub fn new(values: Vec<i32>, nulls: Vec<u8>) -> TI32Column {
2506    TI32Column {
2507      values,
2508      nulls,
2509    }
2510  }
2511}
2512
2513impl TSerializable for TI32Column {
2514  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TI32Column> {
2515    i_prot.read_struct_begin()?;
2516    let mut f_1: Option<Vec<i32>> = None;
2517    let mut f_2: Option<Vec<u8>> = None;
2518    loop {
2519      let field_ident = i_prot.read_field_begin()?;
2520      if field_ident.field_type == TType::Stop {
2521        break;
2522      }
2523      let field_id = field_id(&field_ident)?;
2524      match field_id {
2525        1 => {
2526          let list_ident = i_prot.read_list_begin()?;
2527          let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize);
2528          for _ in 0..list_ident.size {
2529            let list_elem_12 = i_prot.read_i32()?;
2530            val.push(list_elem_12);
2531          }
2532          i_prot.read_list_end()?;
2533          f_1 = Some(val);
2534        },
2535        2 => {
2536          let val = i_prot.read_bytes()?;
2537          f_2 = Some(val);
2538        },
2539        _ => {
2540          i_prot.skip(field_ident.field_type)?;
2541        },
2542      };
2543      i_prot.read_field_end()?;
2544    }
2545    i_prot.read_struct_end()?;
2546    verify_required_field_exists("TI32Column.values", &f_1)?;
2547    verify_required_field_exists("TI32Column.nulls", &f_2)?;
2548    let ret = TI32Column {
2549      values: f_1.expect("auto-generated code should have checked for presence of required fields"),
2550      nulls: f_2.expect("auto-generated code should have checked for presence of required fields"),
2551    };
2552    Ok(ret)
2553  }
2554  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2555    let struct_ident = TStructIdentifier::new("TI32Column");
2556    o_prot.write_struct_begin(&struct_ident)?;
2557    o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::List, 1))?;
2558    o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.values.len() as i32))?;
2559    for e in &self.values {
2560      o_prot.write_i32(*e)?;
2561    }
2562    o_prot.write_list_end()?;
2563    o_prot.write_field_end()?;
2564    o_prot.write_field_begin(&TFieldIdentifier::new("nulls", TType::String, 2))?;
2565    o_prot.write_bytes(&self.nulls)?;
2566    o_prot.write_field_end()?;
2567    o_prot.write_field_stop()?;
2568    o_prot.write_struct_end()
2569  }
2570}
2571
2572//
2573// TI64Column
2574//
2575
2576#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2577pub struct TI64Column {
2578  pub values: Vec<i64>,
2579  pub nulls: Vec<u8>,
2580}
2581
2582impl TI64Column {
2583  pub fn new(values: Vec<i64>, nulls: Vec<u8>) -> TI64Column {
2584    TI64Column {
2585      values,
2586      nulls,
2587    }
2588  }
2589}
2590
2591impl TSerializable for TI64Column {
2592  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TI64Column> {
2593    i_prot.read_struct_begin()?;
2594    let mut f_1: Option<Vec<i64>> = None;
2595    let mut f_2: Option<Vec<u8>> = None;
2596    loop {
2597      let field_ident = i_prot.read_field_begin()?;
2598      if field_ident.field_type == TType::Stop {
2599        break;
2600      }
2601      let field_id = field_id(&field_ident)?;
2602      match field_id {
2603        1 => {
2604          let list_ident = i_prot.read_list_begin()?;
2605          let mut val: Vec<i64> = Vec::with_capacity(list_ident.size as usize);
2606          for _ in 0..list_ident.size {
2607            let list_elem_13 = i_prot.read_i64()?;
2608            val.push(list_elem_13);
2609          }
2610          i_prot.read_list_end()?;
2611          f_1 = Some(val);
2612        },
2613        2 => {
2614          let val = i_prot.read_bytes()?;
2615          f_2 = Some(val);
2616        },
2617        _ => {
2618          i_prot.skip(field_ident.field_type)?;
2619        },
2620      };
2621      i_prot.read_field_end()?;
2622    }
2623    i_prot.read_struct_end()?;
2624    verify_required_field_exists("TI64Column.values", &f_1)?;
2625    verify_required_field_exists("TI64Column.nulls", &f_2)?;
2626    let ret = TI64Column {
2627      values: f_1.expect("auto-generated code should have checked for presence of required fields"),
2628      nulls: f_2.expect("auto-generated code should have checked for presence of required fields"),
2629    };
2630    Ok(ret)
2631  }
2632  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2633    let struct_ident = TStructIdentifier::new("TI64Column");
2634    o_prot.write_struct_begin(&struct_ident)?;
2635    o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::List, 1))?;
2636    o_prot.write_list_begin(&TListIdentifier::new(TType::I64, self.values.len() as i32))?;
2637    for e in &self.values {
2638      o_prot.write_i64(*e)?;
2639    }
2640    o_prot.write_list_end()?;
2641    o_prot.write_field_end()?;
2642    o_prot.write_field_begin(&TFieldIdentifier::new("nulls", TType::String, 2))?;
2643    o_prot.write_bytes(&self.nulls)?;
2644    o_prot.write_field_end()?;
2645    o_prot.write_field_stop()?;
2646    o_prot.write_struct_end()
2647  }
2648}
2649
2650//
2651// TDoubleColumn
2652//
2653
2654#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2655pub struct TDoubleColumn {
2656  pub values: Vec<OrderedFloat<f64>>,
2657  pub nulls: Vec<u8>,
2658}
2659
2660impl TDoubleColumn {
2661  pub fn new(values: Vec<OrderedFloat<f64>>, nulls: Vec<u8>) -> TDoubleColumn {
2662    TDoubleColumn {
2663      values,
2664      nulls,
2665    }
2666  }
2667}
2668
2669impl TSerializable for TDoubleColumn {
2670  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TDoubleColumn> {
2671    i_prot.read_struct_begin()?;
2672    let mut f_1: Option<Vec<OrderedFloat<f64>>> = None;
2673    let mut f_2: Option<Vec<u8>> = None;
2674    loop {
2675      let field_ident = i_prot.read_field_begin()?;
2676      if field_ident.field_type == TType::Stop {
2677        break;
2678      }
2679      let field_id = field_id(&field_ident)?;
2680      match field_id {
2681        1 => {
2682          let list_ident = i_prot.read_list_begin()?;
2683          let mut val: Vec<OrderedFloat<f64>> = Vec::with_capacity(list_ident.size as usize);
2684          for _ in 0..list_ident.size {
2685            let list_elem_14 = OrderedFloat::from(i_prot.read_double()?);
2686            val.push(list_elem_14);
2687          }
2688          i_prot.read_list_end()?;
2689          f_1 = Some(val);
2690        },
2691        2 => {
2692          let val = i_prot.read_bytes()?;
2693          f_2 = Some(val);
2694        },
2695        _ => {
2696          i_prot.skip(field_ident.field_type)?;
2697        },
2698      };
2699      i_prot.read_field_end()?;
2700    }
2701    i_prot.read_struct_end()?;
2702    verify_required_field_exists("TDoubleColumn.values", &f_1)?;
2703    verify_required_field_exists("TDoubleColumn.nulls", &f_2)?;
2704    let ret = TDoubleColumn {
2705      values: f_1.expect("auto-generated code should have checked for presence of required fields"),
2706      nulls: f_2.expect("auto-generated code should have checked for presence of required fields"),
2707    };
2708    Ok(ret)
2709  }
2710  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2711    let struct_ident = TStructIdentifier::new("TDoubleColumn");
2712    o_prot.write_struct_begin(&struct_ident)?;
2713    o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::List, 1))?;
2714    o_prot.write_list_begin(&TListIdentifier::new(TType::Double, self.values.len() as i32))?;
2715    for e in &self.values {
2716      o_prot.write_double((*e).into())?;
2717    }
2718    o_prot.write_list_end()?;
2719    o_prot.write_field_end()?;
2720    o_prot.write_field_begin(&TFieldIdentifier::new("nulls", TType::String, 2))?;
2721    o_prot.write_bytes(&self.nulls)?;
2722    o_prot.write_field_end()?;
2723    o_prot.write_field_stop()?;
2724    o_prot.write_struct_end()
2725  }
2726}
2727
2728//
2729// TStringColumn
2730//
2731
2732#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2733pub struct TStringColumn {
2734  pub values: Vec<String>,
2735  pub nulls: Vec<u8>,
2736}
2737
2738impl TStringColumn {
2739  pub fn new(values: Vec<String>, nulls: Vec<u8>) -> TStringColumn {
2740    TStringColumn {
2741      values,
2742      nulls,
2743    }
2744  }
2745}
2746
2747impl TSerializable for TStringColumn {
2748  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TStringColumn> {
2749    i_prot.read_struct_begin()?;
2750    let mut f_1: Option<Vec<String>> = None;
2751    let mut f_2: Option<Vec<u8>> = None;
2752    loop {
2753      let field_ident = i_prot.read_field_begin()?;
2754      if field_ident.field_type == TType::Stop {
2755        break;
2756      }
2757      let field_id = field_id(&field_ident)?;
2758      match field_id {
2759        1 => {
2760          let list_ident = i_prot.read_list_begin()?;
2761          let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2762          for _ in 0..list_ident.size {
2763            let list_elem_15 = i_prot.read_string()?;
2764            val.push(list_elem_15);
2765          }
2766          i_prot.read_list_end()?;
2767          f_1 = Some(val);
2768        },
2769        2 => {
2770          let val = i_prot.read_bytes()?;
2771          f_2 = Some(val);
2772        },
2773        _ => {
2774          i_prot.skip(field_ident.field_type)?;
2775        },
2776      };
2777      i_prot.read_field_end()?;
2778    }
2779    i_prot.read_struct_end()?;
2780    verify_required_field_exists("TStringColumn.values", &f_1)?;
2781    verify_required_field_exists("TStringColumn.nulls", &f_2)?;
2782    let ret = TStringColumn {
2783      values: f_1.expect("auto-generated code should have checked for presence of required fields"),
2784      nulls: f_2.expect("auto-generated code should have checked for presence of required fields"),
2785    };
2786    Ok(ret)
2787  }
2788  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2789    let struct_ident = TStructIdentifier::new("TStringColumn");
2790    o_prot.write_struct_begin(&struct_ident)?;
2791    o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::List, 1))?;
2792    o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.values.len() as i32))?;
2793    for e in &self.values {
2794      o_prot.write_string(e)?;
2795    }
2796    o_prot.write_list_end()?;
2797    o_prot.write_field_end()?;
2798    o_prot.write_field_begin(&TFieldIdentifier::new("nulls", TType::String, 2))?;
2799    o_prot.write_bytes(&self.nulls)?;
2800    o_prot.write_field_end()?;
2801    o_prot.write_field_stop()?;
2802    o_prot.write_struct_end()
2803  }
2804}
2805
2806//
2807// TBinaryColumn
2808//
2809
2810#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2811pub struct TBinaryColumn {
2812  pub values: Vec<Vec<u8>>,
2813  pub nulls: Vec<u8>,
2814}
2815
2816impl TBinaryColumn {
2817  pub fn new(values: Vec<Vec<u8>>, nulls: Vec<u8>) -> TBinaryColumn {
2818    TBinaryColumn {
2819      values,
2820      nulls,
2821    }
2822  }
2823}
2824
2825impl TSerializable for TBinaryColumn {
2826  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TBinaryColumn> {
2827    i_prot.read_struct_begin()?;
2828    let mut f_1: Option<Vec<Vec<u8>>> = None;
2829    let mut f_2: Option<Vec<u8>> = None;
2830    loop {
2831      let field_ident = i_prot.read_field_begin()?;
2832      if field_ident.field_type == TType::Stop {
2833        break;
2834      }
2835      let field_id = field_id(&field_ident)?;
2836      match field_id {
2837        1 => {
2838          let list_ident = i_prot.read_list_begin()?;
2839          let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize);
2840          for _ in 0..list_ident.size {
2841            let list_elem_16 = i_prot.read_bytes()?;
2842            val.push(list_elem_16);
2843          }
2844          i_prot.read_list_end()?;
2845          f_1 = Some(val);
2846        },
2847        2 => {
2848          let val = i_prot.read_bytes()?;
2849          f_2 = Some(val);
2850        },
2851        _ => {
2852          i_prot.skip(field_ident.field_type)?;
2853        },
2854      };
2855      i_prot.read_field_end()?;
2856    }
2857    i_prot.read_struct_end()?;
2858    verify_required_field_exists("TBinaryColumn.values", &f_1)?;
2859    verify_required_field_exists("TBinaryColumn.nulls", &f_2)?;
2860    let ret = TBinaryColumn {
2861      values: f_1.expect("auto-generated code should have checked for presence of required fields"),
2862      nulls: f_2.expect("auto-generated code should have checked for presence of required fields"),
2863    };
2864    Ok(ret)
2865  }
2866  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2867    let struct_ident = TStructIdentifier::new("TBinaryColumn");
2868    o_prot.write_struct_begin(&struct_ident)?;
2869    o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::List, 1))?;
2870    o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.values.len() as i32))?;
2871    for e in &self.values {
2872      o_prot.write_bytes(e)?;
2873    }
2874    o_prot.write_list_end()?;
2875    o_prot.write_field_end()?;
2876    o_prot.write_field_begin(&TFieldIdentifier::new("nulls", TType::String, 2))?;
2877    o_prot.write_bytes(&self.nulls)?;
2878    o_prot.write_field_end()?;
2879    o_prot.write_field_stop()?;
2880    o_prot.write_struct_end()
2881  }
2882}
2883
2884//
2885// TColumn
2886//
2887
2888#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2889pub enum TColumn {
2890  BoolVal(TBoolColumn),
2891  ByteVal(TByteColumn),
2892  I16Val(TI16Column),
2893  I32Val(TI32Column),
2894  I64Val(TI64Column),
2895  DoubleVal(TDoubleColumn),
2896  StringVal(TStringColumn),
2897  BinaryVal(TBinaryColumn),
2898}
2899
2900impl TSerializable for TColumn {
2901  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TColumn> {
2902    let mut ret: Option<TColumn> = None;
2903    let mut received_field_count = 0;
2904    i_prot.read_struct_begin()?;
2905    loop {
2906      let field_ident = i_prot.read_field_begin()?;
2907      if field_ident.field_type == TType::Stop {
2908        break;
2909      }
2910      let field_id = field_id(&field_ident)?;
2911      match field_id {
2912        1 => {
2913          let val = TBoolColumn::read_from_in_protocol(i_prot)?;
2914          if ret.is_none() {
2915            ret = Some(TColumn::BoolVal(val));
2916          }
2917          received_field_count += 1;
2918        },
2919        2 => {
2920          let val = TByteColumn::read_from_in_protocol(i_prot)?;
2921          if ret.is_none() {
2922            ret = Some(TColumn::ByteVal(val));
2923          }
2924          received_field_count += 1;
2925        },
2926        3 => {
2927          let val = TI16Column::read_from_in_protocol(i_prot)?;
2928          if ret.is_none() {
2929            ret = Some(TColumn::I16Val(val));
2930          }
2931          received_field_count += 1;
2932        },
2933        4 => {
2934          let val = TI32Column::read_from_in_protocol(i_prot)?;
2935          if ret.is_none() {
2936            ret = Some(TColumn::I32Val(val));
2937          }
2938          received_field_count += 1;
2939        },
2940        5 => {
2941          let val = TI64Column::read_from_in_protocol(i_prot)?;
2942          if ret.is_none() {
2943            ret = Some(TColumn::I64Val(val));
2944          }
2945          received_field_count += 1;
2946        },
2947        6 => {
2948          let val = TDoubleColumn::read_from_in_protocol(i_prot)?;
2949          if ret.is_none() {
2950            ret = Some(TColumn::DoubleVal(val));
2951          }
2952          received_field_count += 1;
2953        },
2954        7 => {
2955          let val = TStringColumn::read_from_in_protocol(i_prot)?;
2956          if ret.is_none() {
2957            ret = Some(TColumn::StringVal(val));
2958          }
2959          received_field_count += 1;
2960        },
2961        8 => {
2962          let val = TBinaryColumn::read_from_in_protocol(i_prot)?;
2963          if ret.is_none() {
2964            ret = Some(TColumn::BinaryVal(val));
2965          }
2966          received_field_count += 1;
2967        },
2968        _ => {
2969          i_prot.skip(field_ident.field_type)?;
2970          received_field_count += 1;
2971        },
2972      };
2973      i_prot.read_field_end()?;
2974    }
2975    i_prot.read_struct_end()?;
2976    if received_field_count == 0 {
2977      Err(
2978        thrift::Error::Protocol(
2979          ProtocolError::new(
2980            ProtocolErrorKind::InvalidData,
2981            "received empty union from remote TColumn"
2982          )
2983        )
2984      )
2985    } else if received_field_count > 1 {
2986      Err(
2987        thrift::Error::Protocol(
2988          ProtocolError::new(
2989            ProtocolErrorKind::InvalidData,
2990            "received multiple fields for union from remote TColumn"
2991          )
2992        )
2993      )
2994    } else {
2995      Ok(ret.expect("return value should have been constructed"))
2996    }
2997  }
2998  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2999    let struct_ident = TStructIdentifier::new("TColumn");
3000    o_prot.write_struct_begin(&struct_ident)?;
3001    match *self {
3002      TColumn::BoolVal(ref f) => {
3003        o_prot.write_field_begin(&TFieldIdentifier::new("boolVal", TType::Struct, 1))?;
3004        f.write_to_out_protocol(o_prot)?;
3005        o_prot.write_field_end()?;
3006      },
3007      TColumn::ByteVal(ref f) => {
3008        o_prot.write_field_begin(&TFieldIdentifier::new("byteVal", TType::Struct, 2))?;
3009        f.write_to_out_protocol(o_prot)?;
3010        o_prot.write_field_end()?;
3011      },
3012      TColumn::I16Val(ref f) => {
3013        o_prot.write_field_begin(&TFieldIdentifier::new("i16Val", TType::Struct, 3))?;
3014        f.write_to_out_protocol(o_prot)?;
3015        o_prot.write_field_end()?;
3016      },
3017      TColumn::I32Val(ref f) => {
3018        o_prot.write_field_begin(&TFieldIdentifier::new("i32Val", TType::Struct, 4))?;
3019        f.write_to_out_protocol(o_prot)?;
3020        o_prot.write_field_end()?;
3021      },
3022      TColumn::I64Val(ref f) => {
3023        o_prot.write_field_begin(&TFieldIdentifier::new("i64Val", TType::Struct, 5))?;
3024        f.write_to_out_protocol(o_prot)?;
3025        o_prot.write_field_end()?;
3026      },
3027      TColumn::DoubleVal(ref f) => {
3028        o_prot.write_field_begin(&TFieldIdentifier::new("doubleVal", TType::Struct, 6))?;
3029        f.write_to_out_protocol(o_prot)?;
3030        o_prot.write_field_end()?;
3031      },
3032      TColumn::StringVal(ref f) => {
3033        o_prot.write_field_begin(&TFieldIdentifier::new("stringVal", TType::Struct, 7))?;
3034        f.write_to_out_protocol(o_prot)?;
3035        o_prot.write_field_end()?;
3036      },
3037      TColumn::BinaryVal(ref f) => {
3038        o_prot.write_field_begin(&TFieldIdentifier::new("binaryVal", TType::Struct, 8))?;
3039        f.write_to_out_protocol(o_prot)?;
3040        o_prot.write_field_end()?;
3041      },
3042    }
3043    o_prot.write_field_stop()?;
3044    o_prot.write_struct_end()
3045  }
3046}
3047
3048//
3049// TRowSet
3050//
3051
3052#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3053pub struct TRowSet {
3054  pub start_row_offset: i64,
3055  pub rows: Vec<TRow>,
3056  pub columns: Option<Vec<TColumn>>,
3057  pub binary_columns: Option<Vec<u8>>,
3058  pub column_count: Option<i32>,
3059}
3060
3061impl TRowSet {
3062  pub fn new<F3, F4, F5>(start_row_offset: i64, rows: Vec<TRow>, columns: F3, binary_columns: F4, column_count: F5) -> TRowSet where F3: Into<Option<Vec<TColumn>>>, F4: Into<Option<Vec<u8>>>, F5: Into<Option<i32>> {
3063    TRowSet {
3064      start_row_offset,
3065      rows,
3066      columns: columns.into(),
3067      binary_columns: binary_columns.into(),
3068      column_count: column_count.into(),
3069    }
3070  }
3071}
3072
3073impl TSerializable for TRowSet {
3074  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TRowSet> {
3075    i_prot.read_struct_begin()?;
3076    let mut f_1: Option<i64> = None;
3077    let mut f_2: Option<Vec<TRow>> = None;
3078    let mut f_3: Option<Vec<TColumn>> = None;
3079    let mut f_4: Option<Vec<u8>> = None;
3080    let mut f_5: Option<i32> = None;
3081    loop {
3082      let field_ident = i_prot.read_field_begin()?;
3083      if field_ident.field_type == TType::Stop {
3084        break;
3085      }
3086      let field_id = field_id(&field_ident)?;
3087      match field_id {
3088        1 => {
3089          let val = i_prot.read_i64()?;
3090          f_1 = Some(val);
3091        },
3092        2 => {
3093          let list_ident = i_prot.read_list_begin()?;
3094          let mut val: Vec<TRow> = Vec::with_capacity(list_ident.size as usize);
3095          for _ in 0..list_ident.size {
3096            let list_elem_17 = TRow::read_from_in_protocol(i_prot)?;
3097            val.push(list_elem_17);
3098          }
3099          i_prot.read_list_end()?;
3100          f_2 = Some(val);
3101        },
3102        3 => {
3103          let list_ident = i_prot.read_list_begin()?;
3104          let mut val: Vec<TColumn> = Vec::with_capacity(list_ident.size as usize);
3105          for _ in 0..list_ident.size {
3106            let list_elem_18 = TColumn::read_from_in_protocol(i_prot)?;
3107            val.push(list_elem_18);
3108          }
3109          i_prot.read_list_end()?;
3110          f_3 = Some(val);
3111        },
3112        4 => {
3113          let val = i_prot.read_bytes()?;
3114          f_4 = Some(val);
3115        },
3116        5 => {
3117          let val = i_prot.read_i32()?;
3118          f_5 = Some(val);
3119        },
3120        _ => {
3121          i_prot.skip(field_ident.field_type)?;
3122        },
3123      };
3124      i_prot.read_field_end()?;
3125    }
3126    i_prot.read_struct_end()?;
3127    verify_required_field_exists("TRowSet.start_row_offset", &f_1)?;
3128    verify_required_field_exists("TRowSet.rows", &f_2)?;
3129    let ret = TRowSet {
3130      start_row_offset: f_1.expect("auto-generated code should have checked for presence of required fields"),
3131      rows: f_2.expect("auto-generated code should have checked for presence of required fields"),
3132      columns: f_3,
3133      binary_columns: f_4,
3134      column_count: f_5,
3135    };
3136    Ok(ret)
3137  }
3138  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3139    let struct_ident = TStructIdentifier::new("TRowSet");
3140    o_prot.write_struct_begin(&struct_ident)?;
3141    o_prot.write_field_begin(&TFieldIdentifier::new("startRowOffset", TType::I64, 1))?;
3142    o_prot.write_i64(self.start_row_offset)?;
3143    o_prot.write_field_end()?;
3144    o_prot.write_field_begin(&TFieldIdentifier::new("rows", TType::List, 2))?;
3145    o_prot.write_list_begin(&TListIdentifier::new(TType::Struct, self.rows.len() as i32))?;
3146    for e in &self.rows {
3147      e.write_to_out_protocol(o_prot)?;
3148    }
3149    o_prot.write_list_end()?;
3150    o_prot.write_field_end()?;
3151    if let Some(ref fld_var) = self.columns {
3152      o_prot.write_field_begin(&TFieldIdentifier::new("columns", TType::List, 3))?;
3153      o_prot.write_list_begin(&TListIdentifier::new(TType::Struct, fld_var.len() as i32))?;
3154      for e in fld_var {
3155        e.write_to_out_protocol(o_prot)?;
3156      }
3157      o_prot.write_list_end()?;
3158      o_prot.write_field_end()?
3159    }
3160    if let Some(ref fld_var) = self.binary_columns {
3161      o_prot.write_field_begin(&TFieldIdentifier::new("binaryColumns", TType::String, 4))?;
3162      o_prot.write_bytes(fld_var)?;
3163      o_prot.write_field_end()?
3164    }
3165    if let Some(fld_var) = self.column_count {
3166      o_prot.write_field_begin(&TFieldIdentifier::new("columnCount", TType::I32, 5))?;
3167      o_prot.write_i32(fld_var)?;
3168      o_prot.write_field_end()?
3169    }
3170    o_prot.write_field_stop()?;
3171    o_prot.write_struct_end()
3172  }
3173}
3174
3175//
3176// TStatus
3177//
3178
3179#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3180pub struct TStatus {
3181  pub status_code: TStatusCode,
3182  pub info_messages: Option<Vec<String>>,
3183  pub sql_state: Option<String>,
3184  pub error_code: Option<i32>,
3185  pub error_message: Option<String>,
3186}
3187
3188impl TStatus {
3189  pub fn new<F2, F3, F4, F5>(status_code: TStatusCode, info_messages: F2, sql_state: F3, error_code: F4, error_message: F5) -> TStatus where F2: Into<Option<Vec<String>>>, F3: Into<Option<String>>, F4: Into<Option<i32>>, F5: Into<Option<String>> {
3190    TStatus {
3191      status_code,
3192      info_messages: info_messages.into(),
3193      sql_state: sql_state.into(),
3194      error_code: error_code.into(),
3195      error_message: error_message.into(),
3196    }
3197  }
3198}
3199
3200impl TSerializable for TStatus {
3201  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TStatus> {
3202    i_prot.read_struct_begin()?;
3203    let mut f_1: Option<TStatusCode> = None;
3204    let mut f_2: Option<Vec<String>> = None;
3205    let mut f_3: Option<String> = None;
3206    let mut f_4: Option<i32> = None;
3207    let mut f_5: Option<String> = None;
3208    loop {
3209      let field_ident = i_prot.read_field_begin()?;
3210      if field_ident.field_type == TType::Stop {
3211        break;
3212      }
3213      let field_id = field_id(&field_ident)?;
3214      match field_id {
3215        1 => {
3216          let val = TStatusCode::read_from_in_protocol(i_prot)?;
3217          f_1 = Some(val);
3218        },
3219        2 => {
3220          let list_ident = i_prot.read_list_begin()?;
3221          let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
3222          for _ in 0..list_ident.size {
3223            let list_elem_19 = i_prot.read_string()?;
3224            val.push(list_elem_19);
3225          }
3226          i_prot.read_list_end()?;
3227          f_2 = Some(val);
3228        },
3229        3 => {
3230          let val = i_prot.read_string()?;
3231          f_3 = Some(val);
3232        },
3233        4 => {
3234          let val = i_prot.read_i32()?;
3235          f_4 = Some(val);
3236        },
3237        5 => {
3238          let val = i_prot.read_string()?;
3239          f_5 = Some(val);
3240        },
3241        _ => {
3242          i_prot.skip(field_ident.field_type)?;
3243        },
3244      };
3245      i_prot.read_field_end()?;
3246    }
3247    i_prot.read_struct_end()?;
3248    verify_required_field_exists("TStatus.status_code", &f_1)?;
3249    let ret = TStatus {
3250      status_code: f_1.expect("auto-generated code should have checked for presence of required fields"),
3251      info_messages: f_2,
3252      sql_state: f_3,
3253      error_code: f_4,
3254      error_message: f_5,
3255    };
3256    Ok(ret)
3257  }
3258  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3259    let struct_ident = TStructIdentifier::new("TStatus");
3260    o_prot.write_struct_begin(&struct_ident)?;
3261    o_prot.write_field_begin(&TFieldIdentifier::new("statusCode", TType::I32, 1))?;
3262    self.status_code.write_to_out_protocol(o_prot)?;
3263    o_prot.write_field_end()?;
3264    if let Some(ref fld_var) = self.info_messages {
3265      o_prot.write_field_begin(&TFieldIdentifier::new("infoMessages", TType::List, 2))?;
3266      o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?;
3267      for e in fld_var {
3268        o_prot.write_string(e)?;
3269      }
3270      o_prot.write_list_end()?;
3271      o_prot.write_field_end()?
3272    }
3273    if let Some(ref fld_var) = self.sql_state {
3274      o_prot.write_field_begin(&TFieldIdentifier::new("sqlState", TType::String, 3))?;
3275      o_prot.write_string(fld_var)?;
3276      o_prot.write_field_end()?
3277    }
3278    if let Some(fld_var) = self.error_code {
3279      o_prot.write_field_begin(&TFieldIdentifier::new("errorCode", TType::I32, 4))?;
3280      o_prot.write_i32(fld_var)?;
3281      o_prot.write_field_end()?
3282    }
3283    if let Some(ref fld_var) = self.error_message {
3284      o_prot.write_field_begin(&TFieldIdentifier::new("errorMessage", TType::String, 5))?;
3285      o_prot.write_string(fld_var)?;
3286      o_prot.write_field_end()?
3287    }
3288    o_prot.write_field_stop()?;
3289    o_prot.write_struct_end()
3290  }
3291}
3292
3293//
3294// THandleIdentifier
3295//
3296
3297#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3298pub struct THandleIdentifier {
3299  pub guid: Vec<u8>,
3300  pub secret: Vec<u8>,
3301}
3302
3303impl THandleIdentifier {
3304  pub fn new(guid: Vec<u8>, secret: Vec<u8>) -> THandleIdentifier {
3305    THandleIdentifier {
3306      guid,
3307      secret,
3308    }
3309  }
3310}
3311
3312impl TSerializable for THandleIdentifier {
3313  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<THandleIdentifier> {
3314    i_prot.read_struct_begin()?;
3315    let mut f_1: Option<Vec<u8>> = None;
3316    let mut f_2: Option<Vec<u8>> = None;
3317    loop {
3318      let field_ident = i_prot.read_field_begin()?;
3319      if field_ident.field_type == TType::Stop {
3320        break;
3321      }
3322      let field_id = field_id(&field_ident)?;
3323      match field_id {
3324        1 => {
3325          let val = i_prot.read_bytes()?;
3326          f_1 = Some(val);
3327        },
3328        2 => {
3329          let val = i_prot.read_bytes()?;
3330          f_2 = Some(val);
3331        },
3332        _ => {
3333          i_prot.skip(field_ident.field_type)?;
3334        },
3335      };
3336      i_prot.read_field_end()?;
3337    }
3338    i_prot.read_struct_end()?;
3339    verify_required_field_exists("THandleIdentifier.guid", &f_1)?;
3340    verify_required_field_exists("THandleIdentifier.secret", &f_2)?;
3341    let ret = THandleIdentifier {
3342      guid: f_1.expect("auto-generated code should have checked for presence of required fields"),
3343      secret: f_2.expect("auto-generated code should have checked for presence of required fields"),
3344    };
3345    Ok(ret)
3346  }
3347  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3348    let struct_ident = TStructIdentifier::new("THandleIdentifier");
3349    o_prot.write_struct_begin(&struct_ident)?;
3350    o_prot.write_field_begin(&TFieldIdentifier::new("guid", TType::String, 1))?;
3351    o_prot.write_bytes(&self.guid)?;
3352    o_prot.write_field_end()?;
3353    o_prot.write_field_begin(&TFieldIdentifier::new("secret", TType::String, 2))?;
3354    o_prot.write_bytes(&self.secret)?;
3355    o_prot.write_field_end()?;
3356    o_prot.write_field_stop()?;
3357    o_prot.write_struct_end()
3358  }
3359}
3360
3361//
3362// TSessionHandle
3363//
3364
3365#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3366pub struct TSessionHandle {
3367  pub session_id: THandleIdentifier,
3368}
3369
3370impl TSessionHandle {
3371  pub fn new(session_id: THandleIdentifier) -> TSessionHandle {
3372    TSessionHandle {
3373      session_id,
3374    }
3375  }
3376}
3377
3378impl TSerializable for TSessionHandle {
3379  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSessionHandle> {
3380    i_prot.read_struct_begin()?;
3381    let mut f_1: Option<THandleIdentifier> = None;
3382    loop {
3383      let field_ident = i_prot.read_field_begin()?;
3384      if field_ident.field_type == TType::Stop {
3385        break;
3386      }
3387      let field_id = field_id(&field_ident)?;
3388      match field_id {
3389        1 => {
3390          let val = THandleIdentifier::read_from_in_protocol(i_prot)?;
3391          f_1 = Some(val);
3392        },
3393        _ => {
3394          i_prot.skip(field_ident.field_type)?;
3395        },
3396      };
3397      i_prot.read_field_end()?;
3398    }
3399    i_prot.read_struct_end()?;
3400    verify_required_field_exists("TSessionHandle.session_id", &f_1)?;
3401    let ret = TSessionHandle {
3402      session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
3403    };
3404    Ok(ret)
3405  }
3406  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3407    let struct_ident = TStructIdentifier::new("TSessionHandle");
3408    o_prot.write_struct_begin(&struct_ident)?;
3409    o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::Struct, 1))?;
3410    self.session_id.write_to_out_protocol(o_prot)?;
3411    o_prot.write_field_end()?;
3412    o_prot.write_field_stop()?;
3413    o_prot.write_struct_end()
3414  }
3415}
3416
3417//
3418// TOperationHandle
3419//
3420
3421#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3422pub struct TOperationHandle {
3423  pub operation_id: THandleIdentifier,
3424  pub operation_type: TOperationType,
3425  pub has_result_set: bool,
3426  pub modified_row_count: Option<OrderedFloat<f64>>,
3427}
3428
3429impl TOperationHandle {
3430  pub fn new<F4>(operation_id: THandleIdentifier, operation_type: TOperationType, has_result_set: bool, modified_row_count: F4) -> TOperationHandle where F4: Into<Option<OrderedFloat<f64>>> {
3431    TOperationHandle {
3432      operation_id,
3433      operation_type,
3434      has_result_set,
3435      modified_row_count: modified_row_count.into(),
3436    }
3437  }
3438}
3439
3440impl TSerializable for TOperationHandle {
3441  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TOperationHandle> {
3442    i_prot.read_struct_begin()?;
3443    let mut f_1: Option<THandleIdentifier> = None;
3444    let mut f_2: Option<TOperationType> = None;
3445    let mut f_3: Option<bool> = None;
3446    let mut f_4: Option<OrderedFloat<f64>> = None;
3447    loop {
3448      let field_ident = i_prot.read_field_begin()?;
3449      if field_ident.field_type == TType::Stop {
3450        break;
3451      }
3452      let field_id = field_id(&field_ident)?;
3453      match field_id {
3454        1 => {
3455          let val = THandleIdentifier::read_from_in_protocol(i_prot)?;
3456          f_1 = Some(val);
3457        },
3458        2 => {
3459          let val = TOperationType::read_from_in_protocol(i_prot)?;
3460          f_2 = Some(val);
3461        },
3462        3 => {
3463          let val = i_prot.read_bool()?;
3464          f_3 = Some(val);
3465        },
3466        4 => {
3467          let val = OrderedFloat::from(i_prot.read_double()?);
3468          f_4 = Some(val);
3469        },
3470        _ => {
3471          i_prot.skip(field_ident.field_type)?;
3472        },
3473      };
3474      i_prot.read_field_end()?;
3475    }
3476    i_prot.read_struct_end()?;
3477    verify_required_field_exists("TOperationHandle.operation_id", &f_1)?;
3478    verify_required_field_exists("TOperationHandle.operation_type", &f_2)?;
3479    verify_required_field_exists("TOperationHandle.has_result_set", &f_3)?;
3480    let ret = TOperationHandle {
3481      operation_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
3482      operation_type: f_2.expect("auto-generated code should have checked for presence of required fields"),
3483      has_result_set: f_3.expect("auto-generated code should have checked for presence of required fields"),
3484      modified_row_count: f_4,
3485    };
3486    Ok(ret)
3487  }
3488  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3489    let struct_ident = TStructIdentifier::new("TOperationHandle");
3490    o_prot.write_struct_begin(&struct_ident)?;
3491    o_prot.write_field_begin(&TFieldIdentifier::new("operationId", TType::Struct, 1))?;
3492    self.operation_id.write_to_out_protocol(o_prot)?;
3493    o_prot.write_field_end()?;
3494    o_prot.write_field_begin(&TFieldIdentifier::new("operationType", TType::I32, 2))?;
3495    self.operation_type.write_to_out_protocol(o_prot)?;
3496    o_prot.write_field_end()?;
3497    o_prot.write_field_begin(&TFieldIdentifier::new("hasResultSet", TType::Bool, 3))?;
3498    o_prot.write_bool(self.has_result_set)?;
3499    o_prot.write_field_end()?;
3500    if let Some(fld_var) = self.modified_row_count {
3501      o_prot.write_field_begin(&TFieldIdentifier::new("modifiedRowCount", TType::Double, 4))?;
3502      o_prot.write_double(fld_var.into())?;
3503      o_prot.write_field_end()?
3504    }
3505    o_prot.write_field_stop()?;
3506    o_prot.write_struct_end()
3507  }
3508}
3509
3510//
3511// TOpenSessionReq
3512//
3513
3514#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3515pub struct TOpenSessionReq {
3516  pub client_protocol: TProtocolVersion,
3517  pub username: Option<String>,
3518  pub password: Option<String>,
3519  pub configuration: Option<BTreeMap<String, String>>,
3520}
3521
3522impl TOpenSessionReq {
3523  pub fn new<F2, F3, F4>(client_protocol: TProtocolVersion, username: F2, password: F3, configuration: F4) -> TOpenSessionReq where F2: Into<Option<String>>, F3: Into<Option<String>>, F4: Into<Option<BTreeMap<String, String>>> {
3524    TOpenSessionReq {
3525      client_protocol,
3526      username: username.into(),
3527      password: password.into(),
3528      configuration: configuration.into(),
3529    }
3530  }
3531}
3532
3533impl TSerializable for TOpenSessionReq {
3534  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TOpenSessionReq> {
3535    i_prot.read_struct_begin()?;
3536    let mut f_1: Option<TProtocolVersion> = None;
3537    let mut f_2: Option<String> = None;
3538    let mut f_3: Option<String> = None;
3539    let mut f_4: Option<BTreeMap<String, String>> = None;
3540    loop {
3541      let field_ident = i_prot.read_field_begin()?;
3542      if field_ident.field_type == TType::Stop {
3543        break;
3544      }
3545      let field_id = field_id(&field_ident)?;
3546      match field_id {
3547        1 => {
3548          let val = TProtocolVersion::read_from_in_protocol(i_prot)?;
3549          f_1 = Some(val);
3550        },
3551        2 => {
3552          let val = i_prot.read_string()?;
3553          f_2 = Some(val);
3554        },
3555        3 => {
3556          let val = i_prot.read_string()?;
3557          f_3 = Some(val);
3558        },
3559        4 => {
3560          let map_ident = i_prot.read_map_begin()?;
3561          let mut val: BTreeMap<String, String> = BTreeMap::new();
3562          for _ in 0..map_ident.size {
3563            let map_key_20 = i_prot.read_string()?;
3564            let map_val_21 = i_prot.read_string()?;
3565            val.insert(map_key_20, map_val_21);
3566          }
3567          i_prot.read_map_end()?;
3568          f_4 = Some(val);
3569        },
3570        _ => {
3571          i_prot.skip(field_ident.field_type)?;
3572        },
3573      };
3574      i_prot.read_field_end()?;
3575    }
3576    i_prot.read_struct_end()?;
3577    verify_required_field_exists("TOpenSessionReq.client_protocol", &f_1)?;
3578    let ret = TOpenSessionReq {
3579      client_protocol: f_1.expect("auto-generated code should have checked for presence of required fields"),
3580      username: f_2,
3581      password: f_3,
3582      configuration: f_4,
3583    };
3584    Ok(ret)
3585  }
3586  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3587    let struct_ident = TStructIdentifier::new("TOpenSessionReq");
3588    o_prot.write_struct_begin(&struct_ident)?;
3589    o_prot.write_field_begin(&TFieldIdentifier::new("client_protocol", TType::I32, 1))?;
3590    self.client_protocol.write_to_out_protocol(o_prot)?;
3591    o_prot.write_field_end()?;
3592    if let Some(ref fld_var) = self.username {
3593      o_prot.write_field_begin(&TFieldIdentifier::new("username", TType::String, 2))?;
3594      o_prot.write_string(fld_var)?;
3595      o_prot.write_field_end()?
3596    }
3597    if let Some(ref fld_var) = self.password {
3598      o_prot.write_field_begin(&TFieldIdentifier::new("password", TType::String, 3))?;
3599      o_prot.write_string(fld_var)?;
3600      o_prot.write_field_end()?
3601    }
3602    if let Some(ref fld_var) = self.configuration {
3603      o_prot.write_field_begin(&TFieldIdentifier::new("configuration", TType::Map, 4))?;
3604      o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?;
3605      for (k, v) in fld_var {
3606        o_prot.write_string(k)?;
3607        o_prot.write_string(v)?;
3608      }
3609      o_prot.write_map_end()?;
3610      o_prot.write_field_end()?
3611    }
3612    o_prot.write_field_stop()?;
3613    o_prot.write_struct_end()
3614  }
3615}
3616
3617//
3618// TOpenSessionResp
3619//
3620
3621#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3622pub struct TOpenSessionResp {
3623  pub status: TStatus,
3624  pub server_protocol_version: TProtocolVersion,
3625  pub session_handle: Option<TSessionHandle>,
3626  pub configuration: Option<BTreeMap<String, String>>,
3627}
3628
3629impl TOpenSessionResp {
3630  pub fn new<F3, F4>(status: TStatus, server_protocol_version: TProtocolVersion, session_handle: F3, configuration: F4) -> TOpenSessionResp where F3: Into<Option<TSessionHandle>>, F4: Into<Option<BTreeMap<String, String>>> {
3631    TOpenSessionResp {
3632      status,
3633      server_protocol_version,
3634      session_handle: session_handle.into(),
3635      configuration: configuration.into(),
3636    }
3637  }
3638}
3639
3640impl TSerializable for TOpenSessionResp {
3641  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TOpenSessionResp> {
3642    i_prot.read_struct_begin()?;
3643    let mut f_1: Option<TStatus> = None;
3644    let mut f_2: Option<TProtocolVersion> = None;
3645    let mut f_3: Option<TSessionHandle> = None;
3646    let mut f_4: Option<BTreeMap<String, String>> = None;
3647    loop {
3648      let field_ident = i_prot.read_field_begin()?;
3649      if field_ident.field_type == TType::Stop {
3650        break;
3651      }
3652      let field_id = field_id(&field_ident)?;
3653      match field_id {
3654        1 => {
3655          let val = TStatus::read_from_in_protocol(i_prot)?;
3656          f_1 = Some(val);
3657        },
3658        2 => {
3659          let val = TProtocolVersion::read_from_in_protocol(i_prot)?;
3660          f_2 = Some(val);
3661        },
3662        3 => {
3663          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
3664          f_3 = Some(val);
3665        },
3666        4 => {
3667          let map_ident = i_prot.read_map_begin()?;
3668          let mut val: BTreeMap<String, String> = BTreeMap::new();
3669          for _ in 0..map_ident.size {
3670            let map_key_22 = i_prot.read_string()?;
3671            let map_val_23 = i_prot.read_string()?;
3672            val.insert(map_key_22, map_val_23);
3673          }
3674          i_prot.read_map_end()?;
3675          f_4 = Some(val);
3676        },
3677        _ => {
3678          i_prot.skip(field_ident.field_type)?;
3679        },
3680      };
3681      i_prot.read_field_end()?;
3682    }
3683    i_prot.read_struct_end()?;
3684    verify_required_field_exists("TOpenSessionResp.status", &f_1)?;
3685    verify_required_field_exists("TOpenSessionResp.server_protocol_version", &f_2)?;
3686    let ret = TOpenSessionResp {
3687      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
3688      server_protocol_version: f_2.expect("auto-generated code should have checked for presence of required fields"),
3689      session_handle: f_3,
3690      configuration: f_4,
3691    };
3692    Ok(ret)
3693  }
3694  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3695    let struct_ident = TStructIdentifier::new("TOpenSessionResp");
3696    o_prot.write_struct_begin(&struct_ident)?;
3697    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
3698    self.status.write_to_out_protocol(o_prot)?;
3699    o_prot.write_field_end()?;
3700    o_prot.write_field_begin(&TFieldIdentifier::new("serverProtocolVersion", TType::I32, 2))?;
3701    self.server_protocol_version.write_to_out_protocol(o_prot)?;
3702    o_prot.write_field_end()?;
3703    if let Some(ref fld_var) = self.session_handle {
3704      o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 3))?;
3705      fld_var.write_to_out_protocol(o_prot)?;
3706      o_prot.write_field_end()?
3707    }
3708    if let Some(ref fld_var) = self.configuration {
3709      o_prot.write_field_begin(&TFieldIdentifier::new("configuration", TType::Map, 4))?;
3710      o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?;
3711      for (k, v) in fld_var {
3712        o_prot.write_string(k)?;
3713        o_prot.write_string(v)?;
3714      }
3715      o_prot.write_map_end()?;
3716      o_prot.write_field_end()?
3717    }
3718    o_prot.write_field_stop()?;
3719    o_prot.write_struct_end()
3720  }
3721}
3722
3723//
3724// TSetClientInfoReq
3725//
3726
3727#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3728pub struct TSetClientInfoReq {
3729  pub session_handle: TSessionHandle,
3730  pub configuration: Option<BTreeMap<String, String>>,
3731}
3732
3733impl TSetClientInfoReq {
3734  pub fn new<F2>(session_handle: TSessionHandle, configuration: F2) -> TSetClientInfoReq where F2: Into<Option<BTreeMap<String, String>>> {
3735    TSetClientInfoReq {
3736      session_handle,
3737      configuration: configuration.into(),
3738    }
3739  }
3740}
3741
3742impl TSerializable for TSetClientInfoReq {
3743  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSetClientInfoReq> {
3744    i_prot.read_struct_begin()?;
3745    let mut f_1: Option<TSessionHandle> = None;
3746    let mut f_2: Option<BTreeMap<String, String>> = None;
3747    loop {
3748      let field_ident = i_prot.read_field_begin()?;
3749      if field_ident.field_type == TType::Stop {
3750        break;
3751      }
3752      let field_id = field_id(&field_ident)?;
3753      match field_id {
3754        1 => {
3755          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
3756          f_1 = Some(val);
3757        },
3758        2 => {
3759          let map_ident = i_prot.read_map_begin()?;
3760          let mut val: BTreeMap<String, String> = BTreeMap::new();
3761          for _ in 0..map_ident.size {
3762            let map_key_24 = i_prot.read_string()?;
3763            let map_val_25 = i_prot.read_string()?;
3764            val.insert(map_key_24, map_val_25);
3765          }
3766          i_prot.read_map_end()?;
3767          f_2 = Some(val);
3768        },
3769        _ => {
3770          i_prot.skip(field_ident.field_type)?;
3771        },
3772      };
3773      i_prot.read_field_end()?;
3774    }
3775    i_prot.read_struct_end()?;
3776    verify_required_field_exists("TSetClientInfoReq.session_handle", &f_1)?;
3777    let ret = TSetClientInfoReq {
3778      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
3779      configuration: f_2,
3780    };
3781    Ok(ret)
3782  }
3783  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3784    let struct_ident = TStructIdentifier::new("TSetClientInfoReq");
3785    o_prot.write_struct_begin(&struct_ident)?;
3786    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
3787    self.session_handle.write_to_out_protocol(o_prot)?;
3788    o_prot.write_field_end()?;
3789    if let Some(ref fld_var) = self.configuration {
3790      o_prot.write_field_begin(&TFieldIdentifier::new("configuration", TType::Map, 2))?;
3791      o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?;
3792      for (k, v) in fld_var {
3793        o_prot.write_string(k)?;
3794        o_prot.write_string(v)?;
3795      }
3796      o_prot.write_map_end()?;
3797      o_prot.write_field_end()?
3798    }
3799    o_prot.write_field_stop()?;
3800    o_prot.write_struct_end()
3801  }
3802}
3803
3804//
3805// TSetClientInfoResp
3806//
3807
3808#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3809pub struct TSetClientInfoResp {
3810  pub status: TStatus,
3811}
3812
3813impl TSetClientInfoResp {
3814  pub fn new(status: TStatus) -> TSetClientInfoResp {
3815    TSetClientInfoResp {
3816      status,
3817    }
3818  }
3819}
3820
3821impl TSerializable for TSetClientInfoResp {
3822  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSetClientInfoResp> {
3823    i_prot.read_struct_begin()?;
3824    let mut f_1: Option<TStatus> = None;
3825    loop {
3826      let field_ident = i_prot.read_field_begin()?;
3827      if field_ident.field_type == TType::Stop {
3828        break;
3829      }
3830      let field_id = field_id(&field_ident)?;
3831      match field_id {
3832        1 => {
3833          let val = TStatus::read_from_in_protocol(i_prot)?;
3834          f_1 = Some(val);
3835        },
3836        _ => {
3837          i_prot.skip(field_ident.field_type)?;
3838        },
3839      };
3840      i_prot.read_field_end()?;
3841    }
3842    i_prot.read_struct_end()?;
3843    verify_required_field_exists("TSetClientInfoResp.status", &f_1)?;
3844    let ret = TSetClientInfoResp {
3845      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
3846    };
3847    Ok(ret)
3848  }
3849  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3850    let struct_ident = TStructIdentifier::new("TSetClientInfoResp");
3851    o_prot.write_struct_begin(&struct_ident)?;
3852    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
3853    self.status.write_to_out_protocol(o_prot)?;
3854    o_prot.write_field_end()?;
3855    o_prot.write_field_stop()?;
3856    o_prot.write_struct_end()
3857  }
3858}
3859
3860//
3861// TCloseSessionReq
3862//
3863
3864#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3865pub struct TCloseSessionReq {
3866  pub session_handle: TSessionHandle,
3867}
3868
3869impl TCloseSessionReq {
3870  pub fn new(session_handle: TSessionHandle) -> TCloseSessionReq {
3871    TCloseSessionReq {
3872      session_handle,
3873    }
3874  }
3875}
3876
3877impl TSerializable for TCloseSessionReq {
3878  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCloseSessionReq> {
3879    i_prot.read_struct_begin()?;
3880    let mut f_1: Option<TSessionHandle> = None;
3881    loop {
3882      let field_ident = i_prot.read_field_begin()?;
3883      if field_ident.field_type == TType::Stop {
3884        break;
3885      }
3886      let field_id = field_id(&field_ident)?;
3887      match field_id {
3888        1 => {
3889          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
3890          f_1 = Some(val);
3891        },
3892        _ => {
3893          i_prot.skip(field_ident.field_type)?;
3894        },
3895      };
3896      i_prot.read_field_end()?;
3897    }
3898    i_prot.read_struct_end()?;
3899    verify_required_field_exists("TCloseSessionReq.session_handle", &f_1)?;
3900    let ret = TCloseSessionReq {
3901      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
3902    };
3903    Ok(ret)
3904  }
3905  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3906    let struct_ident = TStructIdentifier::new("TCloseSessionReq");
3907    o_prot.write_struct_begin(&struct_ident)?;
3908    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
3909    self.session_handle.write_to_out_protocol(o_prot)?;
3910    o_prot.write_field_end()?;
3911    o_prot.write_field_stop()?;
3912    o_prot.write_struct_end()
3913  }
3914}
3915
3916//
3917// TCloseSessionResp
3918//
3919
3920#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3921pub struct TCloseSessionResp {
3922  pub status: TStatus,
3923}
3924
3925impl TCloseSessionResp {
3926  pub fn new(status: TStatus) -> TCloseSessionResp {
3927    TCloseSessionResp {
3928      status,
3929    }
3930  }
3931}
3932
3933impl TSerializable for TCloseSessionResp {
3934  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCloseSessionResp> {
3935    i_prot.read_struct_begin()?;
3936    let mut f_1: Option<TStatus> = None;
3937    loop {
3938      let field_ident = i_prot.read_field_begin()?;
3939      if field_ident.field_type == TType::Stop {
3940        break;
3941      }
3942      let field_id = field_id(&field_ident)?;
3943      match field_id {
3944        1 => {
3945          let val = TStatus::read_from_in_protocol(i_prot)?;
3946          f_1 = Some(val);
3947        },
3948        _ => {
3949          i_prot.skip(field_ident.field_type)?;
3950        },
3951      };
3952      i_prot.read_field_end()?;
3953    }
3954    i_prot.read_struct_end()?;
3955    verify_required_field_exists("TCloseSessionResp.status", &f_1)?;
3956    let ret = TCloseSessionResp {
3957      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
3958    };
3959    Ok(ret)
3960  }
3961  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3962    let struct_ident = TStructIdentifier::new("TCloseSessionResp");
3963    o_prot.write_struct_begin(&struct_ident)?;
3964    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
3965    self.status.write_to_out_protocol(o_prot)?;
3966    o_prot.write_field_end()?;
3967    o_prot.write_field_stop()?;
3968    o_prot.write_struct_end()
3969  }
3970}
3971
3972//
3973// TGetInfoValue
3974//
3975
3976#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3977pub enum TGetInfoValue {
3978  StringValue(String),
3979  SmallIntValue(i16),
3980  IntegerBitmask(i32),
3981  IntegerFlag(i32),
3982  BinaryValue(i32),
3983  LenValue(i64),
3984}
3985
3986impl TSerializable for TGetInfoValue {
3987  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetInfoValue> {
3988    let mut ret: Option<TGetInfoValue> = None;
3989    let mut received_field_count = 0;
3990    i_prot.read_struct_begin()?;
3991    loop {
3992      let field_ident = i_prot.read_field_begin()?;
3993      if field_ident.field_type == TType::Stop {
3994        break;
3995      }
3996      let field_id = field_id(&field_ident)?;
3997      match field_id {
3998        1 => {
3999          let val = i_prot.read_string()?;
4000          if ret.is_none() {
4001            ret = Some(TGetInfoValue::StringValue(val));
4002          }
4003          received_field_count += 1;
4004        },
4005        2 => {
4006          let val = i_prot.read_i16()?;
4007          if ret.is_none() {
4008            ret = Some(TGetInfoValue::SmallIntValue(val));
4009          }
4010          received_field_count += 1;
4011        },
4012        3 => {
4013          let val = i_prot.read_i32()?;
4014          if ret.is_none() {
4015            ret = Some(TGetInfoValue::IntegerBitmask(val));
4016          }
4017          received_field_count += 1;
4018        },
4019        4 => {
4020          let val = i_prot.read_i32()?;
4021          if ret.is_none() {
4022            ret = Some(TGetInfoValue::IntegerFlag(val));
4023          }
4024          received_field_count += 1;
4025        },
4026        5 => {
4027          let val = i_prot.read_i32()?;
4028          if ret.is_none() {
4029            ret = Some(TGetInfoValue::BinaryValue(val));
4030          }
4031          received_field_count += 1;
4032        },
4033        6 => {
4034          let val = i_prot.read_i64()?;
4035          if ret.is_none() {
4036            ret = Some(TGetInfoValue::LenValue(val));
4037          }
4038          received_field_count += 1;
4039        },
4040        _ => {
4041          i_prot.skip(field_ident.field_type)?;
4042          received_field_count += 1;
4043        },
4044      };
4045      i_prot.read_field_end()?;
4046    }
4047    i_prot.read_struct_end()?;
4048    if received_field_count == 0 {
4049      Err(
4050        thrift::Error::Protocol(
4051          ProtocolError::new(
4052            ProtocolErrorKind::InvalidData,
4053            "received empty union from remote TGetInfoValue"
4054          )
4055        )
4056      )
4057    } else if received_field_count > 1 {
4058      Err(
4059        thrift::Error::Protocol(
4060          ProtocolError::new(
4061            ProtocolErrorKind::InvalidData,
4062            "received multiple fields for union from remote TGetInfoValue"
4063          )
4064        )
4065      )
4066    } else {
4067      Ok(ret.expect("return value should have been constructed"))
4068    }
4069  }
4070  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4071    let struct_ident = TStructIdentifier::new("TGetInfoValue");
4072    o_prot.write_struct_begin(&struct_ident)?;
4073    match *self {
4074      TGetInfoValue::StringValue(ref f) => {
4075        o_prot.write_field_begin(&TFieldIdentifier::new("stringValue", TType::String, 1))?;
4076        o_prot.write_string(f)?;
4077        o_prot.write_field_end()?;
4078      },
4079      TGetInfoValue::SmallIntValue(f) => {
4080        o_prot.write_field_begin(&TFieldIdentifier::new("smallIntValue", TType::I16, 2))?;
4081        o_prot.write_i16(f)?;
4082        o_prot.write_field_end()?;
4083      },
4084      TGetInfoValue::IntegerBitmask(f) => {
4085        o_prot.write_field_begin(&TFieldIdentifier::new("integerBitmask", TType::I32, 3))?;
4086        o_prot.write_i32(f)?;
4087        o_prot.write_field_end()?;
4088      },
4089      TGetInfoValue::IntegerFlag(f) => {
4090        o_prot.write_field_begin(&TFieldIdentifier::new("integerFlag", TType::I32, 4))?;
4091        o_prot.write_i32(f)?;
4092        o_prot.write_field_end()?;
4093      },
4094      TGetInfoValue::BinaryValue(f) => {
4095        o_prot.write_field_begin(&TFieldIdentifier::new("binaryValue", TType::I32, 5))?;
4096        o_prot.write_i32(f)?;
4097        o_prot.write_field_end()?;
4098      },
4099      TGetInfoValue::LenValue(f) => {
4100        o_prot.write_field_begin(&TFieldIdentifier::new("lenValue", TType::I64, 6))?;
4101        o_prot.write_i64(f)?;
4102        o_prot.write_field_end()?;
4103      },
4104    }
4105    o_prot.write_field_stop()?;
4106    o_prot.write_struct_end()
4107  }
4108}
4109
4110//
4111// TGetInfoReq
4112//
4113
4114#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4115pub struct TGetInfoReq {
4116  pub session_handle: TSessionHandle,
4117  pub info_type: TGetInfoType,
4118}
4119
4120impl TGetInfoReq {
4121  pub fn new(session_handle: TSessionHandle, info_type: TGetInfoType) -> TGetInfoReq {
4122    TGetInfoReq {
4123      session_handle,
4124      info_type,
4125    }
4126  }
4127}
4128
4129impl TSerializable for TGetInfoReq {
4130  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetInfoReq> {
4131    i_prot.read_struct_begin()?;
4132    let mut f_1: Option<TSessionHandle> = None;
4133    let mut f_2: Option<TGetInfoType> = None;
4134    loop {
4135      let field_ident = i_prot.read_field_begin()?;
4136      if field_ident.field_type == TType::Stop {
4137        break;
4138      }
4139      let field_id = field_id(&field_ident)?;
4140      match field_id {
4141        1 => {
4142          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
4143          f_1 = Some(val);
4144        },
4145        2 => {
4146          let val = TGetInfoType::read_from_in_protocol(i_prot)?;
4147          f_2 = Some(val);
4148        },
4149        _ => {
4150          i_prot.skip(field_ident.field_type)?;
4151        },
4152      };
4153      i_prot.read_field_end()?;
4154    }
4155    i_prot.read_struct_end()?;
4156    verify_required_field_exists("TGetInfoReq.session_handle", &f_1)?;
4157    verify_required_field_exists("TGetInfoReq.info_type", &f_2)?;
4158    let ret = TGetInfoReq {
4159      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
4160      info_type: f_2.expect("auto-generated code should have checked for presence of required fields"),
4161    };
4162    Ok(ret)
4163  }
4164  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4165    let struct_ident = TStructIdentifier::new("TGetInfoReq");
4166    o_prot.write_struct_begin(&struct_ident)?;
4167    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
4168    self.session_handle.write_to_out_protocol(o_prot)?;
4169    o_prot.write_field_end()?;
4170    o_prot.write_field_begin(&TFieldIdentifier::new("infoType", TType::I32, 2))?;
4171    self.info_type.write_to_out_protocol(o_prot)?;
4172    o_prot.write_field_end()?;
4173    o_prot.write_field_stop()?;
4174    o_prot.write_struct_end()
4175  }
4176}
4177
4178//
4179// TGetInfoResp
4180//
4181
4182#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4183pub struct TGetInfoResp {
4184  pub status: TStatus,
4185  pub info_value: TGetInfoValue,
4186}
4187
4188impl TGetInfoResp {
4189  pub fn new(status: TStatus, info_value: TGetInfoValue) -> TGetInfoResp {
4190    TGetInfoResp {
4191      status,
4192      info_value,
4193    }
4194  }
4195}
4196
4197impl TSerializable for TGetInfoResp {
4198  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetInfoResp> {
4199    i_prot.read_struct_begin()?;
4200    let mut f_1: Option<TStatus> = None;
4201    let mut f_2: Option<TGetInfoValue> = None;
4202    loop {
4203      let field_ident = i_prot.read_field_begin()?;
4204      if field_ident.field_type == TType::Stop {
4205        break;
4206      }
4207      let field_id = field_id(&field_ident)?;
4208      match field_id {
4209        1 => {
4210          let val = TStatus::read_from_in_protocol(i_prot)?;
4211          f_1 = Some(val);
4212        },
4213        2 => {
4214          let val = TGetInfoValue::read_from_in_protocol(i_prot)?;
4215          f_2 = Some(val);
4216        },
4217        _ => {
4218          i_prot.skip(field_ident.field_type)?;
4219        },
4220      };
4221      i_prot.read_field_end()?;
4222    }
4223    i_prot.read_struct_end()?;
4224    verify_required_field_exists("TGetInfoResp.status", &f_1)?;
4225    verify_required_field_exists("TGetInfoResp.info_value", &f_2)?;
4226    let ret = TGetInfoResp {
4227      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
4228      info_value: f_2.expect("auto-generated code should have checked for presence of required fields"),
4229    };
4230    Ok(ret)
4231  }
4232  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4233    let struct_ident = TStructIdentifier::new("TGetInfoResp");
4234    o_prot.write_struct_begin(&struct_ident)?;
4235    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
4236    self.status.write_to_out_protocol(o_prot)?;
4237    o_prot.write_field_end()?;
4238    o_prot.write_field_begin(&TFieldIdentifier::new("infoValue", TType::Struct, 2))?;
4239    self.info_value.write_to_out_protocol(o_prot)?;
4240    o_prot.write_field_end()?;
4241    o_prot.write_field_stop()?;
4242    o_prot.write_struct_end()
4243  }
4244}
4245
4246//
4247// TExecuteStatementReq
4248//
4249
4250#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4251pub struct TExecuteStatementReq {
4252  pub session_handle: TSessionHandle,
4253  pub statement: String,
4254  pub conf_overlay: Option<BTreeMap<String, String>>,
4255  pub run_async: Option<bool>,
4256  pub query_timeout: Option<i64>,
4257}
4258
4259impl TExecuteStatementReq {
4260  pub fn new<F3, F4, F5>(session_handle: TSessionHandle, statement: String, conf_overlay: F3, run_async: F4, query_timeout: F5) -> TExecuteStatementReq where F3: Into<Option<BTreeMap<String, String>>>, F4: Into<Option<bool>>, F5: Into<Option<i64>> {
4261    TExecuteStatementReq {
4262      session_handle,
4263      statement,
4264      conf_overlay: conf_overlay.into(),
4265      run_async: run_async.into(),
4266      query_timeout: query_timeout.into(),
4267    }
4268  }
4269}
4270
4271impl TSerializable for TExecuteStatementReq {
4272  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TExecuteStatementReq> {
4273    i_prot.read_struct_begin()?;
4274    let mut f_1: Option<TSessionHandle> = None;
4275    let mut f_2: Option<String> = None;
4276    let mut f_3: Option<BTreeMap<String, String>> = None;
4277    let mut f_4: Option<bool> = None;
4278    let mut f_5: Option<i64> = None;
4279    loop {
4280      let field_ident = i_prot.read_field_begin()?;
4281      if field_ident.field_type == TType::Stop {
4282        break;
4283      }
4284      let field_id = field_id(&field_ident)?;
4285      match field_id {
4286        1 => {
4287          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
4288          f_1 = Some(val);
4289        },
4290        2 => {
4291          let val = i_prot.read_string()?;
4292          f_2 = Some(val);
4293        },
4294        3 => {
4295          let map_ident = i_prot.read_map_begin()?;
4296          let mut val: BTreeMap<String, String> = BTreeMap::new();
4297          for _ in 0..map_ident.size {
4298            let map_key_26 = i_prot.read_string()?;
4299            let map_val_27 = i_prot.read_string()?;
4300            val.insert(map_key_26, map_val_27);
4301          }
4302          i_prot.read_map_end()?;
4303          f_3 = Some(val);
4304        },
4305        4 => {
4306          let val = i_prot.read_bool()?;
4307          f_4 = Some(val);
4308        },
4309        5 => {
4310          let val = i_prot.read_i64()?;
4311          f_5 = Some(val);
4312        },
4313        _ => {
4314          i_prot.skip(field_ident.field_type)?;
4315        },
4316      };
4317      i_prot.read_field_end()?;
4318    }
4319    i_prot.read_struct_end()?;
4320    verify_required_field_exists("TExecuteStatementReq.session_handle", &f_1)?;
4321    verify_required_field_exists("TExecuteStatementReq.statement", &f_2)?;
4322    let ret = TExecuteStatementReq {
4323      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
4324      statement: f_2.expect("auto-generated code should have checked for presence of required fields"),
4325      conf_overlay: f_3,
4326      run_async: f_4,
4327      query_timeout: f_5,
4328    };
4329    Ok(ret)
4330  }
4331  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4332    let struct_ident = TStructIdentifier::new("TExecuteStatementReq");
4333    o_prot.write_struct_begin(&struct_ident)?;
4334    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
4335    self.session_handle.write_to_out_protocol(o_prot)?;
4336    o_prot.write_field_end()?;
4337    o_prot.write_field_begin(&TFieldIdentifier::new("statement", TType::String, 2))?;
4338    o_prot.write_string(&self.statement)?;
4339    o_prot.write_field_end()?;
4340    if let Some(ref fld_var) = self.conf_overlay {
4341      o_prot.write_field_begin(&TFieldIdentifier::new("confOverlay", TType::Map, 3))?;
4342      o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?;
4343      for (k, v) in fld_var {
4344        o_prot.write_string(k)?;
4345        o_prot.write_string(v)?;
4346      }
4347      o_prot.write_map_end()?;
4348      o_prot.write_field_end()?
4349    }
4350    if let Some(fld_var) = self.run_async {
4351      o_prot.write_field_begin(&TFieldIdentifier::new("runAsync", TType::Bool, 4))?;
4352      o_prot.write_bool(fld_var)?;
4353      o_prot.write_field_end()?
4354    }
4355    if let Some(fld_var) = self.query_timeout {
4356      o_prot.write_field_begin(&TFieldIdentifier::new("queryTimeout", TType::I64, 5))?;
4357      o_prot.write_i64(fld_var)?;
4358      o_prot.write_field_end()?
4359    }
4360    o_prot.write_field_stop()?;
4361    o_prot.write_struct_end()
4362  }
4363}
4364
4365//
4366// TExecuteStatementResp
4367//
4368
4369#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4370pub struct TExecuteStatementResp {
4371  pub status: TStatus,
4372  pub operation_handle: Option<TOperationHandle>,
4373}
4374
4375impl TExecuteStatementResp {
4376  pub fn new<F2>(status: TStatus, operation_handle: F2) -> TExecuteStatementResp where F2: Into<Option<TOperationHandle>> {
4377    TExecuteStatementResp {
4378      status,
4379      operation_handle: operation_handle.into(),
4380    }
4381  }
4382}
4383
4384impl TSerializable for TExecuteStatementResp {
4385  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TExecuteStatementResp> {
4386    i_prot.read_struct_begin()?;
4387    let mut f_1: Option<TStatus> = None;
4388    let mut f_2: Option<TOperationHandle> = None;
4389    loop {
4390      let field_ident = i_prot.read_field_begin()?;
4391      if field_ident.field_type == TType::Stop {
4392        break;
4393      }
4394      let field_id = field_id(&field_ident)?;
4395      match field_id {
4396        1 => {
4397          let val = TStatus::read_from_in_protocol(i_prot)?;
4398          f_1 = Some(val);
4399        },
4400        2 => {
4401          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
4402          f_2 = Some(val);
4403        },
4404        _ => {
4405          i_prot.skip(field_ident.field_type)?;
4406        },
4407      };
4408      i_prot.read_field_end()?;
4409    }
4410    i_prot.read_struct_end()?;
4411    verify_required_field_exists("TExecuteStatementResp.status", &f_1)?;
4412    let ret = TExecuteStatementResp {
4413      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
4414      operation_handle: f_2,
4415    };
4416    Ok(ret)
4417  }
4418  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4419    let struct_ident = TStructIdentifier::new("TExecuteStatementResp");
4420    o_prot.write_struct_begin(&struct_ident)?;
4421    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
4422    self.status.write_to_out_protocol(o_prot)?;
4423    o_prot.write_field_end()?;
4424    if let Some(ref fld_var) = self.operation_handle {
4425      o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
4426      fld_var.write_to_out_protocol(o_prot)?;
4427      o_prot.write_field_end()?
4428    }
4429    o_prot.write_field_stop()?;
4430    o_prot.write_struct_end()
4431  }
4432}
4433
4434//
4435// TGetTypeInfoReq
4436//
4437
4438#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4439pub struct TGetTypeInfoReq {
4440  pub session_handle: TSessionHandle,
4441}
4442
4443impl TGetTypeInfoReq {
4444  pub fn new(session_handle: TSessionHandle) -> TGetTypeInfoReq {
4445    TGetTypeInfoReq {
4446      session_handle,
4447    }
4448  }
4449}
4450
4451impl TSerializable for TGetTypeInfoReq {
4452  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetTypeInfoReq> {
4453    i_prot.read_struct_begin()?;
4454    let mut f_1: Option<TSessionHandle> = None;
4455    loop {
4456      let field_ident = i_prot.read_field_begin()?;
4457      if field_ident.field_type == TType::Stop {
4458        break;
4459      }
4460      let field_id = field_id(&field_ident)?;
4461      match field_id {
4462        1 => {
4463          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
4464          f_1 = Some(val);
4465        },
4466        _ => {
4467          i_prot.skip(field_ident.field_type)?;
4468        },
4469      };
4470      i_prot.read_field_end()?;
4471    }
4472    i_prot.read_struct_end()?;
4473    verify_required_field_exists("TGetTypeInfoReq.session_handle", &f_1)?;
4474    let ret = TGetTypeInfoReq {
4475      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
4476    };
4477    Ok(ret)
4478  }
4479  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4480    let struct_ident = TStructIdentifier::new("TGetTypeInfoReq");
4481    o_prot.write_struct_begin(&struct_ident)?;
4482    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
4483    self.session_handle.write_to_out_protocol(o_prot)?;
4484    o_prot.write_field_end()?;
4485    o_prot.write_field_stop()?;
4486    o_prot.write_struct_end()
4487  }
4488}
4489
4490//
4491// TGetTypeInfoResp
4492//
4493
4494#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4495pub struct TGetTypeInfoResp {
4496  pub status: TStatus,
4497  pub operation_handle: Option<TOperationHandle>,
4498}
4499
4500impl TGetTypeInfoResp {
4501  pub fn new<F2>(status: TStatus, operation_handle: F2) -> TGetTypeInfoResp where F2: Into<Option<TOperationHandle>> {
4502    TGetTypeInfoResp {
4503      status,
4504      operation_handle: operation_handle.into(),
4505    }
4506  }
4507}
4508
4509impl TSerializable for TGetTypeInfoResp {
4510  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetTypeInfoResp> {
4511    i_prot.read_struct_begin()?;
4512    let mut f_1: Option<TStatus> = None;
4513    let mut f_2: Option<TOperationHandle> = None;
4514    loop {
4515      let field_ident = i_prot.read_field_begin()?;
4516      if field_ident.field_type == TType::Stop {
4517        break;
4518      }
4519      let field_id = field_id(&field_ident)?;
4520      match field_id {
4521        1 => {
4522          let val = TStatus::read_from_in_protocol(i_prot)?;
4523          f_1 = Some(val);
4524        },
4525        2 => {
4526          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
4527          f_2 = Some(val);
4528        },
4529        _ => {
4530          i_prot.skip(field_ident.field_type)?;
4531        },
4532      };
4533      i_prot.read_field_end()?;
4534    }
4535    i_prot.read_struct_end()?;
4536    verify_required_field_exists("TGetTypeInfoResp.status", &f_1)?;
4537    let ret = TGetTypeInfoResp {
4538      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
4539      operation_handle: f_2,
4540    };
4541    Ok(ret)
4542  }
4543  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4544    let struct_ident = TStructIdentifier::new("TGetTypeInfoResp");
4545    o_prot.write_struct_begin(&struct_ident)?;
4546    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
4547    self.status.write_to_out_protocol(o_prot)?;
4548    o_prot.write_field_end()?;
4549    if let Some(ref fld_var) = self.operation_handle {
4550      o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
4551      fld_var.write_to_out_protocol(o_prot)?;
4552      o_prot.write_field_end()?
4553    }
4554    o_prot.write_field_stop()?;
4555    o_prot.write_struct_end()
4556  }
4557}
4558
4559//
4560// TUploadDataReq
4561//
4562
4563#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4564pub struct TUploadDataReq {
4565  pub session_handle: TSessionHandle,
4566  pub table_name: Option<String>,
4567  pub path: Option<String>,
4568  pub values: Vec<u8>,
4569}
4570
4571impl TUploadDataReq {
4572  pub fn new<F2, F3>(session_handle: TSessionHandle, table_name: F2, path: F3, values: Vec<u8>) -> TUploadDataReq where F2: Into<Option<String>>, F3: Into<Option<String>> {
4573    TUploadDataReq {
4574      session_handle,
4575      table_name: table_name.into(),
4576      path: path.into(),
4577      values,
4578    }
4579  }
4580}
4581
4582impl TSerializable for TUploadDataReq {
4583  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TUploadDataReq> {
4584    i_prot.read_struct_begin()?;
4585    let mut f_1: Option<TSessionHandle> = None;
4586    let mut f_2: Option<String> = None;
4587    let mut f_3: Option<String> = None;
4588    let mut f_4: Option<Vec<u8>> = None;
4589    loop {
4590      let field_ident = i_prot.read_field_begin()?;
4591      if field_ident.field_type == TType::Stop {
4592        break;
4593      }
4594      let field_id = field_id(&field_ident)?;
4595      match field_id {
4596        1 => {
4597          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
4598          f_1 = Some(val);
4599        },
4600        2 => {
4601          let val = i_prot.read_string()?;
4602          f_2 = Some(val);
4603        },
4604        3 => {
4605          let val = i_prot.read_string()?;
4606          f_3 = Some(val);
4607        },
4608        4 => {
4609          let val = i_prot.read_bytes()?;
4610          f_4 = Some(val);
4611        },
4612        _ => {
4613          i_prot.skip(field_ident.field_type)?;
4614        },
4615      };
4616      i_prot.read_field_end()?;
4617    }
4618    i_prot.read_struct_end()?;
4619    verify_required_field_exists("TUploadDataReq.session_handle", &f_1)?;
4620    verify_required_field_exists("TUploadDataReq.values", &f_4)?;
4621    let ret = TUploadDataReq {
4622      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
4623      table_name: f_2,
4624      path: f_3,
4625      values: f_4.expect("auto-generated code should have checked for presence of required fields"),
4626    };
4627    Ok(ret)
4628  }
4629  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4630    let struct_ident = TStructIdentifier::new("TUploadDataReq");
4631    o_prot.write_struct_begin(&struct_ident)?;
4632    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
4633    self.session_handle.write_to_out_protocol(o_prot)?;
4634    o_prot.write_field_end()?;
4635    if let Some(ref fld_var) = self.table_name {
4636      o_prot.write_field_begin(&TFieldIdentifier::new("tableName", TType::String, 2))?;
4637      o_prot.write_string(fld_var)?;
4638      o_prot.write_field_end()?
4639    }
4640    if let Some(ref fld_var) = self.path {
4641      o_prot.write_field_begin(&TFieldIdentifier::new("path", TType::String, 3))?;
4642      o_prot.write_string(fld_var)?;
4643      o_prot.write_field_end()?
4644    }
4645    o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::String, 4))?;
4646    o_prot.write_bytes(&self.values)?;
4647    o_prot.write_field_end()?;
4648    o_prot.write_field_stop()?;
4649    o_prot.write_struct_end()
4650  }
4651}
4652
4653//
4654// TUploadDataResp
4655//
4656
4657#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4658pub struct TUploadDataResp {
4659  pub status: TStatus,
4660  pub operation_handle: TOperationHandle,
4661}
4662
4663impl TUploadDataResp {
4664  pub fn new(status: TStatus, operation_handle: TOperationHandle) -> TUploadDataResp {
4665    TUploadDataResp {
4666      status,
4667      operation_handle,
4668    }
4669  }
4670}
4671
4672impl TSerializable for TUploadDataResp {
4673  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TUploadDataResp> {
4674    i_prot.read_struct_begin()?;
4675    let mut f_1: Option<TStatus> = None;
4676    let mut f_2: Option<TOperationHandle> = None;
4677    loop {
4678      let field_ident = i_prot.read_field_begin()?;
4679      if field_ident.field_type == TType::Stop {
4680        break;
4681      }
4682      let field_id = field_id(&field_ident)?;
4683      match field_id {
4684        1 => {
4685          let val = TStatus::read_from_in_protocol(i_prot)?;
4686          f_1 = Some(val);
4687        },
4688        2 => {
4689          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
4690          f_2 = Some(val);
4691        },
4692        _ => {
4693          i_prot.skip(field_ident.field_type)?;
4694        },
4695      };
4696      i_prot.read_field_end()?;
4697    }
4698    i_prot.read_struct_end()?;
4699    verify_required_field_exists("TUploadDataResp.status", &f_1)?;
4700    verify_required_field_exists("TUploadDataResp.operation_handle", &f_2)?;
4701    let ret = TUploadDataResp {
4702      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
4703      operation_handle: f_2.expect("auto-generated code should have checked for presence of required fields"),
4704    };
4705    Ok(ret)
4706  }
4707  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4708    let struct_ident = TStructIdentifier::new("TUploadDataResp");
4709    o_prot.write_struct_begin(&struct_ident)?;
4710    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
4711    self.status.write_to_out_protocol(o_prot)?;
4712    o_prot.write_field_end()?;
4713    o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
4714    self.operation_handle.write_to_out_protocol(o_prot)?;
4715    o_prot.write_field_end()?;
4716    o_prot.write_field_stop()?;
4717    o_prot.write_struct_end()
4718  }
4719}
4720
4721//
4722// TDownloadDataReq
4723//
4724
4725#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4726pub struct TDownloadDataReq {
4727  pub session_handle: TSessionHandle,
4728  pub table_name: Option<TPatternOrIdentifier>,
4729  pub query: Option<String>,
4730  pub format: Option<String>,
4731  pub download_options: Option<BTreeMap<String, String>>,
4732}
4733
4734impl TDownloadDataReq {
4735  pub fn new<F2, F3, F4, F5>(session_handle: TSessionHandle, table_name: F2, query: F3, format: F4, download_options: F5) -> TDownloadDataReq where F2: Into<Option<TPatternOrIdentifier>>, F3: Into<Option<String>>, F4: Into<Option<String>>, F5: Into<Option<BTreeMap<String, String>>> {
4736    TDownloadDataReq {
4737      session_handle,
4738      table_name: table_name.into(),
4739      query: query.into(),
4740      format: format.into(),
4741      download_options: download_options.into(),
4742    }
4743  }
4744}
4745
4746impl TSerializable for TDownloadDataReq {
4747  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TDownloadDataReq> {
4748    i_prot.read_struct_begin()?;
4749    let mut f_1: Option<TSessionHandle> = None;
4750    let mut f_2: Option<TPatternOrIdentifier> = None;
4751    let mut f_3: Option<String> = None;
4752    let mut f_4: Option<String> = None;
4753    let mut f_5: Option<BTreeMap<String, String>> = None;
4754    loop {
4755      let field_ident = i_prot.read_field_begin()?;
4756      if field_ident.field_type == TType::Stop {
4757        break;
4758      }
4759      let field_id = field_id(&field_ident)?;
4760      match field_id {
4761        1 => {
4762          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
4763          f_1 = Some(val);
4764        },
4765        2 => {
4766          let val = i_prot.read_string()?;
4767          f_2 = Some(val);
4768        },
4769        3 => {
4770          let val = i_prot.read_string()?;
4771          f_3 = Some(val);
4772        },
4773        4 => {
4774          let val = i_prot.read_string()?;
4775          f_4 = Some(val);
4776        },
4777        5 => {
4778          let map_ident = i_prot.read_map_begin()?;
4779          let mut val: BTreeMap<String, String> = BTreeMap::new();
4780          for _ in 0..map_ident.size {
4781            let map_key_28 = i_prot.read_string()?;
4782            let map_val_29 = i_prot.read_string()?;
4783            val.insert(map_key_28, map_val_29);
4784          }
4785          i_prot.read_map_end()?;
4786          f_5 = Some(val);
4787        },
4788        _ => {
4789          i_prot.skip(field_ident.field_type)?;
4790        },
4791      };
4792      i_prot.read_field_end()?;
4793    }
4794    i_prot.read_struct_end()?;
4795    verify_required_field_exists("TDownloadDataReq.session_handle", &f_1)?;
4796    let ret = TDownloadDataReq {
4797      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
4798      table_name: f_2,
4799      query: f_3,
4800      format: f_4,
4801      download_options: f_5,
4802    };
4803    Ok(ret)
4804  }
4805  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4806    let struct_ident = TStructIdentifier::new("TDownloadDataReq");
4807    o_prot.write_struct_begin(&struct_ident)?;
4808    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
4809    self.session_handle.write_to_out_protocol(o_prot)?;
4810    o_prot.write_field_end()?;
4811    if let Some(ref fld_var) = self.table_name {
4812      o_prot.write_field_begin(&TFieldIdentifier::new("tableName", TType::String, 2))?;
4813      o_prot.write_string(fld_var)?;
4814      o_prot.write_field_end()?
4815    }
4816    if let Some(ref fld_var) = self.query {
4817      o_prot.write_field_begin(&TFieldIdentifier::new("query", TType::String, 3))?;
4818      o_prot.write_string(fld_var)?;
4819      o_prot.write_field_end()?
4820    }
4821    if let Some(ref fld_var) = self.format {
4822      o_prot.write_field_begin(&TFieldIdentifier::new("format", TType::String, 4))?;
4823      o_prot.write_string(fld_var)?;
4824      o_prot.write_field_end()?
4825    }
4826    if let Some(ref fld_var) = self.download_options {
4827      o_prot.write_field_begin(&TFieldIdentifier::new("downloadOptions", TType::Map, 5))?;
4828      o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?;
4829      for (k, v) in fld_var {
4830        o_prot.write_string(k)?;
4831        o_prot.write_string(v)?;
4832      }
4833      o_prot.write_map_end()?;
4834      o_prot.write_field_end()?
4835    }
4836    o_prot.write_field_stop()?;
4837    o_prot.write_struct_end()
4838  }
4839}
4840
4841//
4842// TDownloadDataResp
4843//
4844
4845#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4846pub struct TDownloadDataResp {
4847  pub status: TStatus,
4848  pub operation_handle: TOperationHandle,
4849}
4850
4851impl TDownloadDataResp {
4852  pub fn new(status: TStatus, operation_handle: TOperationHandle) -> TDownloadDataResp {
4853    TDownloadDataResp {
4854      status,
4855      operation_handle,
4856    }
4857  }
4858}
4859
4860impl TSerializable for TDownloadDataResp {
4861  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TDownloadDataResp> {
4862    i_prot.read_struct_begin()?;
4863    let mut f_1: Option<TStatus> = None;
4864    let mut f_2: Option<TOperationHandle> = None;
4865    loop {
4866      let field_ident = i_prot.read_field_begin()?;
4867      if field_ident.field_type == TType::Stop {
4868        break;
4869      }
4870      let field_id = field_id(&field_ident)?;
4871      match field_id {
4872        1 => {
4873          let val = TStatus::read_from_in_protocol(i_prot)?;
4874          f_1 = Some(val);
4875        },
4876        2 => {
4877          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
4878          f_2 = Some(val);
4879        },
4880        _ => {
4881          i_prot.skip(field_ident.field_type)?;
4882        },
4883      };
4884      i_prot.read_field_end()?;
4885    }
4886    i_prot.read_struct_end()?;
4887    verify_required_field_exists("TDownloadDataResp.status", &f_1)?;
4888    verify_required_field_exists("TDownloadDataResp.operation_handle", &f_2)?;
4889    let ret = TDownloadDataResp {
4890      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
4891      operation_handle: f_2.expect("auto-generated code should have checked for presence of required fields"),
4892    };
4893    Ok(ret)
4894  }
4895  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4896    let struct_ident = TStructIdentifier::new("TDownloadDataResp");
4897    o_prot.write_struct_begin(&struct_ident)?;
4898    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
4899    self.status.write_to_out_protocol(o_prot)?;
4900    o_prot.write_field_end()?;
4901    o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
4902    self.operation_handle.write_to_out_protocol(o_prot)?;
4903    o_prot.write_field_end()?;
4904    o_prot.write_field_stop()?;
4905    o_prot.write_struct_end()
4906  }
4907}
4908
4909//
4910// TGetCatalogsReq
4911//
4912
4913#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4914pub struct TGetCatalogsReq {
4915  pub session_handle: TSessionHandle,
4916}
4917
4918impl TGetCatalogsReq {
4919  pub fn new(session_handle: TSessionHandle) -> TGetCatalogsReq {
4920    TGetCatalogsReq {
4921      session_handle,
4922    }
4923  }
4924}
4925
4926impl TSerializable for TGetCatalogsReq {
4927  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetCatalogsReq> {
4928    i_prot.read_struct_begin()?;
4929    let mut f_1: Option<TSessionHandle> = None;
4930    loop {
4931      let field_ident = i_prot.read_field_begin()?;
4932      if field_ident.field_type == TType::Stop {
4933        break;
4934      }
4935      let field_id = field_id(&field_ident)?;
4936      match field_id {
4937        1 => {
4938          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
4939          f_1 = Some(val);
4940        },
4941        _ => {
4942          i_prot.skip(field_ident.field_type)?;
4943        },
4944      };
4945      i_prot.read_field_end()?;
4946    }
4947    i_prot.read_struct_end()?;
4948    verify_required_field_exists("TGetCatalogsReq.session_handle", &f_1)?;
4949    let ret = TGetCatalogsReq {
4950      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
4951    };
4952    Ok(ret)
4953  }
4954  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4955    let struct_ident = TStructIdentifier::new("TGetCatalogsReq");
4956    o_prot.write_struct_begin(&struct_ident)?;
4957    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
4958    self.session_handle.write_to_out_protocol(o_prot)?;
4959    o_prot.write_field_end()?;
4960    o_prot.write_field_stop()?;
4961    o_prot.write_struct_end()
4962  }
4963}
4964
4965//
4966// TGetCatalogsResp
4967//
4968
4969#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4970pub struct TGetCatalogsResp {
4971  pub status: TStatus,
4972  pub operation_handle: Option<TOperationHandle>,
4973}
4974
4975impl TGetCatalogsResp {
4976  pub fn new<F2>(status: TStatus, operation_handle: F2) -> TGetCatalogsResp where F2: Into<Option<TOperationHandle>> {
4977    TGetCatalogsResp {
4978      status,
4979      operation_handle: operation_handle.into(),
4980    }
4981  }
4982}
4983
4984impl TSerializable for TGetCatalogsResp {
4985  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetCatalogsResp> {
4986    i_prot.read_struct_begin()?;
4987    let mut f_1: Option<TStatus> = None;
4988    let mut f_2: Option<TOperationHandle> = None;
4989    loop {
4990      let field_ident = i_prot.read_field_begin()?;
4991      if field_ident.field_type == TType::Stop {
4992        break;
4993      }
4994      let field_id = field_id(&field_ident)?;
4995      match field_id {
4996        1 => {
4997          let val = TStatus::read_from_in_protocol(i_prot)?;
4998          f_1 = Some(val);
4999        },
5000        2 => {
5001          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
5002          f_2 = Some(val);
5003        },
5004        _ => {
5005          i_prot.skip(field_ident.field_type)?;
5006        },
5007      };
5008      i_prot.read_field_end()?;
5009    }
5010    i_prot.read_struct_end()?;
5011    verify_required_field_exists("TGetCatalogsResp.status", &f_1)?;
5012    let ret = TGetCatalogsResp {
5013      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
5014      operation_handle: f_2,
5015    };
5016    Ok(ret)
5017  }
5018  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5019    let struct_ident = TStructIdentifier::new("TGetCatalogsResp");
5020    o_prot.write_struct_begin(&struct_ident)?;
5021    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
5022    self.status.write_to_out_protocol(o_prot)?;
5023    o_prot.write_field_end()?;
5024    if let Some(ref fld_var) = self.operation_handle {
5025      o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
5026      fld_var.write_to_out_protocol(o_prot)?;
5027      o_prot.write_field_end()?
5028    }
5029    o_prot.write_field_stop()?;
5030    o_prot.write_struct_end()
5031  }
5032}
5033
5034//
5035// TGetSchemasReq
5036//
5037
5038#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5039pub struct TGetSchemasReq {
5040  pub session_handle: TSessionHandle,
5041  pub catalog_name: Option<TIdentifier>,
5042  pub schema_name: Option<TPatternOrIdentifier>,
5043}
5044
5045impl TGetSchemasReq {
5046  pub fn new<F2, F3>(session_handle: TSessionHandle, catalog_name: F2, schema_name: F3) -> TGetSchemasReq where F2: Into<Option<TIdentifier>>, F3: Into<Option<TPatternOrIdentifier>> {
5047    TGetSchemasReq {
5048      session_handle,
5049      catalog_name: catalog_name.into(),
5050      schema_name: schema_name.into(),
5051    }
5052  }
5053}
5054
5055impl TSerializable for TGetSchemasReq {
5056  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetSchemasReq> {
5057    i_prot.read_struct_begin()?;
5058    let mut f_1: Option<TSessionHandle> = None;
5059    let mut f_2: Option<TIdentifier> = None;
5060    let mut f_3: Option<TPatternOrIdentifier> = None;
5061    loop {
5062      let field_ident = i_prot.read_field_begin()?;
5063      if field_ident.field_type == TType::Stop {
5064        break;
5065      }
5066      let field_id = field_id(&field_ident)?;
5067      match field_id {
5068        1 => {
5069          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
5070          f_1 = Some(val);
5071        },
5072        2 => {
5073          let val = i_prot.read_string()?;
5074          f_2 = Some(val);
5075        },
5076        3 => {
5077          let val = i_prot.read_string()?;
5078          f_3 = Some(val);
5079        },
5080        _ => {
5081          i_prot.skip(field_ident.field_type)?;
5082        },
5083      };
5084      i_prot.read_field_end()?;
5085    }
5086    i_prot.read_struct_end()?;
5087    verify_required_field_exists("TGetSchemasReq.session_handle", &f_1)?;
5088    let ret = TGetSchemasReq {
5089      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
5090      catalog_name: f_2,
5091      schema_name: f_3,
5092    };
5093    Ok(ret)
5094  }
5095  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5096    let struct_ident = TStructIdentifier::new("TGetSchemasReq");
5097    o_prot.write_struct_begin(&struct_ident)?;
5098    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
5099    self.session_handle.write_to_out_protocol(o_prot)?;
5100    o_prot.write_field_end()?;
5101    if let Some(ref fld_var) = self.catalog_name {
5102      o_prot.write_field_begin(&TFieldIdentifier::new("catalogName", TType::String, 2))?;
5103      o_prot.write_string(fld_var)?;
5104      o_prot.write_field_end()?
5105    }
5106    if let Some(ref fld_var) = self.schema_name {
5107      o_prot.write_field_begin(&TFieldIdentifier::new("schemaName", TType::String, 3))?;
5108      o_prot.write_string(fld_var)?;
5109      o_prot.write_field_end()?
5110    }
5111    o_prot.write_field_stop()?;
5112    o_prot.write_struct_end()
5113  }
5114}
5115
5116//
5117// TGetSchemasResp
5118//
5119
5120#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5121pub struct TGetSchemasResp {
5122  pub status: TStatus,
5123  pub operation_handle: Option<TOperationHandle>,
5124}
5125
5126impl TGetSchemasResp {
5127  pub fn new<F2>(status: TStatus, operation_handle: F2) -> TGetSchemasResp where F2: Into<Option<TOperationHandle>> {
5128    TGetSchemasResp {
5129      status,
5130      operation_handle: operation_handle.into(),
5131    }
5132  }
5133}
5134
5135impl TSerializable for TGetSchemasResp {
5136  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetSchemasResp> {
5137    i_prot.read_struct_begin()?;
5138    let mut f_1: Option<TStatus> = None;
5139    let mut f_2: Option<TOperationHandle> = None;
5140    loop {
5141      let field_ident = i_prot.read_field_begin()?;
5142      if field_ident.field_type == TType::Stop {
5143        break;
5144      }
5145      let field_id = field_id(&field_ident)?;
5146      match field_id {
5147        1 => {
5148          let val = TStatus::read_from_in_protocol(i_prot)?;
5149          f_1 = Some(val);
5150        },
5151        2 => {
5152          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
5153          f_2 = Some(val);
5154        },
5155        _ => {
5156          i_prot.skip(field_ident.field_type)?;
5157        },
5158      };
5159      i_prot.read_field_end()?;
5160    }
5161    i_prot.read_struct_end()?;
5162    verify_required_field_exists("TGetSchemasResp.status", &f_1)?;
5163    let ret = TGetSchemasResp {
5164      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
5165      operation_handle: f_2,
5166    };
5167    Ok(ret)
5168  }
5169  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5170    let struct_ident = TStructIdentifier::new("TGetSchemasResp");
5171    o_prot.write_struct_begin(&struct_ident)?;
5172    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
5173    self.status.write_to_out_protocol(o_prot)?;
5174    o_prot.write_field_end()?;
5175    if let Some(ref fld_var) = self.operation_handle {
5176      o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
5177      fld_var.write_to_out_protocol(o_prot)?;
5178      o_prot.write_field_end()?
5179    }
5180    o_prot.write_field_stop()?;
5181    o_prot.write_struct_end()
5182  }
5183}
5184
5185//
5186// TGetTablesReq
5187//
5188
5189#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5190pub struct TGetTablesReq {
5191  pub session_handle: TSessionHandle,
5192  pub catalog_name: Option<TPatternOrIdentifier>,
5193  pub schema_name: Option<TPatternOrIdentifier>,
5194  pub table_name: Option<TPatternOrIdentifier>,
5195  pub table_types: Option<Vec<String>>,
5196}
5197
5198impl TGetTablesReq {
5199  pub fn new<F2, F3, F4, F5>(session_handle: TSessionHandle, catalog_name: F2, schema_name: F3, table_name: F4, table_types: F5) -> TGetTablesReq where F2: Into<Option<TPatternOrIdentifier>>, F3: Into<Option<TPatternOrIdentifier>>, F4: Into<Option<TPatternOrIdentifier>>, F5: Into<Option<Vec<String>>> {
5200    TGetTablesReq {
5201      session_handle,
5202      catalog_name: catalog_name.into(),
5203      schema_name: schema_name.into(),
5204      table_name: table_name.into(),
5205      table_types: table_types.into(),
5206    }
5207  }
5208}
5209
5210impl TSerializable for TGetTablesReq {
5211  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetTablesReq> {
5212    i_prot.read_struct_begin()?;
5213    let mut f_1: Option<TSessionHandle> = None;
5214    let mut f_2: Option<TPatternOrIdentifier> = None;
5215    let mut f_3: Option<TPatternOrIdentifier> = None;
5216    let mut f_4: Option<TPatternOrIdentifier> = None;
5217    let mut f_5: Option<Vec<String>> = None;
5218    loop {
5219      let field_ident = i_prot.read_field_begin()?;
5220      if field_ident.field_type == TType::Stop {
5221        break;
5222      }
5223      let field_id = field_id(&field_ident)?;
5224      match field_id {
5225        1 => {
5226          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
5227          f_1 = Some(val);
5228        },
5229        2 => {
5230          let val = i_prot.read_string()?;
5231          f_2 = Some(val);
5232        },
5233        3 => {
5234          let val = i_prot.read_string()?;
5235          f_3 = Some(val);
5236        },
5237        4 => {
5238          let val = i_prot.read_string()?;
5239          f_4 = Some(val);
5240        },
5241        5 => {
5242          let list_ident = i_prot.read_list_begin()?;
5243          let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
5244          for _ in 0..list_ident.size {
5245            let list_elem_30 = i_prot.read_string()?;
5246            val.push(list_elem_30);
5247          }
5248          i_prot.read_list_end()?;
5249          f_5 = Some(val);
5250        },
5251        _ => {
5252          i_prot.skip(field_ident.field_type)?;
5253        },
5254      };
5255      i_prot.read_field_end()?;
5256    }
5257    i_prot.read_struct_end()?;
5258    verify_required_field_exists("TGetTablesReq.session_handle", &f_1)?;
5259    let ret = TGetTablesReq {
5260      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
5261      catalog_name: f_2,
5262      schema_name: f_3,
5263      table_name: f_4,
5264      table_types: f_5,
5265    };
5266    Ok(ret)
5267  }
5268  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5269    let struct_ident = TStructIdentifier::new("TGetTablesReq");
5270    o_prot.write_struct_begin(&struct_ident)?;
5271    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
5272    self.session_handle.write_to_out_protocol(o_prot)?;
5273    o_prot.write_field_end()?;
5274    if let Some(ref fld_var) = self.catalog_name {
5275      o_prot.write_field_begin(&TFieldIdentifier::new("catalogName", TType::String, 2))?;
5276      o_prot.write_string(fld_var)?;
5277      o_prot.write_field_end()?
5278    }
5279    if let Some(ref fld_var) = self.schema_name {
5280      o_prot.write_field_begin(&TFieldIdentifier::new("schemaName", TType::String, 3))?;
5281      o_prot.write_string(fld_var)?;
5282      o_prot.write_field_end()?
5283    }
5284    if let Some(ref fld_var) = self.table_name {
5285      o_prot.write_field_begin(&TFieldIdentifier::new("tableName", TType::String, 4))?;
5286      o_prot.write_string(fld_var)?;
5287      o_prot.write_field_end()?
5288    }
5289    if let Some(ref fld_var) = self.table_types {
5290      o_prot.write_field_begin(&TFieldIdentifier::new("tableTypes", TType::List, 5))?;
5291      o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?;
5292      for e in fld_var {
5293        o_prot.write_string(e)?;
5294      }
5295      o_prot.write_list_end()?;
5296      o_prot.write_field_end()?
5297    }
5298    o_prot.write_field_stop()?;
5299    o_prot.write_struct_end()
5300  }
5301}
5302
5303//
5304// TGetTablesResp
5305//
5306
5307#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5308pub struct TGetTablesResp {
5309  pub status: TStatus,
5310  pub operation_handle: Option<TOperationHandle>,
5311}
5312
5313impl TGetTablesResp {
5314  pub fn new<F2>(status: TStatus, operation_handle: F2) -> TGetTablesResp where F2: Into<Option<TOperationHandle>> {
5315    TGetTablesResp {
5316      status,
5317      operation_handle: operation_handle.into(),
5318    }
5319  }
5320}
5321
5322impl TSerializable for TGetTablesResp {
5323  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetTablesResp> {
5324    i_prot.read_struct_begin()?;
5325    let mut f_1: Option<TStatus> = None;
5326    let mut f_2: Option<TOperationHandle> = None;
5327    loop {
5328      let field_ident = i_prot.read_field_begin()?;
5329      if field_ident.field_type == TType::Stop {
5330        break;
5331      }
5332      let field_id = field_id(&field_ident)?;
5333      match field_id {
5334        1 => {
5335          let val = TStatus::read_from_in_protocol(i_prot)?;
5336          f_1 = Some(val);
5337        },
5338        2 => {
5339          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
5340          f_2 = Some(val);
5341        },
5342        _ => {
5343          i_prot.skip(field_ident.field_type)?;
5344        },
5345      };
5346      i_prot.read_field_end()?;
5347    }
5348    i_prot.read_struct_end()?;
5349    verify_required_field_exists("TGetTablesResp.status", &f_1)?;
5350    let ret = TGetTablesResp {
5351      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
5352      operation_handle: f_2,
5353    };
5354    Ok(ret)
5355  }
5356  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5357    let struct_ident = TStructIdentifier::new("TGetTablesResp");
5358    o_prot.write_struct_begin(&struct_ident)?;
5359    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
5360    self.status.write_to_out_protocol(o_prot)?;
5361    o_prot.write_field_end()?;
5362    if let Some(ref fld_var) = self.operation_handle {
5363      o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
5364      fld_var.write_to_out_protocol(o_prot)?;
5365      o_prot.write_field_end()?
5366    }
5367    o_prot.write_field_stop()?;
5368    o_prot.write_struct_end()
5369  }
5370}
5371
5372//
5373// TGetTableTypesReq
5374//
5375
5376#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5377pub struct TGetTableTypesReq {
5378  pub session_handle: TSessionHandle,
5379}
5380
5381impl TGetTableTypesReq {
5382  pub fn new(session_handle: TSessionHandle) -> TGetTableTypesReq {
5383    TGetTableTypesReq {
5384      session_handle,
5385    }
5386  }
5387}
5388
5389impl TSerializable for TGetTableTypesReq {
5390  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetTableTypesReq> {
5391    i_prot.read_struct_begin()?;
5392    let mut f_1: Option<TSessionHandle> = None;
5393    loop {
5394      let field_ident = i_prot.read_field_begin()?;
5395      if field_ident.field_type == TType::Stop {
5396        break;
5397      }
5398      let field_id = field_id(&field_ident)?;
5399      match field_id {
5400        1 => {
5401          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
5402          f_1 = Some(val);
5403        },
5404        _ => {
5405          i_prot.skip(field_ident.field_type)?;
5406        },
5407      };
5408      i_prot.read_field_end()?;
5409    }
5410    i_prot.read_struct_end()?;
5411    verify_required_field_exists("TGetTableTypesReq.session_handle", &f_1)?;
5412    let ret = TGetTableTypesReq {
5413      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
5414    };
5415    Ok(ret)
5416  }
5417  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5418    let struct_ident = TStructIdentifier::new("TGetTableTypesReq");
5419    o_prot.write_struct_begin(&struct_ident)?;
5420    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
5421    self.session_handle.write_to_out_protocol(o_prot)?;
5422    o_prot.write_field_end()?;
5423    o_prot.write_field_stop()?;
5424    o_prot.write_struct_end()
5425  }
5426}
5427
5428//
5429// TGetTableTypesResp
5430//
5431
5432#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5433pub struct TGetTableTypesResp {
5434  pub status: TStatus,
5435  pub operation_handle: Option<TOperationHandle>,
5436}
5437
5438impl TGetTableTypesResp {
5439  pub fn new<F2>(status: TStatus, operation_handle: F2) -> TGetTableTypesResp where F2: Into<Option<TOperationHandle>> {
5440    TGetTableTypesResp {
5441      status,
5442      operation_handle: operation_handle.into(),
5443    }
5444  }
5445}
5446
5447impl TSerializable for TGetTableTypesResp {
5448  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetTableTypesResp> {
5449    i_prot.read_struct_begin()?;
5450    let mut f_1: Option<TStatus> = None;
5451    let mut f_2: Option<TOperationHandle> = None;
5452    loop {
5453      let field_ident = i_prot.read_field_begin()?;
5454      if field_ident.field_type == TType::Stop {
5455        break;
5456      }
5457      let field_id = field_id(&field_ident)?;
5458      match field_id {
5459        1 => {
5460          let val = TStatus::read_from_in_protocol(i_prot)?;
5461          f_1 = Some(val);
5462        },
5463        2 => {
5464          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
5465          f_2 = Some(val);
5466        },
5467        _ => {
5468          i_prot.skip(field_ident.field_type)?;
5469        },
5470      };
5471      i_prot.read_field_end()?;
5472    }
5473    i_prot.read_struct_end()?;
5474    verify_required_field_exists("TGetTableTypesResp.status", &f_1)?;
5475    let ret = TGetTableTypesResp {
5476      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
5477      operation_handle: f_2,
5478    };
5479    Ok(ret)
5480  }
5481  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5482    let struct_ident = TStructIdentifier::new("TGetTableTypesResp");
5483    o_prot.write_struct_begin(&struct_ident)?;
5484    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
5485    self.status.write_to_out_protocol(o_prot)?;
5486    o_prot.write_field_end()?;
5487    if let Some(ref fld_var) = self.operation_handle {
5488      o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
5489      fld_var.write_to_out_protocol(o_prot)?;
5490      o_prot.write_field_end()?
5491    }
5492    o_prot.write_field_stop()?;
5493    o_prot.write_struct_end()
5494  }
5495}
5496
5497//
5498// TGetColumnsReq
5499//
5500
5501#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5502pub struct TGetColumnsReq {
5503  pub session_handle: TSessionHandle,
5504  pub catalog_name: Option<TIdentifier>,
5505  pub schema_name: Option<TPatternOrIdentifier>,
5506  pub table_name: Option<TPatternOrIdentifier>,
5507  pub column_name: Option<TPatternOrIdentifier>,
5508}
5509
5510impl TGetColumnsReq {
5511  pub fn new<F2, F3, F4, F5>(session_handle: TSessionHandle, catalog_name: F2, schema_name: F3, table_name: F4, column_name: F5) -> TGetColumnsReq where F2: Into<Option<TIdentifier>>, F3: Into<Option<TPatternOrIdentifier>>, F4: Into<Option<TPatternOrIdentifier>>, F5: Into<Option<TPatternOrIdentifier>> {
5512    TGetColumnsReq {
5513      session_handle,
5514      catalog_name: catalog_name.into(),
5515      schema_name: schema_name.into(),
5516      table_name: table_name.into(),
5517      column_name: column_name.into(),
5518    }
5519  }
5520}
5521
5522impl TSerializable for TGetColumnsReq {
5523  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetColumnsReq> {
5524    i_prot.read_struct_begin()?;
5525    let mut f_1: Option<TSessionHandle> = None;
5526    let mut f_2: Option<TIdentifier> = None;
5527    let mut f_3: Option<TPatternOrIdentifier> = None;
5528    let mut f_4: Option<TPatternOrIdentifier> = None;
5529    let mut f_5: Option<TPatternOrIdentifier> = None;
5530    loop {
5531      let field_ident = i_prot.read_field_begin()?;
5532      if field_ident.field_type == TType::Stop {
5533        break;
5534      }
5535      let field_id = field_id(&field_ident)?;
5536      match field_id {
5537        1 => {
5538          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
5539          f_1 = Some(val);
5540        },
5541        2 => {
5542          let val = i_prot.read_string()?;
5543          f_2 = Some(val);
5544        },
5545        3 => {
5546          let val = i_prot.read_string()?;
5547          f_3 = Some(val);
5548        },
5549        4 => {
5550          let val = i_prot.read_string()?;
5551          f_4 = Some(val);
5552        },
5553        5 => {
5554          let val = i_prot.read_string()?;
5555          f_5 = Some(val);
5556        },
5557        _ => {
5558          i_prot.skip(field_ident.field_type)?;
5559        },
5560      };
5561      i_prot.read_field_end()?;
5562    }
5563    i_prot.read_struct_end()?;
5564    verify_required_field_exists("TGetColumnsReq.session_handle", &f_1)?;
5565    let ret = TGetColumnsReq {
5566      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
5567      catalog_name: f_2,
5568      schema_name: f_3,
5569      table_name: f_4,
5570      column_name: f_5,
5571    };
5572    Ok(ret)
5573  }
5574  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5575    let struct_ident = TStructIdentifier::new("TGetColumnsReq");
5576    o_prot.write_struct_begin(&struct_ident)?;
5577    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
5578    self.session_handle.write_to_out_protocol(o_prot)?;
5579    o_prot.write_field_end()?;
5580    if let Some(ref fld_var) = self.catalog_name {
5581      o_prot.write_field_begin(&TFieldIdentifier::new("catalogName", TType::String, 2))?;
5582      o_prot.write_string(fld_var)?;
5583      o_prot.write_field_end()?
5584    }
5585    if let Some(ref fld_var) = self.schema_name {
5586      o_prot.write_field_begin(&TFieldIdentifier::new("schemaName", TType::String, 3))?;
5587      o_prot.write_string(fld_var)?;
5588      o_prot.write_field_end()?
5589    }
5590    if let Some(ref fld_var) = self.table_name {
5591      o_prot.write_field_begin(&TFieldIdentifier::new("tableName", TType::String, 4))?;
5592      o_prot.write_string(fld_var)?;
5593      o_prot.write_field_end()?
5594    }
5595    if let Some(ref fld_var) = self.column_name {
5596      o_prot.write_field_begin(&TFieldIdentifier::new("columnName", TType::String, 5))?;
5597      o_prot.write_string(fld_var)?;
5598      o_prot.write_field_end()?
5599    }
5600    o_prot.write_field_stop()?;
5601    o_prot.write_struct_end()
5602  }
5603}
5604
5605//
5606// TGetColumnsResp
5607//
5608
5609#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5610pub struct TGetColumnsResp {
5611  pub status: TStatus,
5612  pub operation_handle: Option<TOperationHandle>,
5613}
5614
5615impl TGetColumnsResp {
5616  pub fn new<F2>(status: TStatus, operation_handle: F2) -> TGetColumnsResp where F2: Into<Option<TOperationHandle>> {
5617    TGetColumnsResp {
5618      status,
5619      operation_handle: operation_handle.into(),
5620    }
5621  }
5622}
5623
5624impl TSerializable for TGetColumnsResp {
5625  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetColumnsResp> {
5626    i_prot.read_struct_begin()?;
5627    let mut f_1: Option<TStatus> = None;
5628    let mut f_2: Option<TOperationHandle> = None;
5629    loop {
5630      let field_ident = i_prot.read_field_begin()?;
5631      if field_ident.field_type == TType::Stop {
5632        break;
5633      }
5634      let field_id = field_id(&field_ident)?;
5635      match field_id {
5636        1 => {
5637          let val = TStatus::read_from_in_protocol(i_prot)?;
5638          f_1 = Some(val);
5639        },
5640        2 => {
5641          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
5642          f_2 = Some(val);
5643        },
5644        _ => {
5645          i_prot.skip(field_ident.field_type)?;
5646        },
5647      };
5648      i_prot.read_field_end()?;
5649    }
5650    i_prot.read_struct_end()?;
5651    verify_required_field_exists("TGetColumnsResp.status", &f_1)?;
5652    let ret = TGetColumnsResp {
5653      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
5654      operation_handle: f_2,
5655    };
5656    Ok(ret)
5657  }
5658  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5659    let struct_ident = TStructIdentifier::new("TGetColumnsResp");
5660    o_prot.write_struct_begin(&struct_ident)?;
5661    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
5662    self.status.write_to_out_protocol(o_prot)?;
5663    o_prot.write_field_end()?;
5664    if let Some(ref fld_var) = self.operation_handle {
5665      o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
5666      fld_var.write_to_out_protocol(o_prot)?;
5667      o_prot.write_field_end()?
5668    }
5669    o_prot.write_field_stop()?;
5670    o_prot.write_struct_end()
5671  }
5672}
5673
5674//
5675// TGetFunctionsReq
5676//
5677
5678#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5679pub struct TGetFunctionsReq {
5680  pub session_handle: TSessionHandle,
5681  pub catalog_name: Option<TIdentifier>,
5682  pub schema_name: Option<TPatternOrIdentifier>,
5683  pub function_name: TPatternOrIdentifier,
5684}
5685
5686impl TGetFunctionsReq {
5687  pub fn new<F2, F3>(session_handle: TSessionHandle, catalog_name: F2, schema_name: F3, function_name: TPatternOrIdentifier) -> TGetFunctionsReq where F2: Into<Option<TIdentifier>>, F3: Into<Option<TPatternOrIdentifier>> {
5688    TGetFunctionsReq {
5689      session_handle,
5690      catalog_name: catalog_name.into(),
5691      schema_name: schema_name.into(),
5692      function_name,
5693    }
5694  }
5695}
5696
5697impl TSerializable for TGetFunctionsReq {
5698  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetFunctionsReq> {
5699    i_prot.read_struct_begin()?;
5700    let mut f_1: Option<TSessionHandle> = None;
5701    let mut f_2: Option<TIdentifier> = None;
5702    let mut f_3: Option<TPatternOrIdentifier> = None;
5703    let mut f_4: Option<TPatternOrIdentifier> = None;
5704    loop {
5705      let field_ident = i_prot.read_field_begin()?;
5706      if field_ident.field_type == TType::Stop {
5707        break;
5708      }
5709      let field_id = field_id(&field_ident)?;
5710      match field_id {
5711        1 => {
5712          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
5713          f_1 = Some(val);
5714        },
5715        2 => {
5716          let val = i_prot.read_string()?;
5717          f_2 = Some(val);
5718        },
5719        3 => {
5720          let val = i_prot.read_string()?;
5721          f_3 = Some(val);
5722        },
5723        4 => {
5724          let val = i_prot.read_string()?;
5725          f_4 = Some(val);
5726        },
5727        _ => {
5728          i_prot.skip(field_ident.field_type)?;
5729        },
5730      };
5731      i_prot.read_field_end()?;
5732    }
5733    i_prot.read_struct_end()?;
5734    verify_required_field_exists("TGetFunctionsReq.session_handle", &f_1)?;
5735    verify_required_field_exists("TGetFunctionsReq.function_name", &f_4)?;
5736    let ret = TGetFunctionsReq {
5737      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
5738      catalog_name: f_2,
5739      schema_name: f_3,
5740      function_name: f_4.expect("auto-generated code should have checked for presence of required fields"),
5741    };
5742    Ok(ret)
5743  }
5744  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5745    let struct_ident = TStructIdentifier::new("TGetFunctionsReq");
5746    o_prot.write_struct_begin(&struct_ident)?;
5747    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
5748    self.session_handle.write_to_out_protocol(o_prot)?;
5749    o_prot.write_field_end()?;
5750    if let Some(ref fld_var) = self.catalog_name {
5751      o_prot.write_field_begin(&TFieldIdentifier::new("catalogName", TType::String, 2))?;
5752      o_prot.write_string(fld_var)?;
5753      o_prot.write_field_end()?
5754    }
5755    if let Some(ref fld_var) = self.schema_name {
5756      o_prot.write_field_begin(&TFieldIdentifier::new("schemaName", TType::String, 3))?;
5757      o_prot.write_string(fld_var)?;
5758      o_prot.write_field_end()?
5759    }
5760    o_prot.write_field_begin(&TFieldIdentifier::new("functionName", TType::String, 4))?;
5761    o_prot.write_string(&self.function_name)?;
5762    o_prot.write_field_end()?;
5763    o_prot.write_field_stop()?;
5764    o_prot.write_struct_end()
5765  }
5766}
5767
5768//
5769// TGetFunctionsResp
5770//
5771
5772#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5773pub struct TGetFunctionsResp {
5774  pub status: TStatus,
5775  pub operation_handle: Option<TOperationHandle>,
5776}
5777
5778impl TGetFunctionsResp {
5779  pub fn new<F2>(status: TStatus, operation_handle: F2) -> TGetFunctionsResp where F2: Into<Option<TOperationHandle>> {
5780    TGetFunctionsResp {
5781      status,
5782      operation_handle: operation_handle.into(),
5783    }
5784  }
5785}
5786
5787impl TSerializable for TGetFunctionsResp {
5788  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetFunctionsResp> {
5789    i_prot.read_struct_begin()?;
5790    let mut f_1: Option<TStatus> = None;
5791    let mut f_2: Option<TOperationHandle> = None;
5792    loop {
5793      let field_ident = i_prot.read_field_begin()?;
5794      if field_ident.field_type == TType::Stop {
5795        break;
5796      }
5797      let field_id = field_id(&field_ident)?;
5798      match field_id {
5799        1 => {
5800          let val = TStatus::read_from_in_protocol(i_prot)?;
5801          f_1 = Some(val);
5802        },
5803        2 => {
5804          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
5805          f_2 = Some(val);
5806        },
5807        _ => {
5808          i_prot.skip(field_ident.field_type)?;
5809        },
5810      };
5811      i_prot.read_field_end()?;
5812    }
5813    i_prot.read_struct_end()?;
5814    verify_required_field_exists("TGetFunctionsResp.status", &f_1)?;
5815    let ret = TGetFunctionsResp {
5816      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
5817      operation_handle: f_2,
5818    };
5819    Ok(ret)
5820  }
5821  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5822    let struct_ident = TStructIdentifier::new("TGetFunctionsResp");
5823    o_prot.write_struct_begin(&struct_ident)?;
5824    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
5825    self.status.write_to_out_protocol(o_prot)?;
5826    o_prot.write_field_end()?;
5827    if let Some(ref fld_var) = self.operation_handle {
5828      o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
5829      fld_var.write_to_out_protocol(o_prot)?;
5830      o_prot.write_field_end()?
5831    }
5832    o_prot.write_field_stop()?;
5833    o_prot.write_struct_end()
5834  }
5835}
5836
5837//
5838// TGetPrimaryKeysReq
5839//
5840
5841#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5842pub struct TGetPrimaryKeysReq {
5843  pub session_handle: TSessionHandle,
5844  pub catalog_name: Option<TIdentifier>,
5845  pub schema_name: Option<TIdentifier>,
5846  pub table_name: Option<TIdentifier>,
5847}
5848
5849impl TGetPrimaryKeysReq {
5850  pub fn new<F2, F3, F4>(session_handle: TSessionHandle, catalog_name: F2, schema_name: F3, table_name: F4) -> TGetPrimaryKeysReq where F2: Into<Option<TIdentifier>>, F3: Into<Option<TIdentifier>>, F4: Into<Option<TIdentifier>> {
5851    TGetPrimaryKeysReq {
5852      session_handle,
5853      catalog_name: catalog_name.into(),
5854      schema_name: schema_name.into(),
5855      table_name: table_name.into(),
5856    }
5857  }
5858}
5859
5860impl TSerializable for TGetPrimaryKeysReq {
5861  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetPrimaryKeysReq> {
5862    i_prot.read_struct_begin()?;
5863    let mut f_1: Option<TSessionHandle> = None;
5864    let mut f_2: Option<TIdentifier> = None;
5865    let mut f_3: Option<TIdentifier> = None;
5866    let mut f_4: Option<TIdentifier> = None;
5867    loop {
5868      let field_ident = i_prot.read_field_begin()?;
5869      if field_ident.field_type == TType::Stop {
5870        break;
5871      }
5872      let field_id = field_id(&field_ident)?;
5873      match field_id {
5874        1 => {
5875          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
5876          f_1 = Some(val);
5877        },
5878        2 => {
5879          let val = i_prot.read_string()?;
5880          f_2 = Some(val);
5881        },
5882        3 => {
5883          let val = i_prot.read_string()?;
5884          f_3 = Some(val);
5885        },
5886        4 => {
5887          let val = i_prot.read_string()?;
5888          f_4 = Some(val);
5889        },
5890        _ => {
5891          i_prot.skip(field_ident.field_type)?;
5892        },
5893      };
5894      i_prot.read_field_end()?;
5895    }
5896    i_prot.read_struct_end()?;
5897    verify_required_field_exists("TGetPrimaryKeysReq.session_handle", &f_1)?;
5898    let ret = TGetPrimaryKeysReq {
5899      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
5900      catalog_name: f_2,
5901      schema_name: f_3,
5902      table_name: f_4,
5903    };
5904    Ok(ret)
5905  }
5906  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5907    let struct_ident = TStructIdentifier::new("TGetPrimaryKeysReq");
5908    o_prot.write_struct_begin(&struct_ident)?;
5909    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
5910    self.session_handle.write_to_out_protocol(o_prot)?;
5911    o_prot.write_field_end()?;
5912    if let Some(ref fld_var) = self.catalog_name {
5913      o_prot.write_field_begin(&TFieldIdentifier::new("catalogName", TType::String, 2))?;
5914      o_prot.write_string(fld_var)?;
5915      o_prot.write_field_end()?
5916    }
5917    if let Some(ref fld_var) = self.schema_name {
5918      o_prot.write_field_begin(&TFieldIdentifier::new("schemaName", TType::String, 3))?;
5919      o_prot.write_string(fld_var)?;
5920      o_prot.write_field_end()?
5921    }
5922    if let Some(ref fld_var) = self.table_name {
5923      o_prot.write_field_begin(&TFieldIdentifier::new("tableName", TType::String, 4))?;
5924      o_prot.write_string(fld_var)?;
5925      o_prot.write_field_end()?
5926    }
5927    o_prot.write_field_stop()?;
5928    o_prot.write_struct_end()
5929  }
5930}
5931
5932//
5933// TGetPrimaryKeysResp
5934//
5935
5936#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5937pub struct TGetPrimaryKeysResp {
5938  pub status: TStatus,
5939  pub operation_handle: Option<TOperationHandle>,
5940}
5941
5942impl TGetPrimaryKeysResp {
5943  pub fn new<F2>(status: TStatus, operation_handle: F2) -> TGetPrimaryKeysResp where F2: Into<Option<TOperationHandle>> {
5944    TGetPrimaryKeysResp {
5945      status,
5946      operation_handle: operation_handle.into(),
5947    }
5948  }
5949}
5950
5951impl TSerializable for TGetPrimaryKeysResp {
5952  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetPrimaryKeysResp> {
5953    i_prot.read_struct_begin()?;
5954    let mut f_1: Option<TStatus> = None;
5955    let mut f_2: Option<TOperationHandle> = None;
5956    loop {
5957      let field_ident = i_prot.read_field_begin()?;
5958      if field_ident.field_type == TType::Stop {
5959        break;
5960      }
5961      let field_id = field_id(&field_ident)?;
5962      match field_id {
5963        1 => {
5964          let val = TStatus::read_from_in_protocol(i_prot)?;
5965          f_1 = Some(val);
5966        },
5967        2 => {
5968          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
5969          f_2 = Some(val);
5970        },
5971        _ => {
5972          i_prot.skip(field_ident.field_type)?;
5973        },
5974      };
5975      i_prot.read_field_end()?;
5976    }
5977    i_prot.read_struct_end()?;
5978    verify_required_field_exists("TGetPrimaryKeysResp.status", &f_1)?;
5979    let ret = TGetPrimaryKeysResp {
5980      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
5981      operation_handle: f_2,
5982    };
5983    Ok(ret)
5984  }
5985  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5986    let struct_ident = TStructIdentifier::new("TGetPrimaryKeysResp");
5987    o_prot.write_struct_begin(&struct_ident)?;
5988    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
5989    self.status.write_to_out_protocol(o_prot)?;
5990    o_prot.write_field_end()?;
5991    if let Some(ref fld_var) = self.operation_handle {
5992      o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
5993      fld_var.write_to_out_protocol(o_prot)?;
5994      o_prot.write_field_end()?
5995    }
5996    o_prot.write_field_stop()?;
5997    o_prot.write_struct_end()
5998  }
5999}
6000
6001//
6002// TGetCrossReferenceReq
6003//
6004
6005#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6006pub struct TGetCrossReferenceReq {
6007  pub session_handle: TSessionHandle,
6008  pub parent_catalog_name: Option<TIdentifier>,
6009  pub parent_schema_name: Option<TIdentifier>,
6010  pub parent_table_name: Option<TIdentifier>,
6011  pub foreign_catalog_name: Option<TIdentifier>,
6012  pub foreign_schema_name: Option<TIdentifier>,
6013  pub foreign_table_name: Option<TIdentifier>,
6014}
6015
6016impl TGetCrossReferenceReq {
6017  pub fn new<F2, F3, F4, F5, F6, F7>(session_handle: TSessionHandle, parent_catalog_name: F2, parent_schema_name: F3, parent_table_name: F4, foreign_catalog_name: F5, foreign_schema_name: F6, foreign_table_name: F7) -> TGetCrossReferenceReq where F2: Into<Option<TIdentifier>>, F3: Into<Option<TIdentifier>>, F4: Into<Option<TIdentifier>>, F5: Into<Option<TIdentifier>>, F6: Into<Option<TIdentifier>>, F7: Into<Option<TIdentifier>> {
6018    TGetCrossReferenceReq {
6019      session_handle,
6020      parent_catalog_name: parent_catalog_name.into(),
6021      parent_schema_name: parent_schema_name.into(),
6022      parent_table_name: parent_table_name.into(),
6023      foreign_catalog_name: foreign_catalog_name.into(),
6024      foreign_schema_name: foreign_schema_name.into(),
6025      foreign_table_name: foreign_table_name.into(),
6026    }
6027  }
6028}
6029
6030impl TSerializable for TGetCrossReferenceReq {
6031  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetCrossReferenceReq> {
6032    i_prot.read_struct_begin()?;
6033    let mut f_1: Option<TSessionHandle> = None;
6034    let mut f_2: Option<TIdentifier> = None;
6035    let mut f_3: Option<TIdentifier> = None;
6036    let mut f_4: Option<TIdentifier> = None;
6037    let mut f_5: Option<TIdentifier> = None;
6038    let mut f_6: Option<TIdentifier> = None;
6039    let mut f_7: Option<TIdentifier> = None;
6040    loop {
6041      let field_ident = i_prot.read_field_begin()?;
6042      if field_ident.field_type == TType::Stop {
6043        break;
6044      }
6045      let field_id = field_id(&field_ident)?;
6046      match field_id {
6047        1 => {
6048          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
6049          f_1 = Some(val);
6050        },
6051        2 => {
6052          let val = i_prot.read_string()?;
6053          f_2 = Some(val);
6054        },
6055        3 => {
6056          let val = i_prot.read_string()?;
6057          f_3 = Some(val);
6058        },
6059        4 => {
6060          let val = i_prot.read_string()?;
6061          f_4 = Some(val);
6062        },
6063        5 => {
6064          let val = i_prot.read_string()?;
6065          f_5 = Some(val);
6066        },
6067        6 => {
6068          let val = i_prot.read_string()?;
6069          f_6 = Some(val);
6070        },
6071        7 => {
6072          let val = i_prot.read_string()?;
6073          f_7 = Some(val);
6074        },
6075        _ => {
6076          i_prot.skip(field_ident.field_type)?;
6077        },
6078      };
6079      i_prot.read_field_end()?;
6080    }
6081    i_prot.read_struct_end()?;
6082    verify_required_field_exists("TGetCrossReferenceReq.session_handle", &f_1)?;
6083    let ret = TGetCrossReferenceReq {
6084      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
6085      parent_catalog_name: f_2,
6086      parent_schema_name: f_3,
6087      parent_table_name: f_4,
6088      foreign_catalog_name: f_5,
6089      foreign_schema_name: f_6,
6090      foreign_table_name: f_7,
6091    };
6092    Ok(ret)
6093  }
6094  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6095    let struct_ident = TStructIdentifier::new("TGetCrossReferenceReq");
6096    o_prot.write_struct_begin(&struct_ident)?;
6097    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
6098    self.session_handle.write_to_out_protocol(o_prot)?;
6099    o_prot.write_field_end()?;
6100    if let Some(ref fld_var) = self.parent_catalog_name {
6101      o_prot.write_field_begin(&TFieldIdentifier::new("parentCatalogName", TType::String, 2))?;
6102      o_prot.write_string(fld_var)?;
6103      o_prot.write_field_end()?
6104    }
6105    if let Some(ref fld_var) = self.parent_schema_name {
6106      o_prot.write_field_begin(&TFieldIdentifier::new("parentSchemaName", TType::String, 3))?;
6107      o_prot.write_string(fld_var)?;
6108      o_prot.write_field_end()?
6109    }
6110    if let Some(ref fld_var) = self.parent_table_name {
6111      o_prot.write_field_begin(&TFieldIdentifier::new("parentTableName", TType::String, 4))?;
6112      o_prot.write_string(fld_var)?;
6113      o_prot.write_field_end()?
6114    }
6115    if let Some(ref fld_var) = self.foreign_catalog_name {
6116      o_prot.write_field_begin(&TFieldIdentifier::new("foreignCatalogName", TType::String, 5))?;
6117      o_prot.write_string(fld_var)?;
6118      o_prot.write_field_end()?
6119    }
6120    if let Some(ref fld_var) = self.foreign_schema_name {
6121      o_prot.write_field_begin(&TFieldIdentifier::new("foreignSchemaName", TType::String, 6))?;
6122      o_prot.write_string(fld_var)?;
6123      o_prot.write_field_end()?
6124    }
6125    if let Some(ref fld_var) = self.foreign_table_name {
6126      o_prot.write_field_begin(&TFieldIdentifier::new("foreignTableName", TType::String, 7))?;
6127      o_prot.write_string(fld_var)?;
6128      o_prot.write_field_end()?
6129    }
6130    o_prot.write_field_stop()?;
6131    o_prot.write_struct_end()
6132  }
6133}
6134
6135//
6136// TGetCrossReferenceResp
6137//
6138
6139#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6140pub struct TGetCrossReferenceResp {
6141  pub status: TStatus,
6142  pub operation_handle: Option<TOperationHandle>,
6143}
6144
6145impl TGetCrossReferenceResp {
6146  pub fn new<F2>(status: TStatus, operation_handle: F2) -> TGetCrossReferenceResp where F2: Into<Option<TOperationHandle>> {
6147    TGetCrossReferenceResp {
6148      status,
6149      operation_handle: operation_handle.into(),
6150    }
6151  }
6152}
6153
6154impl TSerializable for TGetCrossReferenceResp {
6155  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetCrossReferenceResp> {
6156    i_prot.read_struct_begin()?;
6157    let mut f_1: Option<TStatus> = None;
6158    let mut f_2: Option<TOperationHandle> = None;
6159    loop {
6160      let field_ident = i_prot.read_field_begin()?;
6161      if field_ident.field_type == TType::Stop {
6162        break;
6163      }
6164      let field_id = field_id(&field_ident)?;
6165      match field_id {
6166        1 => {
6167          let val = TStatus::read_from_in_protocol(i_prot)?;
6168          f_1 = Some(val);
6169        },
6170        2 => {
6171          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
6172          f_2 = Some(val);
6173        },
6174        _ => {
6175          i_prot.skip(field_ident.field_type)?;
6176        },
6177      };
6178      i_prot.read_field_end()?;
6179    }
6180    i_prot.read_struct_end()?;
6181    verify_required_field_exists("TGetCrossReferenceResp.status", &f_1)?;
6182    let ret = TGetCrossReferenceResp {
6183      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
6184      operation_handle: f_2,
6185    };
6186    Ok(ret)
6187  }
6188  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6189    let struct_ident = TStructIdentifier::new("TGetCrossReferenceResp");
6190    o_prot.write_struct_begin(&struct_ident)?;
6191    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
6192    self.status.write_to_out_protocol(o_prot)?;
6193    o_prot.write_field_end()?;
6194    if let Some(ref fld_var) = self.operation_handle {
6195      o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 2))?;
6196      fld_var.write_to_out_protocol(o_prot)?;
6197      o_prot.write_field_end()?
6198    }
6199    o_prot.write_field_stop()?;
6200    o_prot.write_struct_end()
6201  }
6202}
6203
6204//
6205// TGetOperationStatusReq
6206//
6207
6208#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6209pub struct TGetOperationStatusReq {
6210  pub operation_handle: TOperationHandle,
6211  pub get_progress_update: Option<bool>,
6212}
6213
6214impl TGetOperationStatusReq {
6215  pub fn new<F2>(operation_handle: TOperationHandle, get_progress_update: F2) -> TGetOperationStatusReq where F2: Into<Option<bool>> {
6216    TGetOperationStatusReq {
6217      operation_handle,
6218      get_progress_update: get_progress_update.into(),
6219    }
6220  }
6221}
6222
6223impl TSerializable for TGetOperationStatusReq {
6224  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetOperationStatusReq> {
6225    i_prot.read_struct_begin()?;
6226    let mut f_1: Option<TOperationHandle> = None;
6227    let mut f_2: Option<bool> = None;
6228    loop {
6229      let field_ident = i_prot.read_field_begin()?;
6230      if field_ident.field_type == TType::Stop {
6231        break;
6232      }
6233      let field_id = field_id(&field_ident)?;
6234      match field_id {
6235        1 => {
6236          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
6237          f_1 = Some(val);
6238        },
6239        2 => {
6240          let val = i_prot.read_bool()?;
6241          f_2 = Some(val);
6242        },
6243        _ => {
6244          i_prot.skip(field_ident.field_type)?;
6245        },
6246      };
6247      i_prot.read_field_end()?;
6248    }
6249    i_prot.read_struct_end()?;
6250    verify_required_field_exists("TGetOperationStatusReq.operation_handle", &f_1)?;
6251    let ret = TGetOperationStatusReq {
6252      operation_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
6253      get_progress_update: f_2,
6254    };
6255    Ok(ret)
6256  }
6257  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6258    let struct_ident = TStructIdentifier::new("TGetOperationStatusReq");
6259    o_prot.write_struct_begin(&struct_ident)?;
6260    o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 1))?;
6261    self.operation_handle.write_to_out_protocol(o_prot)?;
6262    o_prot.write_field_end()?;
6263    if let Some(fld_var) = self.get_progress_update {
6264      o_prot.write_field_begin(&TFieldIdentifier::new("getProgressUpdate", TType::Bool, 2))?;
6265      o_prot.write_bool(fld_var)?;
6266      o_prot.write_field_end()?
6267    }
6268    o_prot.write_field_stop()?;
6269    o_prot.write_struct_end()
6270  }
6271}
6272
6273//
6274// TGetOperationStatusResp
6275//
6276
6277#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6278pub struct TGetOperationStatusResp {
6279  pub status: TStatus,
6280  pub operation_state: Option<TOperationState>,
6281  pub sql_state: Option<String>,
6282  pub error_code: Option<i32>,
6283  pub error_message: Option<String>,
6284  pub task_status: Option<String>,
6285  pub operation_started: Option<i64>,
6286  pub operation_completed: Option<i64>,
6287  pub has_result_set: Option<bool>,
6288  pub progress_update_response: Option<Box<TProgressUpdateResp>>,
6289  pub num_modified_rows: Option<i64>,
6290}
6291
6292impl TGetOperationStatusResp {
6293  pub fn new<F2, F3, F4, F5, F6, F7, F8, F9, F10, F11>(status: TStatus, operation_state: F2, sql_state: F3, error_code: F4, error_message: F5, task_status: F6, operation_started: F7, operation_completed: F8, has_result_set: F9, progress_update_response: F10, num_modified_rows: F11) -> TGetOperationStatusResp where F2: Into<Option<TOperationState>>, F3: Into<Option<String>>, F4: Into<Option<i32>>, F5: Into<Option<String>>, F6: Into<Option<String>>, F7: Into<Option<i64>>, F8: Into<Option<i64>>, F9: Into<Option<bool>>, F10: Into<Option<Box<TProgressUpdateResp>>>, F11: Into<Option<i64>> {
6294    TGetOperationStatusResp {
6295      status,
6296      operation_state: operation_state.into(),
6297      sql_state: sql_state.into(),
6298      error_code: error_code.into(),
6299      error_message: error_message.into(),
6300      task_status: task_status.into(),
6301      operation_started: operation_started.into(),
6302      operation_completed: operation_completed.into(),
6303      has_result_set: has_result_set.into(),
6304      progress_update_response: progress_update_response.into(),
6305      num_modified_rows: num_modified_rows.into(),
6306    }
6307  }
6308}
6309
6310impl TSerializable for TGetOperationStatusResp {
6311  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetOperationStatusResp> {
6312    i_prot.read_struct_begin()?;
6313    let mut f_1: Option<TStatus> = None;
6314    let mut f_2: Option<TOperationState> = None;
6315    let mut f_3: Option<String> = None;
6316    let mut f_4: Option<i32> = None;
6317    let mut f_5: Option<String> = None;
6318    let mut f_6: Option<String> = None;
6319    let mut f_7: Option<i64> = None;
6320    let mut f_8: Option<i64> = None;
6321    let mut f_9: Option<bool> = None;
6322    let mut f_10: Option<Box<TProgressUpdateResp>> = None;
6323    let mut f_11: Option<i64> = None;
6324    loop {
6325      let field_ident = i_prot.read_field_begin()?;
6326      if field_ident.field_type == TType::Stop {
6327        break;
6328      }
6329      let field_id = field_id(&field_ident)?;
6330      match field_id {
6331        1 => {
6332          let val = TStatus::read_from_in_protocol(i_prot)?;
6333          f_1 = Some(val);
6334        },
6335        2 => {
6336          let val = TOperationState::read_from_in_protocol(i_prot)?;
6337          f_2 = Some(val);
6338        },
6339        3 => {
6340          let val = i_prot.read_string()?;
6341          f_3 = Some(val);
6342        },
6343        4 => {
6344          let val = i_prot.read_i32()?;
6345          f_4 = Some(val);
6346        },
6347        5 => {
6348          let val = i_prot.read_string()?;
6349          f_5 = Some(val);
6350        },
6351        6 => {
6352          let val = i_prot.read_string()?;
6353          f_6 = Some(val);
6354        },
6355        7 => {
6356          let val = i_prot.read_i64()?;
6357          f_7 = Some(val);
6358        },
6359        8 => {
6360          let val = i_prot.read_i64()?;
6361          f_8 = Some(val);
6362        },
6363        9 => {
6364          let val = i_prot.read_bool()?;
6365          f_9 = Some(val);
6366        },
6367        10 => {
6368          let val = Box::new(TProgressUpdateResp::read_from_in_protocol(i_prot)?);
6369          f_10 = Some(val);
6370        },
6371        11 => {
6372          let val = i_prot.read_i64()?;
6373          f_11 = Some(val);
6374        },
6375        _ => {
6376          i_prot.skip(field_ident.field_type)?;
6377        },
6378      };
6379      i_prot.read_field_end()?;
6380    }
6381    i_prot.read_struct_end()?;
6382    verify_required_field_exists("TGetOperationStatusResp.status", &f_1)?;
6383    let ret = TGetOperationStatusResp {
6384      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
6385      operation_state: f_2,
6386      sql_state: f_3,
6387      error_code: f_4,
6388      error_message: f_5,
6389      task_status: f_6,
6390      operation_started: f_7,
6391      operation_completed: f_8,
6392      has_result_set: f_9,
6393      progress_update_response: f_10,
6394      num_modified_rows: f_11,
6395    };
6396    Ok(ret)
6397  }
6398  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6399    let struct_ident = TStructIdentifier::new("TGetOperationStatusResp");
6400    o_prot.write_struct_begin(&struct_ident)?;
6401    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
6402    self.status.write_to_out_protocol(o_prot)?;
6403    o_prot.write_field_end()?;
6404    if let Some(ref fld_var) = self.operation_state {
6405      o_prot.write_field_begin(&TFieldIdentifier::new("operationState", TType::I32, 2))?;
6406      fld_var.write_to_out_protocol(o_prot)?;
6407      o_prot.write_field_end()?
6408    }
6409    if let Some(ref fld_var) = self.sql_state {
6410      o_prot.write_field_begin(&TFieldIdentifier::new("sqlState", TType::String, 3))?;
6411      o_prot.write_string(fld_var)?;
6412      o_prot.write_field_end()?
6413    }
6414    if let Some(fld_var) = self.error_code {
6415      o_prot.write_field_begin(&TFieldIdentifier::new("errorCode", TType::I32, 4))?;
6416      o_prot.write_i32(fld_var)?;
6417      o_prot.write_field_end()?
6418    }
6419    if let Some(ref fld_var) = self.error_message {
6420      o_prot.write_field_begin(&TFieldIdentifier::new("errorMessage", TType::String, 5))?;
6421      o_prot.write_string(fld_var)?;
6422      o_prot.write_field_end()?
6423    }
6424    if let Some(ref fld_var) = self.task_status {
6425      o_prot.write_field_begin(&TFieldIdentifier::new("taskStatus", TType::String, 6))?;
6426      o_prot.write_string(fld_var)?;
6427      o_prot.write_field_end()?
6428    }
6429    if let Some(fld_var) = self.operation_started {
6430      o_prot.write_field_begin(&TFieldIdentifier::new("operationStarted", TType::I64, 7))?;
6431      o_prot.write_i64(fld_var)?;
6432      o_prot.write_field_end()?
6433    }
6434    if let Some(fld_var) = self.operation_completed {
6435      o_prot.write_field_begin(&TFieldIdentifier::new("operationCompleted", TType::I64, 8))?;
6436      o_prot.write_i64(fld_var)?;
6437      o_prot.write_field_end()?
6438    }
6439    if let Some(fld_var) = self.has_result_set {
6440      o_prot.write_field_begin(&TFieldIdentifier::new("hasResultSet", TType::Bool, 9))?;
6441      o_prot.write_bool(fld_var)?;
6442      o_prot.write_field_end()?
6443    }
6444    if let Some(ref fld_var) = self.progress_update_response {
6445      o_prot.write_field_begin(&TFieldIdentifier::new("progressUpdateResponse", TType::Struct, 10))?;
6446      fld_var.write_to_out_protocol(o_prot)?;
6447      o_prot.write_field_end()?
6448    }
6449    if let Some(fld_var) = self.num_modified_rows {
6450      o_prot.write_field_begin(&TFieldIdentifier::new("numModifiedRows", TType::I64, 11))?;
6451      o_prot.write_i64(fld_var)?;
6452      o_prot.write_field_end()?
6453    }
6454    o_prot.write_field_stop()?;
6455    o_prot.write_struct_end()
6456  }
6457}
6458
6459//
6460// TCancelOperationReq
6461//
6462
6463#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6464pub struct TCancelOperationReq {
6465  pub operation_handle: TOperationHandle,
6466}
6467
6468impl TCancelOperationReq {
6469  pub fn new(operation_handle: TOperationHandle) -> TCancelOperationReq {
6470    TCancelOperationReq {
6471      operation_handle,
6472    }
6473  }
6474}
6475
6476impl TSerializable for TCancelOperationReq {
6477  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCancelOperationReq> {
6478    i_prot.read_struct_begin()?;
6479    let mut f_1: Option<TOperationHandle> = None;
6480    loop {
6481      let field_ident = i_prot.read_field_begin()?;
6482      if field_ident.field_type == TType::Stop {
6483        break;
6484      }
6485      let field_id = field_id(&field_ident)?;
6486      match field_id {
6487        1 => {
6488          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
6489          f_1 = Some(val);
6490        },
6491        _ => {
6492          i_prot.skip(field_ident.field_type)?;
6493        },
6494      };
6495      i_prot.read_field_end()?;
6496    }
6497    i_prot.read_struct_end()?;
6498    verify_required_field_exists("TCancelOperationReq.operation_handle", &f_1)?;
6499    let ret = TCancelOperationReq {
6500      operation_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
6501    };
6502    Ok(ret)
6503  }
6504  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6505    let struct_ident = TStructIdentifier::new("TCancelOperationReq");
6506    o_prot.write_struct_begin(&struct_ident)?;
6507    o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 1))?;
6508    self.operation_handle.write_to_out_protocol(o_prot)?;
6509    o_prot.write_field_end()?;
6510    o_prot.write_field_stop()?;
6511    o_prot.write_struct_end()
6512  }
6513}
6514
6515//
6516// TCancelOperationResp
6517//
6518
6519#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6520pub struct TCancelOperationResp {
6521  pub status: TStatus,
6522}
6523
6524impl TCancelOperationResp {
6525  pub fn new(status: TStatus) -> TCancelOperationResp {
6526    TCancelOperationResp {
6527      status,
6528    }
6529  }
6530}
6531
6532impl TSerializable for TCancelOperationResp {
6533  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCancelOperationResp> {
6534    i_prot.read_struct_begin()?;
6535    let mut f_1: Option<TStatus> = None;
6536    loop {
6537      let field_ident = i_prot.read_field_begin()?;
6538      if field_ident.field_type == TType::Stop {
6539        break;
6540      }
6541      let field_id = field_id(&field_ident)?;
6542      match field_id {
6543        1 => {
6544          let val = TStatus::read_from_in_protocol(i_prot)?;
6545          f_1 = Some(val);
6546        },
6547        _ => {
6548          i_prot.skip(field_ident.field_type)?;
6549        },
6550      };
6551      i_prot.read_field_end()?;
6552    }
6553    i_prot.read_struct_end()?;
6554    verify_required_field_exists("TCancelOperationResp.status", &f_1)?;
6555    let ret = TCancelOperationResp {
6556      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
6557    };
6558    Ok(ret)
6559  }
6560  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6561    let struct_ident = TStructIdentifier::new("TCancelOperationResp");
6562    o_prot.write_struct_begin(&struct_ident)?;
6563    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
6564    self.status.write_to_out_protocol(o_prot)?;
6565    o_prot.write_field_end()?;
6566    o_prot.write_field_stop()?;
6567    o_prot.write_struct_end()
6568  }
6569}
6570
6571//
6572// TCloseOperationReq
6573//
6574
6575#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6576pub struct TCloseOperationReq {
6577  pub operation_handle: TOperationHandle,
6578}
6579
6580impl TCloseOperationReq {
6581  pub fn new(operation_handle: TOperationHandle) -> TCloseOperationReq {
6582    TCloseOperationReq {
6583      operation_handle,
6584    }
6585  }
6586}
6587
6588impl TSerializable for TCloseOperationReq {
6589  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCloseOperationReq> {
6590    i_prot.read_struct_begin()?;
6591    let mut f_1: Option<TOperationHandle> = None;
6592    loop {
6593      let field_ident = i_prot.read_field_begin()?;
6594      if field_ident.field_type == TType::Stop {
6595        break;
6596      }
6597      let field_id = field_id(&field_ident)?;
6598      match field_id {
6599        1 => {
6600          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
6601          f_1 = Some(val);
6602        },
6603        _ => {
6604          i_prot.skip(field_ident.field_type)?;
6605        },
6606      };
6607      i_prot.read_field_end()?;
6608    }
6609    i_prot.read_struct_end()?;
6610    verify_required_field_exists("TCloseOperationReq.operation_handle", &f_1)?;
6611    let ret = TCloseOperationReq {
6612      operation_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
6613    };
6614    Ok(ret)
6615  }
6616  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6617    let struct_ident = TStructIdentifier::new("TCloseOperationReq");
6618    o_prot.write_struct_begin(&struct_ident)?;
6619    o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 1))?;
6620    self.operation_handle.write_to_out_protocol(o_prot)?;
6621    o_prot.write_field_end()?;
6622    o_prot.write_field_stop()?;
6623    o_prot.write_struct_end()
6624  }
6625}
6626
6627//
6628// TCloseOperationResp
6629//
6630
6631#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6632pub struct TCloseOperationResp {
6633  pub status: TStatus,
6634}
6635
6636impl TCloseOperationResp {
6637  pub fn new(status: TStatus) -> TCloseOperationResp {
6638    TCloseOperationResp {
6639      status,
6640    }
6641  }
6642}
6643
6644impl TSerializable for TCloseOperationResp {
6645  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCloseOperationResp> {
6646    i_prot.read_struct_begin()?;
6647    let mut f_1: Option<TStatus> = None;
6648    loop {
6649      let field_ident = i_prot.read_field_begin()?;
6650      if field_ident.field_type == TType::Stop {
6651        break;
6652      }
6653      let field_id = field_id(&field_ident)?;
6654      match field_id {
6655        1 => {
6656          let val = TStatus::read_from_in_protocol(i_prot)?;
6657          f_1 = Some(val);
6658        },
6659        _ => {
6660          i_prot.skip(field_ident.field_type)?;
6661        },
6662      };
6663      i_prot.read_field_end()?;
6664    }
6665    i_prot.read_struct_end()?;
6666    verify_required_field_exists("TCloseOperationResp.status", &f_1)?;
6667    let ret = TCloseOperationResp {
6668      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
6669    };
6670    Ok(ret)
6671  }
6672  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6673    let struct_ident = TStructIdentifier::new("TCloseOperationResp");
6674    o_prot.write_struct_begin(&struct_ident)?;
6675    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
6676    self.status.write_to_out_protocol(o_prot)?;
6677    o_prot.write_field_end()?;
6678    o_prot.write_field_stop()?;
6679    o_prot.write_struct_end()
6680  }
6681}
6682
6683//
6684// TGetResultSetMetadataReq
6685//
6686
6687#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6688pub struct TGetResultSetMetadataReq {
6689  pub operation_handle: TOperationHandle,
6690}
6691
6692impl TGetResultSetMetadataReq {
6693  pub fn new(operation_handle: TOperationHandle) -> TGetResultSetMetadataReq {
6694    TGetResultSetMetadataReq {
6695      operation_handle,
6696    }
6697  }
6698}
6699
6700impl TSerializable for TGetResultSetMetadataReq {
6701  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetResultSetMetadataReq> {
6702    i_prot.read_struct_begin()?;
6703    let mut f_1: Option<TOperationHandle> = None;
6704    loop {
6705      let field_ident = i_prot.read_field_begin()?;
6706      if field_ident.field_type == TType::Stop {
6707        break;
6708      }
6709      let field_id = field_id(&field_ident)?;
6710      match field_id {
6711        1 => {
6712          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
6713          f_1 = Some(val);
6714        },
6715        _ => {
6716          i_prot.skip(field_ident.field_type)?;
6717        },
6718      };
6719      i_prot.read_field_end()?;
6720    }
6721    i_prot.read_struct_end()?;
6722    verify_required_field_exists("TGetResultSetMetadataReq.operation_handle", &f_1)?;
6723    let ret = TGetResultSetMetadataReq {
6724      operation_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
6725    };
6726    Ok(ret)
6727  }
6728  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6729    let struct_ident = TStructIdentifier::new("TGetResultSetMetadataReq");
6730    o_prot.write_struct_begin(&struct_ident)?;
6731    o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 1))?;
6732    self.operation_handle.write_to_out_protocol(o_prot)?;
6733    o_prot.write_field_end()?;
6734    o_prot.write_field_stop()?;
6735    o_prot.write_struct_end()
6736  }
6737}
6738
6739//
6740// TGetResultSetMetadataResp
6741//
6742
6743#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6744pub struct TGetResultSetMetadataResp {
6745  pub status: TStatus,
6746  pub schema: Option<TTableSchema>,
6747}
6748
6749impl TGetResultSetMetadataResp {
6750  pub fn new<F2>(status: TStatus, schema: F2) -> TGetResultSetMetadataResp where F2: Into<Option<TTableSchema>> {
6751    TGetResultSetMetadataResp {
6752      status,
6753      schema: schema.into(),
6754    }
6755  }
6756}
6757
6758impl TSerializable for TGetResultSetMetadataResp {
6759  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetResultSetMetadataResp> {
6760    i_prot.read_struct_begin()?;
6761    let mut f_1: Option<TStatus> = None;
6762    let mut f_2: Option<TTableSchema> = None;
6763    loop {
6764      let field_ident = i_prot.read_field_begin()?;
6765      if field_ident.field_type == TType::Stop {
6766        break;
6767      }
6768      let field_id = field_id(&field_ident)?;
6769      match field_id {
6770        1 => {
6771          let val = TStatus::read_from_in_protocol(i_prot)?;
6772          f_1 = Some(val);
6773        },
6774        2 => {
6775          let val = TTableSchema::read_from_in_protocol(i_prot)?;
6776          f_2 = Some(val);
6777        },
6778        _ => {
6779          i_prot.skip(field_ident.field_type)?;
6780        },
6781      };
6782      i_prot.read_field_end()?;
6783    }
6784    i_prot.read_struct_end()?;
6785    verify_required_field_exists("TGetResultSetMetadataResp.status", &f_1)?;
6786    let ret = TGetResultSetMetadataResp {
6787      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
6788      schema: f_2,
6789    };
6790    Ok(ret)
6791  }
6792  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6793    let struct_ident = TStructIdentifier::new("TGetResultSetMetadataResp");
6794    o_prot.write_struct_begin(&struct_ident)?;
6795    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
6796    self.status.write_to_out_protocol(o_prot)?;
6797    o_prot.write_field_end()?;
6798    if let Some(ref fld_var) = self.schema {
6799      o_prot.write_field_begin(&TFieldIdentifier::new("schema", TType::Struct, 2))?;
6800      fld_var.write_to_out_protocol(o_prot)?;
6801      o_prot.write_field_end()?
6802    }
6803    o_prot.write_field_stop()?;
6804    o_prot.write_struct_end()
6805  }
6806}
6807
6808//
6809// TFetchResultsReq
6810//
6811
6812#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6813pub struct TFetchResultsReq {
6814  pub operation_handle: TOperationHandle,
6815  pub orientation: TFetchOrientation,
6816  pub max_rows: i64,
6817  pub fetch_type: Option<i16>,
6818}
6819
6820impl TFetchResultsReq {
6821  pub fn new<F4>(operation_handle: TOperationHandle, orientation: TFetchOrientation, max_rows: i64, fetch_type: F4) -> TFetchResultsReq where F4: Into<Option<i16>> {
6822    TFetchResultsReq {
6823      operation_handle,
6824      orientation,
6825      max_rows,
6826      fetch_type: fetch_type.into(),
6827    }
6828  }
6829}
6830
6831impl TSerializable for TFetchResultsReq {
6832  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TFetchResultsReq> {
6833    i_prot.read_struct_begin()?;
6834    let mut f_1: Option<TOperationHandle> = None;
6835    let mut f_2: Option<TFetchOrientation> = None;
6836    let mut f_3: Option<i64> = None;
6837    let mut f_4: Option<i16> = None;
6838    loop {
6839      let field_ident = i_prot.read_field_begin()?;
6840      if field_ident.field_type == TType::Stop {
6841        break;
6842      }
6843      let field_id = field_id(&field_ident)?;
6844      match field_id {
6845        1 => {
6846          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
6847          f_1 = Some(val);
6848        },
6849        2 => {
6850          let val = TFetchOrientation::read_from_in_protocol(i_prot)?;
6851          f_2 = Some(val);
6852        },
6853        3 => {
6854          let val = i_prot.read_i64()?;
6855          f_3 = Some(val);
6856        },
6857        4 => {
6858          let val = i_prot.read_i16()?;
6859          f_4 = Some(val);
6860        },
6861        _ => {
6862          i_prot.skip(field_ident.field_type)?;
6863        },
6864      };
6865      i_prot.read_field_end()?;
6866    }
6867    i_prot.read_struct_end()?;
6868    verify_required_field_exists("TFetchResultsReq.operation_handle", &f_1)?;
6869    verify_required_field_exists("TFetchResultsReq.orientation", &f_2)?;
6870    verify_required_field_exists("TFetchResultsReq.max_rows", &f_3)?;
6871    let ret = TFetchResultsReq {
6872      operation_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
6873      orientation: f_2.expect("auto-generated code should have checked for presence of required fields"),
6874      max_rows: f_3.expect("auto-generated code should have checked for presence of required fields"),
6875      fetch_type: f_4,
6876    };
6877    Ok(ret)
6878  }
6879  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6880    let struct_ident = TStructIdentifier::new("TFetchResultsReq");
6881    o_prot.write_struct_begin(&struct_ident)?;
6882    o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 1))?;
6883    self.operation_handle.write_to_out_protocol(o_prot)?;
6884    o_prot.write_field_end()?;
6885    o_prot.write_field_begin(&TFieldIdentifier::new("orientation", TType::I32, 2))?;
6886    self.orientation.write_to_out_protocol(o_prot)?;
6887    o_prot.write_field_end()?;
6888    o_prot.write_field_begin(&TFieldIdentifier::new("maxRows", TType::I64, 3))?;
6889    o_prot.write_i64(self.max_rows)?;
6890    o_prot.write_field_end()?;
6891    if let Some(fld_var) = self.fetch_type {
6892      o_prot.write_field_begin(&TFieldIdentifier::new("fetchType", TType::I16, 4))?;
6893      o_prot.write_i16(fld_var)?;
6894      o_prot.write_field_end()?
6895    }
6896    o_prot.write_field_stop()?;
6897    o_prot.write_struct_end()
6898  }
6899}
6900
6901//
6902// TFetchResultsResp
6903//
6904
6905#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6906pub struct TFetchResultsResp {
6907  pub status: TStatus,
6908  pub has_more_rows: Option<bool>,
6909  pub results: Option<TRowSet>,
6910}
6911
6912impl TFetchResultsResp {
6913  pub fn new<F2, F3>(status: TStatus, has_more_rows: F2, results: F3) -> TFetchResultsResp where F2: Into<Option<bool>>, F3: Into<Option<TRowSet>> {
6914    TFetchResultsResp {
6915      status,
6916      has_more_rows: has_more_rows.into(),
6917      results: results.into(),
6918    }
6919  }
6920}
6921
6922impl TSerializable for TFetchResultsResp {
6923  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TFetchResultsResp> {
6924    i_prot.read_struct_begin()?;
6925    let mut f_1: Option<TStatus> = None;
6926    let mut f_2: Option<bool> = None;
6927    let mut f_3: Option<TRowSet> = None;
6928    loop {
6929      let field_ident = i_prot.read_field_begin()?;
6930      if field_ident.field_type == TType::Stop {
6931        break;
6932      }
6933      let field_id = field_id(&field_ident)?;
6934      match field_id {
6935        1 => {
6936          let val = TStatus::read_from_in_protocol(i_prot)?;
6937          f_1 = Some(val);
6938        },
6939        2 => {
6940          let val = i_prot.read_bool()?;
6941          f_2 = Some(val);
6942        },
6943        3 => {
6944          let val = TRowSet::read_from_in_protocol(i_prot)?;
6945          f_3 = Some(val);
6946        },
6947        _ => {
6948          i_prot.skip(field_ident.field_type)?;
6949        },
6950      };
6951      i_prot.read_field_end()?;
6952    }
6953    i_prot.read_struct_end()?;
6954    verify_required_field_exists("TFetchResultsResp.status", &f_1)?;
6955    let ret = TFetchResultsResp {
6956      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
6957      has_more_rows: f_2,
6958      results: f_3,
6959    };
6960    Ok(ret)
6961  }
6962  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6963    let struct_ident = TStructIdentifier::new("TFetchResultsResp");
6964    o_prot.write_struct_begin(&struct_ident)?;
6965    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
6966    self.status.write_to_out_protocol(o_prot)?;
6967    o_prot.write_field_end()?;
6968    if let Some(fld_var) = self.has_more_rows {
6969      o_prot.write_field_begin(&TFieldIdentifier::new("hasMoreRows", TType::Bool, 2))?;
6970      o_prot.write_bool(fld_var)?;
6971      o_prot.write_field_end()?
6972    }
6973    if let Some(ref fld_var) = self.results {
6974      o_prot.write_field_begin(&TFieldIdentifier::new("results", TType::Struct, 3))?;
6975      fld_var.write_to_out_protocol(o_prot)?;
6976      o_prot.write_field_end()?
6977    }
6978    o_prot.write_field_stop()?;
6979    o_prot.write_struct_end()
6980  }
6981}
6982
6983//
6984// TGetDelegationTokenReq
6985//
6986
6987#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6988pub struct TGetDelegationTokenReq {
6989  pub session_handle: TSessionHandle,
6990  pub owner: String,
6991  pub renewer: String,
6992}
6993
6994impl TGetDelegationTokenReq {
6995  pub fn new(session_handle: TSessionHandle, owner: String, renewer: String) -> TGetDelegationTokenReq {
6996    TGetDelegationTokenReq {
6997      session_handle,
6998      owner,
6999      renewer,
7000    }
7001  }
7002}
7003
7004impl TSerializable for TGetDelegationTokenReq {
7005  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetDelegationTokenReq> {
7006    i_prot.read_struct_begin()?;
7007    let mut f_1: Option<TSessionHandle> = None;
7008    let mut f_2: Option<String> = None;
7009    let mut f_3: Option<String> = None;
7010    loop {
7011      let field_ident = i_prot.read_field_begin()?;
7012      if field_ident.field_type == TType::Stop {
7013        break;
7014      }
7015      let field_id = field_id(&field_ident)?;
7016      match field_id {
7017        1 => {
7018          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
7019          f_1 = Some(val);
7020        },
7021        2 => {
7022          let val = i_prot.read_string()?;
7023          f_2 = Some(val);
7024        },
7025        3 => {
7026          let val = i_prot.read_string()?;
7027          f_3 = Some(val);
7028        },
7029        _ => {
7030          i_prot.skip(field_ident.field_type)?;
7031        },
7032      };
7033      i_prot.read_field_end()?;
7034    }
7035    i_prot.read_struct_end()?;
7036    verify_required_field_exists("TGetDelegationTokenReq.session_handle", &f_1)?;
7037    verify_required_field_exists("TGetDelegationTokenReq.owner", &f_2)?;
7038    verify_required_field_exists("TGetDelegationTokenReq.renewer", &f_3)?;
7039    let ret = TGetDelegationTokenReq {
7040      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
7041      owner: f_2.expect("auto-generated code should have checked for presence of required fields"),
7042      renewer: f_3.expect("auto-generated code should have checked for presence of required fields"),
7043    };
7044    Ok(ret)
7045  }
7046  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7047    let struct_ident = TStructIdentifier::new("TGetDelegationTokenReq");
7048    o_prot.write_struct_begin(&struct_ident)?;
7049    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
7050    self.session_handle.write_to_out_protocol(o_prot)?;
7051    o_prot.write_field_end()?;
7052    o_prot.write_field_begin(&TFieldIdentifier::new("owner", TType::String, 2))?;
7053    o_prot.write_string(&self.owner)?;
7054    o_prot.write_field_end()?;
7055    o_prot.write_field_begin(&TFieldIdentifier::new("renewer", TType::String, 3))?;
7056    o_prot.write_string(&self.renewer)?;
7057    o_prot.write_field_end()?;
7058    o_prot.write_field_stop()?;
7059    o_prot.write_struct_end()
7060  }
7061}
7062
7063//
7064// TGetDelegationTokenResp
7065//
7066
7067#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7068pub struct TGetDelegationTokenResp {
7069  pub status: TStatus,
7070  pub delegation_token: Option<String>,
7071}
7072
7073impl TGetDelegationTokenResp {
7074  pub fn new<F2>(status: TStatus, delegation_token: F2) -> TGetDelegationTokenResp where F2: Into<Option<String>> {
7075    TGetDelegationTokenResp {
7076      status,
7077      delegation_token: delegation_token.into(),
7078    }
7079  }
7080}
7081
7082impl TSerializable for TGetDelegationTokenResp {
7083  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetDelegationTokenResp> {
7084    i_prot.read_struct_begin()?;
7085    let mut f_1: Option<TStatus> = None;
7086    let mut f_2: Option<String> = None;
7087    loop {
7088      let field_ident = i_prot.read_field_begin()?;
7089      if field_ident.field_type == TType::Stop {
7090        break;
7091      }
7092      let field_id = field_id(&field_ident)?;
7093      match field_id {
7094        1 => {
7095          let val = TStatus::read_from_in_protocol(i_prot)?;
7096          f_1 = Some(val);
7097        },
7098        2 => {
7099          let val = i_prot.read_string()?;
7100          f_2 = Some(val);
7101        },
7102        _ => {
7103          i_prot.skip(field_ident.field_type)?;
7104        },
7105      };
7106      i_prot.read_field_end()?;
7107    }
7108    i_prot.read_struct_end()?;
7109    verify_required_field_exists("TGetDelegationTokenResp.status", &f_1)?;
7110    let ret = TGetDelegationTokenResp {
7111      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
7112      delegation_token: f_2,
7113    };
7114    Ok(ret)
7115  }
7116  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7117    let struct_ident = TStructIdentifier::new("TGetDelegationTokenResp");
7118    o_prot.write_struct_begin(&struct_ident)?;
7119    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
7120    self.status.write_to_out_protocol(o_prot)?;
7121    o_prot.write_field_end()?;
7122    if let Some(ref fld_var) = self.delegation_token {
7123      o_prot.write_field_begin(&TFieldIdentifier::new("delegationToken", TType::String, 2))?;
7124      o_prot.write_string(fld_var)?;
7125      o_prot.write_field_end()?
7126    }
7127    o_prot.write_field_stop()?;
7128    o_prot.write_struct_end()
7129  }
7130}
7131
7132//
7133// TCancelDelegationTokenReq
7134//
7135
7136#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7137pub struct TCancelDelegationTokenReq {
7138  pub session_handle: TSessionHandle,
7139  pub delegation_token: String,
7140}
7141
7142impl TCancelDelegationTokenReq {
7143  pub fn new(session_handle: TSessionHandle, delegation_token: String) -> TCancelDelegationTokenReq {
7144    TCancelDelegationTokenReq {
7145      session_handle,
7146      delegation_token,
7147    }
7148  }
7149}
7150
7151impl TSerializable for TCancelDelegationTokenReq {
7152  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCancelDelegationTokenReq> {
7153    i_prot.read_struct_begin()?;
7154    let mut f_1: Option<TSessionHandle> = None;
7155    let mut f_2: Option<String> = None;
7156    loop {
7157      let field_ident = i_prot.read_field_begin()?;
7158      if field_ident.field_type == TType::Stop {
7159        break;
7160      }
7161      let field_id = field_id(&field_ident)?;
7162      match field_id {
7163        1 => {
7164          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
7165          f_1 = Some(val);
7166        },
7167        2 => {
7168          let val = i_prot.read_string()?;
7169          f_2 = Some(val);
7170        },
7171        _ => {
7172          i_prot.skip(field_ident.field_type)?;
7173        },
7174      };
7175      i_prot.read_field_end()?;
7176    }
7177    i_prot.read_struct_end()?;
7178    verify_required_field_exists("TCancelDelegationTokenReq.session_handle", &f_1)?;
7179    verify_required_field_exists("TCancelDelegationTokenReq.delegation_token", &f_2)?;
7180    let ret = TCancelDelegationTokenReq {
7181      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
7182      delegation_token: f_2.expect("auto-generated code should have checked for presence of required fields"),
7183    };
7184    Ok(ret)
7185  }
7186  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7187    let struct_ident = TStructIdentifier::new("TCancelDelegationTokenReq");
7188    o_prot.write_struct_begin(&struct_ident)?;
7189    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
7190    self.session_handle.write_to_out_protocol(o_prot)?;
7191    o_prot.write_field_end()?;
7192    o_prot.write_field_begin(&TFieldIdentifier::new("delegationToken", TType::String, 2))?;
7193    o_prot.write_string(&self.delegation_token)?;
7194    o_prot.write_field_end()?;
7195    o_prot.write_field_stop()?;
7196    o_prot.write_struct_end()
7197  }
7198}
7199
7200//
7201// TCancelDelegationTokenResp
7202//
7203
7204#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7205pub struct TCancelDelegationTokenResp {
7206  pub status: TStatus,
7207}
7208
7209impl TCancelDelegationTokenResp {
7210  pub fn new(status: TStatus) -> TCancelDelegationTokenResp {
7211    TCancelDelegationTokenResp {
7212      status,
7213    }
7214  }
7215}
7216
7217impl TSerializable for TCancelDelegationTokenResp {
7218  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCancelDelegationTokenResp> {
7219    i_prot.read_struct_begin()?;
7220    let mut f_1: Option<TStatus> = None;
7221    loop {
7222      let field_ident = i_prot.read_field_begin()?;
7223      if field_ident.field_type == TType::Stop {
7224        break;
7225      }
7226      let field_id = field_id(&field_ident)?;
7227      match field_id {
7228        1 => {
7229          let val = TStatus::read_from_in_protocol(i_prot)?;
7230          f_1 = Some(val);
7231        },
7232        _ => {
7233          i_prot.skip(field_ident.field_type)?;
7234        },
7235      };
7236      i_prot.read_field_end()?;
7237    }
7238    i_prot.read_struct_end()?;
7239    verify_required_field_exists("TCancelDelegationTokenResp.status", &f_1)?;
7240    let ret = TCancelDelegationTokenResp {
7241      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
7242    };
7243    Ok(ret)
7244  }
7245  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7246    let struct_ident = TStructIdentifier::new("TCancelDelegationTokenResp");
7247    o_prot.write_struct_begin(&struct_ident)?;
7248    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
7249    self.status.write_to_out_protocol(o_prot)?;
7250    o_prot.write_field_end()?;
7251    o_prot.write_field_stop()?;
7252    o_prot.write_struct_end()
7253  }
7254}
7255
7256//
7257// TRenewDelegationTokenReq
7258//
7259
7260#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7261pub struct TRenewDelegationTokenReq {
7262  pub session_handle: TSessionHandle,
7263  pub delegation_token: String,
7264}
7265
7266impl TRenewDelegationTokenReq {
7267  pub fn new(session_handle: TSessionHandle, delegation_token: String) -> TRenewDelegationTokenReq {
7268    TRenewDelegationTokenReq {
7269      session_handle,
7270      delegation_token,
7271    }
7272  }
7273}
7274
7275impl TSerializable for TRenewDelegationTokenReq {
7276  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TRenewDelegationTokenReq> {
7277    i_prot.read_struct_begin()?;
7278    let mut f_1: Option<TSessionHandle> = None;
7279    let mut f_2: Option<String> = None;
7280    loop {
7281      let field_ident = i_prot.read_field_begin()?;
7282      if field_ident.field_type == TType::Stop {
7283        break;
7284      }
7285      let field_id = field_id(&field_ident)?;
7286      match field_id {
7287        1 => {
7288          let val = TSessionHandle::read_from_in_protocol(i_prot)?;
7289          f_1 = Some(val);
7290        },
7291        2 => {
7292          let val = i_prot.read_string()?;
7293          f_2 = Some(val);
7294        },
7295        _ => {
7296          i_prot.skip(field_ident.field_type)?;
7297        },
7298      };
7299      i_prot.read_field_end()?;
7300    }
7301    i_prot.read_struct_end()?;
7302    verify_required_field_exists("TRenewDelegationTokenReq.session_handle", &f_1)?;
7303    verify_required_field_exists("TRenewDelegationTokenReq.delegation_token", &f_2)?;
7304    let ret = TRenewDelegationTokenReq {
7305      session_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
7306      delegation_token: f_2.expect("auto-generated code should have checked for presence of required fields"),
7307    };
7308    Ok(ret)
7309  }
7310  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7311    let struct_ident = TStructIdentifier::new("TRenewDelegationTokenReq");
7312    o_prot.write_struct_begin(&struct_ident)?;
7313    o_prot.write_field_begin(&TFieldIdentifier::new("sessionHandle", TType::Struct, 1))?;
7314    self.session_handle.write_to_out_protocol(o_prot)?;
7315    o_prot.write_field_end()?;
7316    o_prot.write_field_begin(&TFieldIdentifier::new("delegationToken", TType::String, 2))?;
7317    o_prot.write_string(&self.delegation_token)?;
7318    o_prot.write_field_end()?;
7319    o_prot.write_field_stop()?;
7320    o_prot.write_struct_end()
7321  }
7322}
7323
7324//
7325// TRenewDelegationTokenResp
7326//
7327
7328#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7329pub struct TRenewDelegationTokenResp {
7330  pub status: TStatus,
7331}
7332
7333impl TRenewDelegationTokenResp {
7334  pub fn new(status: TStatus) -> TRenewDelegationTokenResp {
7335    TRenewDelegationTokenResp {
7336      status,
7337    }
7338  }
7339}
7340
7341impl TSerializable for TRenewDelegationTokenResp {
7342  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TRenewDelegationTokenResp> {
7343    i_prot.read_struct_begin()?;
7344    let mut f_1: Option<TStatus> = None;
7345    loop {
7346      let field_ident = i_prot.read_field_begin()?;
7347      if field_ident.field_type == TType::Stop {
7348        break;
7349      }
7350      let field_id = field_id(&field_ident)?;
7351      match field_id {
7352        1 => {
7353          let val = TStatus::read_from_in_protocol(i_prot)?;
7354          f_1 = Some(val);
7355        },
7356        _ => {
7357          i_prot.skip(field_ident.field_type)?;
7358        },
7359      };
7360      i_prot.read_field_end()?;
7361    }
7362    i_prot.read_struct_end()?;
7363    verify_required_field_exists("TRenewDelegationTokenResp.status", &f_1)?;
7364    let ret = TRenewDelegationTokenResp {
7365      status: f_1.expect("auto-generated code should have checked for presence of required fields"),
7366    };
7367    Ok(ret)
7368  }
7369  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7370    let struct_ident = TStructIdentifier::new("TRenewDelegationTokenResp");
7371    o_prot.write_struct_begin(&struct_ident)?;
7372    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
7373    self.status.write_to_out_protocol(o_prot)?;
7374    o_prot.write_field_end()?;
7375    o_prot.write_field_stop()?;
7376    o_prot.write_struct_end()
7377  }
7378}
7379
7380//
7381// TProgressUpdateResp
7382//
7383
7384#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7385pub struct TProgressUpdateResp {
7386  pub header_names: Vec<String>,
7387  pub rows: Vec<Vec<String>>,
7388  pub progressed_percentage: OrderedFloat<f64>,
7389  pub status: TJobExecutionStatus,
7390  pub footer_summary: String,
7391  pub start_time: i64,
7392}
7393
7394impl TProgressUpdateResp {
7395  pub fn new(header_names: Vec<String>, rows: Vec<Vec<String>>, progressed_percentage: OrderedFloat<f64>, status: TJobExecutionStatus, footer_summary: String, start_time: i64) -> TProgressUpdateResp {
7396    TProgressUpdateResp {
7397      header_names,
7398      rows,
7399      progressed_percentage,
7400      status,
7401      footer_summary,
7402      start_time,
7403    }
7404  }
7405}
7406
7407impl TSerializable for TProgressUpdateResp {
7408  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TProgressUpdateResp> {
7409    i_prot.read_struct_begin()?;
7410    let mut f_1: Option<Vec<String>> = None;
7411    let mut f_2: Option<Vec<Vec<String>>> = None;
7412    let mut f_3: Option<OrderedFloat<f64>> = None;
7413    let mut f_4: Option<TJobExecutionStatus> = None;
7414    let mut f_5: Option<String> = None;
7415    let mut f_6: Option<i64> = None;
7416    loop {
7417      let field_ident = i_prot.read_field_begin()?;
7418      if field_ident.field_type == TType::Stop {
7419        break;
7420      }
7421      let field_id = field_id(&field_ident)?;
7422      match field_id {
7423        1 => {
7424          let list_ident = i_prot.read_list_begin()?;
7425          let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
7426          for _ in 0..list_ident.size {
7427            let list_elem_31 = i_prot.read_string()?;
7428            val.push(list_elem_31);
7429          }
7430          i_prot.read_list_end()?;
7431          f_1 = Some(val);
7432        },
7433        2 => {
7434          let list_ident = i_prot.read_list_begin()?;
7435          let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize);
7436          for _ in 0..list_ident.size {
7437            let list_ident = i_prot.read_list_begin()?;
7438            let mut list_elem_32: Vec<String> = Vec::with_capacity(list_ident.size as usize);
7439            for _ in 0..list_ident.size {
7440              let list_elem_33 = i_prot.read_string()?;
7441              list_elem_32.push(list_elem_33);
7442            }
7443            i_prot.read_list_end()?;
7444            val.push(list_elem_32);
7445          }
7446          i_prot.read_list_end()?;
7447          f_2 = Some(val);
7448        },
7449        3 => {
7450          let val = OrderedFloat::from(i_prot.read_double()?);
7451          f_3 = Some(val);
7452        },
7453        4 => {
7454          let val = TJobExecutionStatus::read_from_in_protocol(i_prot)?;
7455          f_4 = Some(val);
7456        },
7457        5 => {
7458          let val = i_prot.read_string()?;
7459          f_5 = Some(val);
7460        },
7461        6 => {
7462          let val = i_prot.read_i64()?;
7463          f_6 = Some(val);
7464        },
7465        _ => {
7466          i_prot.skip(field_ident.field_type)?;
7467        },
7468      };
7469      i_prot.read_field_end()?;
7470    }
7471    i_prot.read_struct_end()?;
7472    verify_required_field_exists("TProgressUpdateResp.header_names", &f_1)?;
7473    verify_required_field_exists("TProgressUpdateResp.rows", &f_2)?;
7474    verify_required_field_exists("TProgressUpdateResp.progressed_percentage", &f_3)?;
7475    verify_required_field_exists("TProgressUpdateResp.status", &f_4)?;
7476    verify_required_field_exists("TProgressUpdateResp.footer_summary", &f_5)?;
7477    verify_required_field_exists("TProgressUpdateResp.start_time", &f_6)?;
7478    let ret = TProgressUpdateResp {
7479      header_names: f_1.expect("auto-generated code should have checked for presence of required fields"),
7480      rows: f_2.expect("auto-generated code should have checked for presence of required fields"),
7481      progressed_percentage: f_3.expect("auto-generated code should have checked for presence of required fields"),
7482      status: f_4.expect("auto-generated code should have checked for presence of required fields"),
7483      footer_summary: f_5.expect("auto-generated code should have checked for presence of required fields"),
7484      start_time: f_6.expect("auto-generated code should have checked for presence of required fields"),
7485    };
7486    Ok(ret)
7487  }
7488  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7489    let struct_ident = TStructIdentifier::new("TProgressUpdateResp");
7490    o_prot.write_struct_begin(&struct_ident)?;
7491    o_prot.write_field_begin(&TFieldIdentifier::new("headerNames", TType::List, 1))?;
7492    o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.header_names.len() as i32))?;
7493    for e in &self.header_names {
7494      o_prot.write_string(e)?;
7495    }
7496    o_prot.write_list_end()?;
7497    o_prot.write_field_end()?;
7498    o_prot.write_field_begin(&TFieldIdentifier::new("rows", TType::List, 2))?;
7499    o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.rows.len() as i32))?;
7500    for e in &self.rows {
7501      o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?;
7502      for e in e {
7503        o_prot.write_string(e)?;
7504      }
7505      o_prot.write_list_end()?;
7506    }
7507    o_prot.write_list_end()?;
7508    o_prot.write_field_end()?;
7509    o_prot.write_field_begin(&TFieldIdentifier::new("progressedPercentage", TType::Double, 3))?;
7510    o_prot.write_double(self.progressed_percentage.into())?;
7511    o_prot.write_field_end()?;
7512    o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::I32, 4))?;
7513    self.status.write_to_out_protocol(o_prot)?;
7514    o_prot.write_field_end()?;
7515    o_prot.write_field_begin(&TFieldIdentifier::new("footerSummary", TType::String, 5))?;
7516    o_prot.write_string(&self.footer_summary)?;
7517    o_prot.write_field_end()?;
7518    o_prot.write_field_begin(&TFieldIdentifier::new("startTime", TType::I64, 6))?;
7519    o_prot.write_i64(self.start_time)?;
7520    o_prot.write_field_end()?;
7521    o_prot.write_field_stop()?;
7522    o_prot.write_struct_end()
7523  }
7524}
7525
7526//
7527// TGetQueryIdReq
7528//
7529
7530#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7531pub struct TGetQueryIdReq {
7532  pub operation_handle: TOperationHandle,
7533}
7534
7535impl TGetQueryIdReq {
7536  pub fn new(operation_handle: TOperationHandle) -> TGetQueryIdReq {
7537    TGetQueryIdReq {
7538      operation_handle,
7539    }
7540  }
7541}
7542
7543impl TSerializable for TGetQueryIdReq {
7544  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetQueryIdReq> {
7545    i_prot.read_struct_begin()?;
7546    let mut f_1: Option<TOperationHandle> = None;
7547    loop {
7548      let field_ident = i_prot.read_field_begin()?;
7549      if field_ident.field_type == TType::Stop {
7550        break;
7551      }
7552      let field_id = field_id(&field_ident)?;
7553      match field_id {
7554        1 => {
7555          let val = TOperationHandle::read_from_in_protocol(i_prot)?;
7556          f_1 = Some(val);
7557        },
7558        _ => {
7559          i_prot.skip(field_ident.field_type)?;
7560        },
7561      };
7562      i_prot.read_field_end()?;
7563    }
7564    i_prot.read_struct_end()?;
7565    verify_required_field_exists("TGetQueryIdReq.operation_handle", &f_1)?;
7566    let ret = TGetQueryIdReq {
7567      operation_handle: f_1.expect("auto-generated code should have checked for presence of required fields"),
7568    };
7569    Ok(ret)
7570  }
7571  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7572    let struct_ident = TStructIdentifier::new("TGetQueryIdReq");
7573    o_prot.write_struct_begin(&struct_ident)?;
7574    o_prot.write_field_begin(&TFieldIdentifier::new("operationHandle", TType::Struct, 1))?;
7575    self.operation_handle.write_to_out_protocol(o_prot)?;
7576    o_prot.write_field_end()?;
7577    o_prot.write_field_stop()?;
7578    o_prot.write_struct_end()
7579  }
7580}
7581
7582//
7583// TGetQueryIdResp
7584//
7585
7586#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7587pub struct TGetQueryIdResp {
7588  pub query_id: String,
7589}
7590
7591impl TGetQueryIdResp {
7592  pub fn new(query_id: String) -> TGetQueryIdResp {
7593    TGetQueryIdResp {
7594      query_id,
7595    }
7596  }
7597}
7598
7599impl TSerializable for TGetQueryIdResp {
7600  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TGetQueryIdResp> {
7601    i_prot.read_struct_begin()?;
7602    let mut f_1: Option<String> = None;
7603    loop {
7604      let field_ident = i_prot.read_field_begin()?;
7605      if field_ident.field_type == TType::Stop {
7606        break;
7607      }
7608      let field_id = field_id(&field_ident)?;
7609      match field_id {
7610        1 => {
7611          let val = i_prot.read_string()?;
7612          f_1 = Some(val);
7613        },
7614        _ => {
7615          i_prot.skip(field_ident.field_type)?;
7616        },
7617      };
7618      i_prot.read_field_end()?;
7619    }
7620    i_prot.read_struct_end()?;
7621    verify_required_field_exists("TGetQueryIdResp.query_id", &f_1)?;
7622    let ret = TGetQueryIdResp {
7623      query_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
7624    };
7625    Ok(ret)
7626  }
7627  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7628    let struct_ident = TStructIdentifier::new("TGetQueryIdResp");
7629    o_prot.write_struct_begin(&struct_ident)?;
7630    o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::String, 1))?;
7631    o_prot.write_string(&self.query_id)?;
7632    o_prot.write_field_end()?;
7633    o_prot.write_field_stop()?;
7634    o_prot.write_struct_end()
7635  }
7636}
7637
7638pub struct ConstPRIMITIVETYPES;
7639impl ConstPRIMITIVETYPES {
7640  pub fn const_value() -> BTreeSet<TTypeId> {
7641    BTreeSet::from([
7642      {
7643        TTypeId::try_from(0).expect("expecting valid const value")
7644      },
7645      {
7646        TTypeId::try_from(1).expect("expecting valid const value")
7647      },
7648      {
7649        TTypeId::try_from(2).expect("expecting valid const value")
7650      },
7651      {
7652        TTypeId::try_from(3).expect("expecting valid const value")
7653      },
7654      {
7655        TTypeId::try_from(4).expect("expecting valid const value")
7656      },
7657      {
7658        TTypeId::try_from(5).expect("expecting valid const value")
7659      },
7660      {
7661        TTypeId::try_from(6).expect("expecting valid const value")
7662      },
7663      {
7664        TTypeId::try_from(7).expect("expecting valid const value")
7665      },
7666      {
7667        TTypeId::try_from(8).expect("expecting valid const value")
7668      },
7669      {
7670        TTypeId::try_from(9).expect("expecting valid const value")
7671      },
7672      {
7673        TTypeId::try_from(15).expect("expecting valid const value")
7674      },
7675      {
7676        TTypeId::try_from(16).expect("expecting valid const value")
7677      },
7678      {
7679        TTypeId::try_from(17).expect("expecting valid const value")
7680      },
7681      {
7682        TTypeId::try_from(18).expect("expecting valid const value")
7683      },
7684      {
7685        TTypeId::try_from(19).expect("expecting valid const value")
7686      },
7687      {
7688        TTypeId::try_from(20).expect("expecting valid const value")
7689      },
7690      {
7691        TTypeId::try_from(21).expect("expecting valid const value")
7692      },
7693      {
7694        TTypeId::try_from(22).expect("expecting valid const value")
7695      },
7696    ])
7697  }
7698}
7699
7700pub struct ConstCOMPLEXTYPES;
7701impl ConstCOMPLEXTYPES {
7702  pub fn const_value() -> BTreeSet<TTypeId> {
7703    BTreeSet::from([
7704      {
7705        TTypeId::try_from(10).expect("expecting valid const value")
7706      },
7707      {
7708        TTypeId::try_from(11).expect("expecting valid const value")
7709      },
7710      {
7711        TTypeId::try_from(12).expect("expecting valid const value")
7712      },
7713      {
7714        TTypeId::try_from(13).expect("expecting valid const value")
7715      },
7716      {
7717        TTypeId::try_from(14).expect("expecting valid const value")
7718      },
7719    ])
7720  }
7721}
7722
7723pub struct ConstCOLLECTIONTYPES;
7724impl ConstCOLLECTIONTYPES {
7725  pub fn const_value() -> BTreeSet<TTypeId> {
7726    BTreeSet::from([
7727      {
7728        TTypeId::try_from(10).expect("expecting valid const value")
7729      },
7730      {
7731        TTypeId::try_from(11).expect("expecting valid const value")
7732      },
7733    ])
7734  }
7735}
7736
7737pub struct ConstTYPENAMES;
7738impl ConstTYPENAMES {
7739  pub fn const_value() -> BTreeMap<TTypeId, String> {
7740    BTreeMap::from([
7741      (
7742        {
7743          TTypeId::try_from(10).expect("expecting valid const value")
7744        },
7745        "ARRAY".to_owned(),
7746      ),
7747      (
7748        {
7749          TTypeId::try_from(4).expect("expecting valid const value")
7750        },
7751        "BIGINT".to_owned(),
7752      ),
7753      (
7754        {
7755          TTypeId::try_from(9).expect("expecting valid const value")
7756        },
7757        "BINARY".to_owned(),
7758      ),
7759      (
7760        {
7761          TTypeId::try_from(0).expect("expecting valid const value")
7762        },
7763        "BOOLEAN".to_owned(),
7764      ),
7765      (
7766        {
7767          TTypeId::try_from(19).expect("expecting valid const value")
7768        },
7769        "CHAR".to_owned(),
7770      ),
7771      (
7772        {
7773          TTypeId::try_from(17).expect("expecting valid const value")
7774        },
7775        "DATE".to_owned(),
7776      ),
7777      (
7778        {
7779          TTypeId::try_from(15).expect("expecting valid const value")
7780        },
7781        "DECIMAL".to_owned(),
7782      ),
7783      (
7784        {
7785          TTypeId::try_from(6).expect("expecting valid const value")
7786        },
7787        "DOUBLE".to_owned(),
7788      ),
7789      (
7790        {
7791          TTypeId::try_from(5).expect("expecting valid const value")
7792        },
7793        "FLOAT".to_owned(),
7794      ),
7795      (
7796        {
7797          TTypeId::try_from(21).expect("expecting valid const value")
7798        },
7799        "INTERVAL_DAY_TIME".to_owned(),
7800      ),
7801      (
7802        {
7803          TTypeId::try_from(20).expect("expecting valid const value")
7804        },
7805        "INTERVAL_YEAR_MONTH".to_owned(),
7806      ),
7807      (
7808        {
7809          TTypeId::try_from(3).expect("expecting valid const value")
7810        },
7811        "INT".to_owned(),
7812      ),
7813      (
7814        {
7815          TTypeId::try_from(11).expect("expecting valid const value")
7816        },
7817        "MAP".to_owned(),
7818      ),
7819      (
7820        {
7821          TTypeId::try_from(16).expect("expecting valid const value")
7822        },
7823        "NULL".to_owned(),
7824      ),
7825      (
7826        {
7827          TTypeId::try_from(2).expect("expecting valid const value")
7828        },
7829        "SMALLINT".to_owned(),
7830      ),
7831      (
7832        {
7833          TTypeId::try_from(7).expect("expecting valid const value")
7834        },
7835        "STRING".to_owned(),
7836      ),
7837      (
7838        {
7839          TTypeId::try_from(12).expect("expecting valid const value")
7840        },
7841        "STRUCT".to_owned(),
7842      ),
7843      (
7844        {
7845          TTypeId::try_from(22).expect("expecting valid const value")
7846        },
7847        "TIMESTAMP WITH LOCAL TIME ZONE".to_owned(),
7848      ),
7849      (
7850        {
7851          TTypeId::try_from(8).expect("expecting valid const value")
7852        },
7853        "TIMESTAMP".to_owned(),
7854      ),
7855      (
7856        {
7857          TTypeId::try_from(1).expect("expecting valid const value")
7858        },
7859        "TINYINT".to_owned(),
7860      ),
7861      (
7862        {
7863          TTypeId::try_from(13).expect("expecting valid const value")
7864        },
7865        "UNIONTYPE".to_owned(),
7866      ),
7867      (
7868        {
7869          TTypeId::try_from(18).expect("expecting valid const value")
7870        },
7871        "VARCHAR".to_owned(),
7872      ),
7873    ])
7874  }
7875}
7876
7877pub const CHARACTER_MAXIMUM_LENGTH: &str = "characterMaximumLength";
7878
7879pub const PRECISION: &str = "precision";
7880
7881pub const SCALE: &str = "scale";
7882
7883//
7884// TCLIService service client
7885//
7886
7887pub trait TTCLIServiceSyncClient {
7888  fn open_session(&mut self, req: TOpenSessionReq) -> thrift::Result<TOpenSessionResp>;
7889  fn close_session(&mut self, req: TCloseSessionReq) -> thrift::Result<TCloseSessionResp>;
7890  fn get_info(&mut self, req: TGetInfoReq) -> thrift::Result<TGetInfoResp>;
7891  fn execute_statement(&mut self, req: TExecuteStatementReq) -> thrift::Result<TExecuteStatementResp>;
7892  fn get_type_info(&mut self, req: TGetTypeInfoReq) -> thrift::Result<TGetTypeInfoResp>;
7893  fn get_catalogs(&mut self, req: TGetCatalogsReq) -> thrift::Result<TGetCatalogsResp>;
7894  fn get_schemas(&mut self, req: TGetSchemasReq) -> thrift::Result<TGetSchemasResp>;
7895  fn get_tables(&mut self, req: TGetTablesReq) -> thrift::Result<TGetTablesResp>;
7896  fn get_table_types(&mut self, req: TGetTableTypesReq) -> thrift::Result<TGetTableTypesResp>;
7897  fn get_columns(&mut self, req: TGetColumnsReq) -> thrift::Result<TGetColumnsResp>;
7898  fn get_functions(&mut self, req: TGetFunctionsReq) -> thrift::Result<TGetFunctionsResp>;
7899  fn get_primary_keys(&mut self, req: TGetPrimaryKeysReq) -> thrift::Result<TGetPrimaryKeysResp>;
7900  fn get_cross_reference(&mut self, req: TGetCrossReferenceReq) -> thrift::Result<TGetCrossReferenceResp>;
7901  fn get_operation_status(&mut self, req: TGetOperationStatusReq) -> thrift::Result<TGetOperationStatusResp>;
7902  fn cancel_operation(&mut self, req: TCancelOperationReq) -> thrift::Result<TCancelOperationResp>;
7903  fn close_operation(&mut self, req: TCloseOperationReq) -> thrift::Result<TCloseOperationResp>;
7904  fn get_result_set_metadata(&mut self, req: TGetResultSetMetadataReq) -> thrift::Result<TGetResultSetMetadataResp>;
7905  fn fetch_results(&mut self, req: TFetchResultsReq) -> thrift::Result<TFetchResultsResp>;
7906  fn get_delegation_token(&mut self, req: TGetDelegationTokenReq) -> thrift::Result<TGetDelegationTokenResp>;
7907  fn cancel_delegation_token(&mut self, req: TCancelDelegationTokenReq) -> thrift::Result<TCancelDelegationTokenResp>;
7908  fn renew_delegation_token(&mut self, req: TRenewDelegationTokenReq) -> thrift::Result<TRenewDelegationTokenResp>;
7909  fn get_query_id(&mut self, req: TGetQueryIdReq) -> thrift::Result<TGetQueryIdResp>;
7910  fn set_client_info(&mut self, req: TSetClientInfoReq) -> thrift::Result<TSetClientInfoResp>;
7911  fn upload_data(&mut self, req: TUploadDataReq) -> thrift::Result<TUploadDataResp>;
7912  fn download_data(&mut self, req: TDownloadDataReq) -> thrift::Result<TDownloadDataResp>;
7913}
7914
7915pub trait TTCLIServiceSyncClientMarker {}
7916
7917pub struct TCLIServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {
7918  _i_prot: IP,
7919  _o_prot: OP,
7920  _sequence_number: i32,
7921}
7922
7923impl <IP, OP> TCLIServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {
7924  pub fn new(input_protocol: IP, output_protocol: OP) -> TCLIServiceSyncClient<IP, OP> {
7925    TCLIServiceSyncClient { _i_prot: input_protocol, _o_prot: output_protocol, _sequence_number: 0 }
7926  }
7927}
7928
7929impl <IP, OP> TThriftClient for TCLIServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {
7930  fn i_prot_mut(&mut self) -> &mut dyn TInputProtocol { &mut self._i_prot }
7931  fn o_prot_mut(&mut self) -> &mut dyn TOutputProtocol { &mut self._o_prot }
7932  fn sequence_number(&self) -> i32 { self._sequence_number }
7933  fn increment_sequence_number(&mut self) -> i32 { self._sequence_number += 1; self._sequence_number }
7934}
7935
7936impl <IP, OP> TTCLIServiceSyncClientMarker for TCLIServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {}
7937
7938impl <C: TThriftClient + TTCLIServiceSyncClientMarker> TTCLIServiceSyncClient for C {
7939  fn open_session(&mut self, req: TOpenSessionReq) -> thrift::Result<TOpenSessionResp> {
7940    (
7941      {
7942        self.increment_sequence_number();
7943        let message_ident = TMessageIdentifier::new("OpenSession", TMessageType::Call, self.sequence_number());
7944        let call_args = TCLIServiceOpenSessionArgs { req };
7945        self.o_prot_mut().write_message_begin(&message_ident)?;
7946        call_args.write_to_out_protocol(self.o_prot_mut())?;
7947        self.o_prot_mut().write_message_end()?;
7948        self.o_prot_mut().flush()
7949      }
7950    )?;
7951    {
7952      let message_ident = self.i_prot_mut().read_message_begin()?;
7953      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
7954      verify_expected_service_call("OpenSession", &message_ident.name)?;
7955      if message_ident.message_type == TMessageType::Exception {
7956        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
7957        self.i_prot_mut().read_message_end()?;
7958        return Err(thrift::Error::Application(remote_error))
7959      }
7960      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
7961      let result = TCLIServiceOpenSessionResult::read_from_in_protocol(self.i_prot_mut())?;
7962      self.i_prot_mut().read_message_end()?;
7963      result.ok_or()
7964    }
7965  }
7966  fn close_session(&mut self, req: TCloseSessionReq) -> thrift::Result<TCloseSessionResp> {
7967    (
7968      {
7969        self.increment_sequence_number();
7970        let message_ident = TMessageIdentifier::new("CloseSession", TMessageType::Call, self.sequence_number());
7971        let call_args = TCLIServiceCloseSessionArgs { req };
7972        self.o_prot_mut().write_message_begin(&message_ident)?;
7973        call_args.write_to_out_protocol(self.o_prot_mut())?;
7974        self.o_prot_mut().write_message_end()?;
7975        self.o_prot_mut().flush()
7976      }
7977    )?;
7978    {
7979      let message_ident = self.i_prot_mut().read_message_begin()?;
7980      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
7981      verify_expected_service_call("CloseSession", &message_ident.name)?;
7982      if message_ident.message_type == TMessageType::Exception {
7983        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
7984        self.i_prot_mut().read_message_end()?;
7985        return Err(thrift::Error::Application(remote_error))
7986      }
7987      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
7988      let result = TCLIServiceCloseSessionResult::read_from_in_protocol(self.i_prot_mut())?;
7989      self.i_prot_mut().read_message_end()?;
7990      result.ok_or()
7991    }
7992  }
7993  fn get_info(&mut self, req: TGetInfoReq) -> thrift::Result<TGetInfoResp> {
7994    (
7995      {
7996        self.increment_sequence_number();
7997        let message_ident = TMessageIdentifier::new("GetInfo", TMessageType::Call, self.sequence_number());
7998        let call_args = TCLIServiceGetInfoArgs { req };
7999        self.o_prot_mut().write_message_begin(&message_ident)?;
8000        call_args.write_to_out_protocol(self.o_prot_mut())?;
8001        self.o_prot_mut().write_message_end()?;
8002        self.o_prot_mut().flush()
8003      }
8004    )?;
8005    {
8006      let message_ident = self.i_prot_mut().read_message_begin()?;
8007      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8008      verify_expected_service_call("GetInfo", &message_ident.name)?;
8009      if message_ident.message_type == TMessageType::Exception {
8010        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8011        self.i_prot_mut().read_message_end()?;
8012        return Err(thrift::Error::Application(remote_error))
8013      }
8014      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8015      let result = TCLIServiceGetInfoResult::read_from_in_protocol(self.i_prot_mut())?;
8016      self.i_prot_mut().read_message_end()?;
8017      result.ok_or()
8018    }
8019  }
8020  fn execute_statement(&mut self, req: TExecuteStatementReq) -> thrift::Result<TExecuteStatementResp> {
8021    (
8022      {
8023        self.increment_sequence_number();
8024        let message_ident = TMessageIdentifier::new("ExecuteStatement", TMessageType::Call, self.sequence_number());
8025        let call_args = TCLIServiceExecuteStatementArgs { req };
8026        self.o_prot_mut().write_message_begin(&message_ident)?;
8027        call_args.write_to_out_protocol(self.o_prot_mut())?;
8028        self.o_prot_mut().write_message_end()?;
8029        self.o_prot_mut().flush()
8030      }
8031    )?;
8032    {
8033      let message_ident = self.i_prot_mut().read_message_begin()?;
8034      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8035      verify_expected_service_call("ExecuteStatement", &message_ident.name)?;
8036      if message_ident.message_type == TMessageType::Exception {
8037        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8038        self.i_prot_mut().read_message_end()?;
8039        return Err(thrift::Error::Application(remote_error))
8040      }
8041      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8042      let result = TCLIServiceExecuteStatementResult::read_from_in_protocol(self.i_prot_mut())?;
8043      self.i_prot_mut().read_message_end()?;
8044      result.ok_or()
8045    }
8046  }
8047  fn get_type_info(&mut self, req: TGetTypeInfoReq) -> thrift::Result<TGetTypeInfoResp> {
8048    (
8049      {
8050        self.increment_sequence_number();
8051        let message_ident = TMessageIdentifier::new("GetTypeInfo", TMessageType::Call, self.sequence_number());
8052        let call_args = TCLIServiceGetTypeInfoArgs { req };
8053        self.o_prot_mut().write_message_begin(&message_ident)?;
8054        call_args.write_to_out_protocol(self.o_prot_mut())?;
8055        self.o_prot_mut().write_message_end()?;
8056        self.o_prot_mut().flush()
8057      }
8058    )?;
8059    {
8060      let message_ident = self.i_prot_mut().read_message_begin()?;
8061      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8062      verify_expected_service_call("GetTypeInfo", &message_ident.name)?;
8063      if message_ident.message_type == TMessageType::Exception {
8064        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8065        self.i_prot_mut().read_message_end()?;
8066        return Err(thrift::Error::Application(remote_error))
8067      }
8068      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8069      let result = TCLIServiceGetTypeInfoResult::read_from_in_protocol(self.i_prot_mut())?;
8070      self.i_prot_mut().read_message_end()?;
8071      result.ok_or()
8072    }
8073  }
8074  fn get_catalogs(&mut self, req: TGetCatalogsReq) -> thrift::Result<TGetCatalogsResp> {
8075    (
8076      {
8077        self.increment_sequence_number();
8078        let message_ident = TMessageIdentifier::new("GetCatalogs", TMessageType::Call, self.sequence_number());
8079        let call_args = TCLIServiceGetCatalogsArgs { req };
8080        self.o_prot_mut().write_message_begin(&message_ident)?;
8081        call_args.write_to_out_protocol(self.o_prot_mut())?;
8082        self.o_prot_mut().write_message_end()?;
8083        self.o_prot_mut().flush()
8084      }
8085    )?;
8086    {
8087      let message_ident = self.i_prot_mut().read_message_begin()?;
8088      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8089      verify_expected_service_call("GetCatalogs", &message_ident.name)?;
8090      if message_ident.message_type == TMessageType::Exception {
8091        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8092        self.i_prot_mut().read_message_end()?;
8093        return Err(thrift::Error::Application(remote_error))
8094      }
8095      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8096      let result = TCLIServiceGetCatalogsResult::read_from_in_protocol(self.i_prot_mut())?;
8097      self.i_prot_mut().read_message_end()?;
8098      result.ok_or()
8099    }
8100  }
8101  fn get_schemas(&mut self, req: TGetSchemasReq) -> thrift::Result<TGetSchemasResp> {
8102    (
8103      {
8104        self.increment_sequence_number();
8105        let message_ident = TMessageIdentifier::new("GetSchemas", TMessageType::Call, self.sequence_number());
8106        let call_args = TCLIServiceGetSchemasArgs { req };
8107        self.o_prot_mut().write_message_begin(&message_ident)?;
8108        call_args.write_to_out_protocol(self.o_prot_mut())?;
8109        self.o_prot_mut().write_message_end()?;
8110        self.o_prot_mut().flush()
8111      }
8112    )?;
8113    {
8114      let message_ident = self.i_prot_mut().read_message_begin()?;
8115      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8116      verify_expected_service_call("GetSchemas", &message_ident.name)?;
8117      if message_ident.message_type == TMessageType::Exception {
8118        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8119        self.i_prot_mut().read_message_end()?;
8120        return Err(thrift::Error::Application(remote_error))
8121      }
8122      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8123      let result = TCLIServiceGetSchemasResult::read_from_in_protocol(self.i_prot_mut())?;
8124      self.i_prot_mut().read_message_end()?;
8125      result.ok_or()
8126    }
8127  }
8128  fn get_tables(&mut self, req: TGetTablesReq) -> thrift::Result<TGetTablesResp> {
8129    (
8130      {
8131        self.increment_sequence_number();
8132        let message_ident = TMessageIdentifier::new("GetTables", TMessageType::Call, self.sequence_number());
8133        let call_args = TCLIServiceGetTablesArgs { req };
8134        self.o_prot_mut().write_message_begin(&message_ident)?;
8135        call_args.write_to_out_protocol(self.o_prot_mut())?;
8136        self.o_prot_mut().write_message_end()?;
8137        self.o_prot_mut().flush()
8138      }
8139    )?;
8140    {
8141      let message_ident = self.i_prot_mut().read_message_begin()?;
8142      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8143      verify_expected_service_call("GetTables", &message_ident.name)?;
8144      if message_ident.message_type == TMessageType::Exception {
8145        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8146        self.i_prot_mut().read_message_end()?;
8147        return Err(thrift::Error::Application(remote_error))
8148      }
8149      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8150      let result = TCLIServiceGetTablesResult::read_from_in_protocol(self.i_prot_mut())?;
8151      self.i_prot_mut().read_message_end()?;
8152      result.ok_or()
8153    }
8154  }
8155  fn get_table_types(&mut self, req: TGetTableTypesReq) -> thrift::Result<TGetTableTypesResp> {
8156    (
8157      {
8158        self.increment_sequence_number();
8159        let message_ident = TMessageIdentifier::new("GetTableTypes", TMessageType::Call, self.sequence_number());
8160        let call_args = TCLIServiceGetTableTypesArgs { req };
8161        self.o_prot_mut().write_message_begin(&message_ident)?;
8162        call_args.write_to_out_protocol(self.o_prot_mut())?;
8163        self.o_prot_mut().write_message_end()?;
8164        self.o_prot_mut().flush()
8165      }
8166    )?;
8167    {
8168      let message_ident = self.i_prot_mut().read_message_begin()?;
8169      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8170      verify_expected_service_call("GetTableTypes", &message_ident.name)?;
8171      if message_ident.message_type == TMessageType::Exception {
8172        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8173        self.i_prot_mut().read_message_end()?;
8174        return Err(thrift::Error::Application(remote_error))
8175      }
8176      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8177      let result = TCLIServiceGetTableTypesResult::read_from_in_protocol(self.i_prot_mut())?;
8178      self.i_prot_mut().read_message_end()?;
8179      result.ok_or()
8180    }
8181  }
8182  fn get_columns(&mut self, req: TGetColumnsReq) -> thrift::Result<TGetColumnsResp> {
8183    (
8184      {
8185        self.increment_sequence_number();
8186        let message_ident = TMessageIdentifier::new("GetColumns", TMessageType::Call, self.sequence_number());
8187        let call_args = TCLIServiceGetColumnsArgs { req };
8188        self.o_prot_mut().write_message_begin(&message_ident)?;
8189        call_args.write_to_out_protocol(self.o_prot_mut())?;
8190        self.o_prot_mut().write_message_end()?;
8191        self.o_prot_mut().flush()
8192      }
8193    )?;
8194    {
8195      let message_ident = self.i_prot_mut().read_message_begin()?;
8196      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8197      verify_expected_service_call("GetColumns", &message_ident.name)?;
8198      if message_ident.message_type == TMessageType::Exception {
8199        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8200        self.i_prot_mut().read_message_end()?;
8201        return Err(thrift::Error::Application(remote_error))
8202      }
8203      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8204      let result = TCLIServiceGetColumnsResult::read_from_in_protocol(self.i_prot_mut())?;
8205      self.i_prot_mut().read_message_end()?;
8206      result.ok_or()
8207    }
8208  }
8209  fn get_functions(&mut self, req: TGetFunctionsReq) -> thrift::Result<TGetFunctionsResp> {
8210    (
8211      {
8212        self.increment_sequence_number();
8213        let message_ident = TMessageIdentifier::new("GetFunctions", TMessageType::Call, self.sequence_number());
8214        let call_args = TCLIServiceGetFunctionsArgs { req };
8215        self.o_prot_mut().write_message_begin(&message_ident)?;
8216        call_args.write_to_out_protocol(self.o_prot_mut())?;
8217        self.o_prot_mut().write_message_end()?;
8218        self.o_prot_mut().flush()
8219      }
8220    )?;
8221    {
8222      let message_ident = self.i_prot_mut().read_message_begin()?;
8223      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8224      verify_expected_service_call("GetFunctions", &message_ident.name)?;
8225      if message_ident.message_type == TMessageType::Exception {
8226        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8227        self.i_prot_mut().read_message_end()?;
8228        return Err(thrift::Error::Application(remote_error))
8229      }
8230      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8231      let result = TCLIServiceGetFunctionsResult::read_from_in_protocol(self.i_prot_mut())?;
8232      self.i_prot_mut().read_message_end()?;
8233      result.ok_or()
8234    }
8235  }
8236  fn get_primary_keys(&mut self, req: TGetPrimaryKeysReq) -> thrift::Result<TGetPrimaryKeysResp> {
8237    (
8238      {
8239        self.increment_sequence_number();
8240        let message_ident = TMessageIdentifier::new("GetPrimaryKeys", TMessageType::Call, self.sequence_number());
8241        let call_args = TCLIServiceGetPrimaryKeysArgs { req };
8242        self.o_prot_mut().write_message_begin(&message_ident)?;
8243        call_args.write_to_out_protocol(self.o_prot_mut())?;
8244        self.o_prot_mut().write_message_end()?;
8245        self.o_prot_mut().flush()
8246      }
8247    )?;
8248    {
8249      let message_ident = self.i_prot_mut().read_message_begin()?;
8250      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8251      verify_expected_service_call("GetPrimaryKeys", &message_ident.name)?;
8252      if message_ident.message_type == TMessageType::Exception {
8253        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8254        self.i_prot_mut().read_message_end()?;
8255        return Err(thrift::Error::Application(remote_error))
8256      }
8257      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8258      let result = TCLIServiceGetPrimaryKeysResult::read_from_in_protocol(self.i_prot_mut())?;
8259      self.i_prot_mut().read_message_end()?;
8260      result.ok_or()
8261    }
8262  }
8263  fn get_cross_reference(&mut self, req: TGetCrossReferenceReq) -> thrift::Result<TGetCrossReferenceResp> {
8264    (
8265      {
8266        self.increment_sequence_number();
8267        let message_ident = TMessageIdentifier::new("GetCrossReference", TMessageType::Call, self.sequence_number());
8268        let call_args = TCLIServiceGetCrossReferenceArgs { req };
8269        self.o_prot_mut().write_message_begin(&message_ident)?;
8270        call_args.write_to_out_protocol(self.o_prot_mut())?;
8271        self.o_prot_mut().write_message_end()?;
8272        self.o_prot_mut().flush()
8273      }
8274    )?;
8275    {
8276      let message_ident = self.i_prot_mut().read_message_begin()?;
8277      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8278      verify_expected_service_call("GetCrossReference", &message_ident.name)?;
8279      if message_ident.message_type == TMessageType::Exception {
8280        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8281        self.i_prot_mut().read_message_end()?;
8282        return Err(thrift::Error::Application(remote_error))
8283      }
8284      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8285      let result = TCLIServiceGetCrossReferenceResult::read_from_in_protocol(self.i_prot_mut())?;
8286      self.i_prot_mut().read_message_end()?;
8287      result.ok_or()
8288    }
8289  }
8290  fn get_operation_status(&mut self, req: TGetOperationStatusReq) -> thrift::Result<TGetOperationStatusResp> {
8291    (
8292      {
8293        self.increment_sequence_number();
8294        let message_ident = TMessageIdentifier::new("GetOperationStatus", TMessageType::Call, self.sequence_number());
8295        let call_args = TCLIServiceGetOperationStatusArgs { req };
8296        self.o_prot_mut().write_message_begin(&message_ident)?;
8297        call_args.write_to_out_protocol(self.o_prot_mut())?;
8298        self.o_prot_mut().write_message_end()?;
8299        self.o_prot_mut().flush()
8300      }
8301    )?;
8302    {
8303      let message_ident = self.i_prot_mut().read_message_begin()?;
8304      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8305      verify_expected_service_call("GetOperationStatus", &message_ident.name)?;
8306      if message_ident.message_type == TMessageType::Exception {
8307        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8308        self.i_prot_mut().read_message_end()?;
8309        return Err(thrift::Error::Application(remote_error))
8310      }
8311      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8312      let result = TCLIServiceGetOperationStatusResult::read_from_in_protocol(self.i_prot_mut())?;
8313      self.i_prot_mut().read_message_end()?;
8314      result.ok_or()
8315    }
8316  }
8317  fn cancel_operation(&mut self, req: TCancelOperationReq) -> thrift::Result<TCancelOperationResp> {
8318    (
8319      {
8320        self.increment_sequence_number();
8321        let message_ident = TMessageIdentifier::new("CancelOperation", TMessageType::Call, self.sequence_number());
8322        let call_args = TCLIServiceCancelOperationArgs { req };
8323        self.o_prot_mut().write_message_begin(&message_ident)?;
8324        call_args.write_to_out_protocol(self.o_prot_mut())?;
8325        self.o_prot_mut().write_message_end()?;
8326        self.o_prot_mut().flush()
8327      }
8328    )?;
8329    {
8330      let message_ident = self.i_prot_mut().read_message_begin()?;
8331      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8332      verify_expected_service_call("CancelOperation", &message_ident.name)?;
8333      if message_ident.message_type == TMessageType::Exception {
8334        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8335        self.i_prot_mut().read_message_end()?;
8336        return Err(thrift::Error::Application(remote_error))
8337      }
8338      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8339      let result = TCLIServiceCancelOperationResult::read_from_in_protocol(self.i_prot_mut())?;
8340      self.i_prot_mut().read_message_end()?;
8341      result.ok_or()
8342    }
8343  }
8344  fn close_operation(&mut self, req: TCloseOperationReq) -> thrift::Result<TCloseOperationResp> {
8345    (
8346      {
8347        self.increment_sequence_number();
8348        let message_ident = TMessageIdentifier::new("CloseOperation", TMessageType::Call, self.sequence_number());
8349        let call_args = TCLIServiceCloseOperationArgs { req };
8350        self.o_prot_mut().write_message_begin(&message_ident)?;
8351        call_args.write_to_out_protocol(self.o_prot_mut())?;
8352        self.o_prot_mut().write_message_end()?;
8353        self.o_prot_mut().flush()
8354      }
8355    )?;
8356    {
8357      let message_ident = self.i_prot_mut().read_message_begin()?;
8358      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8359      verify_expected_service_call("CloseOperation", &message_ident.name)?;
8360      if message_ident.message_type == TMessageType::Exception {
8361        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8362        self.i_prot_mut().read_message_end()?;
8363        return Err(thrift::Error::Application(remote_error))
8364      }
8365      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8366      let result = TCLIServiceCloseOperationResult::read_from_in_protocol(self.i_prot_mut())?;
8367      self.i_prot_mut().read_message_end()?;
8368      result.ok_or()
8369    }
8370  }
8371  fn get_result_set_metadata(&mut self, req: TGetResultSetMetadataReq) -> thrift::Result<TGetResultSetMetadataResp> {
8372    (
8373      {
8374        self.increment_sequence_number();
8375        let message_ident = TMessageIdentifier::new("GetResultSetMetadata", TMessageType::Call, self.sequence_number());
8376        let call_args = TCLIServiceGetResultSetMetadataArgs { req };
8377        self.o_prot_mut().write_message_begin(&message_ident)?;
8378        call_args.write_to_out_protocol(self.o_prot_mut())?;
8379        self.o_prot_mut().write_message_end()?;
8380        self.o_prot_mut().flush()
8381      }
8382    )?;
8383    {
8384      let message_ident = self.i_prot_mut().read_message_begin()?;
8385      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8386      verify_expected_service_call("GetResultSetMetadata", &message_ident.name)?;
8387      if message_ident.message_type == TMessageType::Exception {
8388        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8389        self.i_prot_mut().read_message_end()?;
8390        return Err(thrift::Error::Application(remote_error))
8391      }
8392      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8393      let result = TCLIServiceGetResultSetMetadataResult::read_from_in_protocol(self.i_prot_mut())?;
8394      self.i_prot_mut().read_message_end()?;
8395      result.ok_or()
8396    }
8397  }
8398  fn fetch_results(&mut self, req: TFetchResultsReq) -> thrift::Result<TFetchResultsResp> {
8399    (
8400      {
8401        self.increment_sequence_number();
8402        let message_ident = TMessageIdentifier::new("FetchResults", TMessageType::Call, self.sequence_number());
8403        let call_args = TCLIServiceFetchResultsArgs { req };
8404        self.o_prot_mut().write_message_begin(&message_ident)?;
8405        call_args.write_to_out_protocol(self.o_prot_mut())?;
8406        self.o_prot_mut().write_message_end()?;
8407        self.o_prot_mut().flush()
8408      }
8409    )?;
8410    {
8411      let message_ident = self.i_prot_mut().read_message_begin()?;
8412      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8413      verify_expected_service_call("FetchResults", &message_ident.name)?;
8414      if message_ident.message_type == TMessageType::Exception {
8415        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8416        self.i_prot_mut().read_message_end()?;
8417        return Err(thrift::Error::Application(remote_error))
8418      }
8419      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8420      let result = TCLIServiceFetchResultsResult::read_from_in_protocol(self.i_prot_mut())?;
8421      self.i_prot_mut().read_message_end()?;
8422      result.ok_or()
8423    }
8424  }
8425  fn get_delegation_token(&mut self, req: TGetDelegationTokenReq) -> thrift::Result<TGetDelegationTokenResp> {
8426    (
8427      {
8428        self.increment_sequence_number();
8429        let message_ident = TMessageIdentifier::new("GetDelegationToken", TMessageType::Call, self.sequence_number());
8430        let call_args = TCLIServiceGetDelegationTokenArgs { req };
8431        self.o_prot_mut().write_message_begin(&message_ident)?;
8432        call_args.write_to_out_protocol(self.o_prot_mut())?;
8433        self.o_prot_mut().write_message_end()?;
8434        self.o_prot_mut().flush()
8435      }
8436    )?;
8437    {
8438      let message_ident = self.i_prot_mut().read_message_begin()?;
8439      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8440      verify_expected_service_call("GetDelegationToken", &message_ident.name)?;
8441      if message_ident.message_type == TMessageType::Exception {
8442        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8443        self.i_prot_mut().read_message_end()?;
8444        return Err(thrift::Error::Application(remote_error))
8445      }
8446      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8447      let result = TCLIServiceGetDelegationTokenResult::read_from_in_protocol(self.i_prot_mut())?;
8448      self.i_prot_mut().read_message_end()?;
8449      result.ok_or()
8450    }
8451  }
8452  fn cancel_delegation_token(&mut self, req: TCancelDelegationTokenReq) -> thrift::Result<TCancelDelegationTokenResp> {
8453    (
8454      {
8455        self.increment_sequence_number();
8456        let message_ident = TMessageIdentifier::new("CancelDelegationToken", TMessageType::Call, self.sequence_number());
8457        let call_args = TCLIServiceCancelDelegationTokenArgs { req };
8458        self.o_prot_mut().write_message_begin(&message_ident)?;
8459        call_args.write_to_out_protocol(self.o_prot_mut())?;
8460        self.o_prot_mut().write_message_end()?;
8461        self.o_prot_mut().flush()
8462      }
8463    )?;
8464    {
8465      let message_ident = self.i_prot_mut().read_message_begin()?;
8466      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8467      verify_expected_service_call("CancelDelegationToken", &message_ident.name)?;
8468      if message_ident.message_type == TMessageType::Exception {
8469        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8470        self.i_prot_mut().read_message_end()?;
8471        return Err(thrift::Error::Application(remote_error))
8472      }
8473      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8474      let result = TCLIServiceCancelDelegationTokenResult::read_from_in_protocol(self.i_prot_mut())?;
8475      self.i_prot_mut().read_message_end()?;
8476      result.ok_or()
8477    }
8478  }
8479  fn renew_delegation_token(&mut self, req: TRenewDelegationTokenReq) -> thrift::Result<TRenewDelegationTokenResp> {
8480    (
8481      {
8482        self.increment_sequence_number();
8483        let message_ident = TMessageIdentifier::new("RenewDelegationToken", TMessageType::Call, self.sequence_number());
8484        let call_args = TCLIServiceRenewDelegationTokenArgs { req };
8485        self.o_prot_mut().write_message_begin(&message_ident)?;
8486        call_args.write_to_out_protocol(self.o_prot_mut())?;
8487        self.o_prot_mut().write_message_end()?;
8488        self.o_prot_mut().flush()
8489      }
8490    )?;
8491    {
8492      let message_ident = self.i_prot_mut().read_message_begin()?;
8493      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8494      verify_expected_service_call("RenewDelegationToken", &message_ident.name)?;
8495      if message_ident.message_type == TMessageType::Exception {
8496        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8497        self.i_prot_mut().read_message_end()?;
8498        return Err(thrift::Error::Application(remote_error))
8499      }
8500      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8501      let result = TCLIServiceRenewDelegationTokenResult::read_from_in_protocol(self.i_prot_mut())?;
8502      self.i_prot_mut().read_message_end()?;
8503      result.ok_or()
8504    }
8505  }
8506  fn get_query_id(&mut self, req: TGetQueryIdReq) -> thrift::Result<TGetQueryIdResp> {
8507    (
8508      {
8509        self.increment_sequence_number();
8510        let message_ident = TMessageIdentifier::new("GetQueryId", TMessageType::Call, self.sequence_number());
8511        let call_args = TCLIServiceGetQueryIdArgs { req };
8512        self.o_prot_mut().write_message_begin(&message_ident)?;
8513        call_args.write_to_out_protocol(self.o_prot_mut())?;
8514        self.o_prot_mut().write_message_end()?;
8515        self.o_prot_mut().flush()
8516      }
8517    )?;
8518    {
8519      let message_ident = self.i_prot_mut().read_message_begin()?;
8520      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8521      verify_expected_service_call("GetQueryId", &message_ident.name)?;
8522      if message_ident.message_type == TMessageType::Exception {
8523        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8524        self.i_prot_mut().read_message_end()?;
8525        return Err(thrift::Error::Application(remote_error))
8526      }
8527      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8528      let result = TCLIServiceGetQueryIdResult::read_from_in_protocol(self.i_prot_mut())?;
8529      self.i_prot_mut().read_message_end()?;
8530      result.ok_or()
8531    }
8532  }
8533  fn set_client_info(&mut self, req: TSetClientInfoReq) -> thrift::Result<TSetClientInfoResp> {
8534    (
8535      {
8536        self.increment_sequence_number();
8537        let message_ident = TMessageIdentifier::new("SetClientInfo", TMessageType::Call, self.sequence_number());
8538        let call_args = TCLIServiceSetClientInfoArgs { req };
8539        self.o_prot_mut().write_message_begin(&message_ident)?;
8540        call_args.write_to_out_protocol(self.o_prot_mut())?;
8541        self.o_prot_mut().write_message_end()?;
8542        self.o_prot_mut().flush()
8543      }
8544    )?;
8545    {
8546      let message_ident = self.i_prot_mut().read_message_begin()?;
8547      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8548      verify_expected_service_call("SetClientInfo", &message_ident.name)?;
8549      if message_ident.message_type == TMessageType::Exception {
8550        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8551        self.i_prot_mut().read_message_end()?;
8552        return Err(thrift::Error::Application(remote_error))
8553      }
8554      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8555      let result = TCLIServiceSetClientInfoResult::read_from_in_protocol(self.i_prot_mut())?;
8556      self.i_prot_mut().read_message_end()?;
8557      result.ok_or()
8558    }
8559  }
8560  fn upload_data(&mut self, req: TUploadDataReq) -> thrift::Result<TUploadDataResp> {
8561    (
8562      {
8563        self.increment_sequence_number();
8564        let message_ident = TMessageIdentifier::new("UploadData", TMessageType::Call, self.sequence_number());
8565        let call_args = TCLIServiceUploadDataArgs { req };
8566        self.o_prot_mut().write_message_begin(&message_ident)?;
8567        call_args.write_to_out_protocol(self.o_prot_mut())?;
8568        self.o_prot_mut().write_message_end()?;
8569        self.o_prot_mut().flush()
8570      }
8571    )?;
8572    {
8573      let message_ident = self.i_prot_mut().read_message_begin()?;
8574      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8575      verify_expected_service_call("UploadData", &message_ident.name)?;
8576      if message_ident.message_type == TMessageType::Exception {
8577        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8578        self.i_prot_mut().read_message_end()?;
8579        return Err(thrift::Error::Application(remote_error))
8580      }
8581      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8582      let result = TCLIServiceUploadDataResult::read_from_in_protocol(self.i_prot_mut())?;
8583      self.i_prot_mut().read_message_end()?;
8584      result.ok_or()
8585    }
8586  }
8587  fn download_data(&mut self, req: TDownloadDataReq) -> thrift::Result<TDownloadDataResp> {
8588    (
8589      {
8590        self.increment_sequence_number();
8591        let message_ident = TMessageIdentifier::new("DownloadData", TMessageType::Call, self.sequence_number());
8592        let call_args = TCLIServiceDownloadDataArgs { req };
8593        self.o_prot_mut().write_message_begin(&message_ident)?;
8594        call_args.write_to_out_protocol(self.o_prot_mut())?;
8595        self.o_prot_mut().write_message_end()?;
8596        self.o_prot_mut().flush()
8597      }
8598    )?;
8599    {
8600      let message_ident = self.i_prot_mut().read_message_begin()?;
8601      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
8602      verify_expected_service_call("DownloadData", &message_ident.name)?;
8603      if message_ident.message_type == TMessageType::Exception {
8604        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
8605        self.i_prot_mut().read_message_end()?;
8606        return Err(thrift::Error::Application(remote_error))
8607      }
8608      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
8609      let result = TCLIServiceDownloadDataResult::read_from_in_protocol(self.i_prot_mut())?;
8610      self.i_prot_mut().read_message_end()?;
8611      result.ok_or()
8612    }
8613  }
8614}
8615
8616//
8617// TCLIService service processor
8618//
8619
8620pub trait TCLIServiceSyncHandler {
8621  fn handle_open_session(&self, req: TOpenSessionReq) -> thrift::Result<TOpenSessionResp>;
8622  fn handle_close_session(&self, req: TCloseSessionReq) -> thrift::Result<TCloseSessionResp>;
8623  fn handle_get_info(&self, req: TGetInfoReq) -> thrift::Result<TGetInfoResp>;
8624  fn handle_execute_statement(&self, req: TExecuteStatementReq) -> thrift::Result<TExecuteStatementResp>;
8625  fn handle_get_type_info(&self, req: TGetTypeInfoReq) -> thrift::Result<TGetTypeInfoResp>;
8626  fn handle_get_catalogs(&self, req: TGetCatalogsReq) -> thrift::Result<TGetCatalogsResp>;
8627  fn handle_get_schemas(&self, req: TGetSchemasReq) -> thrift::Result<TGetSchemasResp>;
8628  fn handle_get_tables(&self, req: TGetTablesReq) -> thrift::Result<TGetTablesResp>;
8629  fn handle_get_table_types(&self, req: TGetTableTypesReq) -> thrift::Result<TGetTableTypesResp>;
8630  fn handle_get_columns(&self, req: TGetColumnsReq) -> thrift::Result<TGetColumnsResp>;
8631  fn handle_get_functions(&self, req: TGetFunctionsReq) -> thrift::Result<TGetFunctionsResp>;
8632  fn handle_get_primary_keys(&self, req: TGetPrimaryKeysReq) -> thrift::Result<TGetPrimaryKeysResp>;
8633  fn handle_get_cross_reference(&self, req: TGetCrossReferenceReq) -> thrift::Result<TGetCrossReferenceResp>;
8634  fn handle_get_operation_status(&self, req: TGetOperationStatusReq) -> thrift::Result<TGetOperationStatusResp>;
8635  fn handle_cancel_operation(&self, req: TCancelOperationReq) -> thrift::Result<TCancelOperationResp>;
8636  fn handle_close_operation(&self, req: TCloseOperationReq) -> thrift::Result<TCloseOperationResp>;
8637  fn handle_get_result_set_metadata(&self, req: TGetResultSetMetadataReq) -> thrift::Result<TGetResultSetMetadataResp>;
8638  fn handle_fetch_results(&self, req: TFetchResultsReq) -> thrift::Result<TFetchResultsResp>;
8639  fn handle_get_delegation_token(&self, req: TGetDelegationTokenReq) -> thrift::Result<TGetDelegationTokenResp>;
8640  fn handle_cancel_delegation_token(&self, req: TCancelDelegationTokenReq) -> thrift::Result<TCancelDelegationTokenResp>;
8641  fn handle_renew_delegation_token(&self, req: TRenewDelegationTokenReq) -> thrift::Result<TRenewDelegationTokenResp>;
8642  fn handle_get_query_id(&self, req: TGetQueryIdReq) -> thrift::Result<TGetQueryIdResp>;
8643  fn handle_set_client_info(&self, req: TSetClientInfoReq) -> thrift::Result<TSetClientInfoResp>;
8644  fn handle_upload_data(&self, req: TUploadDataReq) -> thrift::Result<TUploadDataResp>;
8645  fn handle_download_data(&self, req: TDownloadDataReq) -> thrift::Result<TDownloadDataResp>;
8646}
8647
8648pub struct TCLIServiceSyncProcessor<H: TCLIServiceSyncHandler> {
8649  handler: H,
8650}
8651
8652impl <H: TCLIServiceSyncHandler> TCLIServiceSyncProcessor<H> {
8653  pub fn new(handler: H) -> TCLIServiceSyncProcessor<H> {
8654    TCLIServiceSyncProcessor {
8655      handler,
8656    }
8657  }
8658  fn process_open_session(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8659    TTCLIServiceProcessFunctions::process_open_session(&self.handler, incoming_sequence_number, i_prot, o_prot)
8660  }
8661  fn process_close_session(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8662    TTCLIServiceProcessFunctions::process_close_session(&self.handler, incoming_sequence_number, i_prot, o_prot)
8663  }
8664  fn process_get_info(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8665    TTCLIServiceProcessFunctions::process_get_info(&self.handler, incoming_sequence_number, i_prot, o_prot)
8666  }
8667  fn process_execute_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8668    TTCLIServiceProcessFunctions::process_execute_statement(&self.handler, incoming_sequence_number, i_prot, o_prot)
8669  }
8670  fn process_get_type_info(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8671    TTCLIServiceProcessFunctions::process_get_type_info(&self.handler, incoming_sequence_number, i_prot, o_prot)
8672  }
8673  fn process_get_catalogs(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8674    TTCLIServiceProcessFunctions::process_get_catalogs(&self.handler, incoming_sequence_number, i_prot, o_prot)
8675  }
8676  fn process_get_schemas(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8677    TTCLIServiceProcessFunctions::process_get_schemas(&self.handler, incoming_sequence_number, i_prot, o_prot)
8678  }
8679  fn process_get_tables(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8680    TTCLIServiceProcessFunctions::process_get_tables(&self.handler, incoming_sequence_number, i_prot, o_prot)
8681  }
8682  fn process_get_table_types(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8683    TTCLIServiceProcessFunctions::process_get_table_types(&self.handler, incoming_sequence_number, i_prot, o_prot)
8684  }
8685  fn process_get_columns(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8686    TTCLIServiceProcessFunctions::process_get_columns(&self.handler, incoming_sequence_number, i_prot, o_prot)
8687  }
8688  fn process_get_functions(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8689    TTCLIServiceProcessFunctions::process_get_functions(&self.handler, incoming_sequence_number, i_prot, o_prot)
8690  }
8691  fn process_get_primary_keys(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8692    TTCLIServiceProcessFunctions::process_get_primary_keys(&self.handler, incoming_sequence_number, i_prot, o_prot)
8693  }
8694  fn process_get_cross_reference(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8695    TTCLIServiceProcessFunctions::process_get_cross_reference(&self.handler, incoming_sequence_number, i_prot, o_prot)
8696  }
8697  fn process_get_operation_status(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8698    TTCLIServiceProcessFunctions::process_get_operation_status(&self.handler, incoming_sequence_number, i_prot, o_prot)
8699  }
8700  fn process_cancel_operation(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8701    TTCLIServiceProcessFunctions::process_cancel_operation(&self.handler, incoming_sequence_number, i_prot, o_prot)
8702  }
8703  fn process_close_operation(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8704    TTCLIServiceProcessFunctions::process_close_operation(&self.handler, incoming_sequence_number, i_prot, o_prot)
8705  }
8706  fn process_get_result_set_metadata(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8707    TTCLIServiceProcessFunctions::process_get_result_set_metadata(&self.handler, incoming_sequence_number, i_prot, o_prot)
8708  }
8709  fn process_fetch_results(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8710    TTCLIServiceProcessFunctions::process_fetch_results(&self.handler, incoming_sequence_number, i_prot, o_prot)
8711  }
8712  fn process_get_delegation_token(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8713    TTCLIServiceProcessFunctions::process_get_delegation_token(&self.handler, incoming_sequence_number, i_prot, o_prot)
8714  }
8715  fn process_cancel_delegation_token(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8716    TTCLIServiceProcessFunctions::process_cancel_delegation_token(&self.handler, incoming_sequence_number, i_prot, o_prot)
8717  }
8718  fn process_renew_delegation_token(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8719    TTCLIServiceProcessFunctions::process_renew_delegation_token(&self.handler, incoming_sequence_number, i_prot, o_prot)
8720  }
8721  fn process_get_query_id(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8722    TTCLIServiceProcessFunctions::process_get_query_id(&self.handler, incoming_sequence_number, i_prot, o_prot)
8723  }
8724  fn process_set_client_info(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8725    TTCLIServiceProcessFunctions::process_set_client_info(&self.handler, incoming_sequence_number, i_prot, o_prot)
8726  }
8727  fn process_upload_data(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8728    TTCLIServiceProcessFunctions::process_upload_data(&self.handler, incoming_sequence_number, i_prot, o_prot)
8729  }
8730  fn process_download_data(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8731    TTCLIServiceProcessFunctions::process_download_data(&self.handler, incoming_sequence_number, i_prot, o_prot)
8732  }
8733}
8734
8735pub struct TTCLIServiceProcessFunctions;
8736
8737impl TTCLIServiceProcessFunctions {
8738  pub fn process_open_session<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8739    let args = TCLIServiceOpenSessionArgs::read_from_in_protocol(i_prot)?;
8740    match handler.handle_open_session(args.req) {
8741      Ok(handler_return) => {
8742        let message_ident = TMessageIdentifier::new("OpenSession", TMessageType::Reply, incoming_sequence_number);
8743        o_prot.write_message_begin(&message_ident)?;
8744        let ret = TCLIServiceOpenSessionResult { result_value: Some(handler_return) };
8745        ret.write_to_out_protocol(o_prot)?;
8746        o_prot.write_message_end()?;
8747        o_prot.flush()
8748      },
8749      Err(e) => {
8750        match e {
8751          thrift::Error::Application(app_err) => {
8752            let message_ident = TMessageIdentifier::new("OpenSession", TMessageType::Exception, incoming_sequence_number);
8753            o_prot.write_message_begin(&message_ident)?;
8754            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
8755            o_prot.write_message_end()?;
8756            o_prot.flush()
8757          },
8758          _ => {
8759            let ret_err = {
8760              ApplicationError::new(
8761                ApplicationErrorKind::Unknown,
8762                e.to_string()
8763              )
8764            };
8765            let message_ident = TMessageIdentifier::new("OpenSession", TMessageType::Exception, incoming_sequence_number);
8766            o_prot.write_message_begin(&message_ident)?;
8767            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
8768            o_prot.write_message_end()?;
8769            o_prot.flush()
8770          },
8771        }
8772      },
8773    }
8774  }
8775  pub fn process_close_session<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8776    let args = TCLIServiceCloseSessionArgs::read_from_in_protocol(i_prot)?;
8777    match handler.handle_close_session(args.req) {
8778      Ok(handler_return) => {
8779        let message_ident = TMessageIdentifier::new("CloseSession", TMessageType::Reply, incoming_sequence_number);
8780        o_prot.write_message_begin(&message_ident)?;
8781        let ret = TCLIServiceCloseSessionResult { result_value: Some(handler_return) };
8782        ret.write_to_out_protocol(o_prot)?;
8783        o_prot.write_message_end()?;
8784        o_prot.flush()
8785      },
8786      Err(e) => {
8787        match e {
8788          thrift::Error::Application(app_err) => {
8789            let message_ident = TMessageIdentifier::new("CloseSession", TMessageType::Exception, incoming_sequence_number);
8790            o_prot.write_message_begin(&message_ident)?;
8791            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
8792            o_prot.write_message_end()?;
8793            o_prot.flush()
8794          },
8795          _ => {
8796            let ret_err = {
8797              ApplicationError::new(
8798                ApplicationErrorKind::Unknown,
8799                e.to_string()
8800              )
8801            };
8802            let message_ident = TMessageIdentifier::new("CloseSession", TMessageType::Exception, incoming_sequence_number);
8803            o_prot.write_message_begin(&message_ident)?;
8804            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
8805            o_prot.write_message_end()?;
8806            o_prot.flush()
8807          },
8808        }
8809      },
8810    }
8811  }
8812  pub fn process_get_info<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8813    let args = TCLIServiceGetInfoArgs::read_from_in_protocol(i_prot)?;
8814    match handler.handle_get_info(args.req) {
8815      Ok(handler_return) => {
8816        let message_ident = TMessageIdentifier::new("GetInfo", TMessageType::Reply, incoming_sequence_number);
8817        o_prot.write_message_begin(&message_ident)?;
8818        let ret = TCLIServiceGetInfoResult { result_value: Some(handler_return) };
8819        ret.write_to_out_protocol(o_prot)?;
8820        o_prot.write_message_end()?;
8821        o_prot.flush()
8822      },
8823      Err(e) => {
8824        match e {
8825          thrift::Error::Application(app_err) => {
8826            let message_ident = TMessageIdentifier::new("GetInfo", TMessageType::Exception, incoming_sequence_number);
8827            o_prot.write_message_begin(&message_ident)?;
8828            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
8829            o_prot.write_message_end()?;
8830            o_prot.flush()
8831          },
8832          _ => {
8833            let ret_err = {
8834              ApplicationError::new(
8835                ApplicationErrorKind::Unknown,
8836                e.to_string()
8837              )
8838            };
8839            let message_ident = TMessageIdentifier::new("GetInfo", TMessageType::Exception, incoming_sequence_number);
8840            o_prot.write_message_begin(&message_ident)?;
8841            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
8842            o_prot.write_message_end()?;
8843            o_prot.flush()
8844          },
8845        }
8846      },
8847    }
8848  }
8849  pub fn process_execute_statement<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8850    let args = TCLIServiceExecuteStatementArgs::read_from_in_protocol(i_prot)?;
8851    match handler.handle_execute_statement(args.req) {
8852      Ok(handler_return) => {
8853        let message_ident = TMessageIdentifier::new("ExecuteStatement", TMessageType::Reply, incoming_sequence_number);
8854        o_prot.write_message_begin(&message_ident)?;
8855        let ret = TCLIServiceExecuteStatementResult { result_value: Some(handler_return) };
8856        ret.write_to_out_protocol(o_prot)?;
8857        o_prot.write_message_end()?;
8858        o_prot.flush()
8859      },
8860      Err(e) => {
8861        match e {
8862          thrift::Error::Application(app_err) => {
8863            let message_ident = TMessageIdentifier::new("ExecuteStatement", TMessageType::Exception, incoming_sequence_number);
8864            o_prot.write_message_begin(&message_ident)?;
8865            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
8866            o_prot.write_message_end()?;
8867            o_prot.flush()
8868          },
8869          _ => {
8870            let ret_err = {
8871              ApplicationError::new(
8872                ApplicationErrorKind::Unknown,
8873                e.to_string()
8874              )
8875            };
8876            let message_ident = TMessageIdentifier::new("ExecuteStatement", TMessageType::Exception, incoming_sequence_number);
8877            o_prot.write_message_begin(&message_ident)?;
8878            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
8879            o_prot.write_message_end()?;
8880            o_prot.flush()
8881          },
8882        }
8883      },
8884    }
8885  }
8886  pub fn process_get_type_info<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8887    let args = TCLIServiceGetTypeInfoArgs::read_from_in_protocol(i_prot)?;
8888    match handler.handle_get_type_info(args.req) {
8889      Ok(handler_return) => {
8890        let message_ident = TMessageIdentifier::new("GetTypeInfo", TMessageType::Reply, incoming_sequence_number);
8891        o_prot.write_message_begin(&message_ident)?;
8892        let ret = TCLIServiceGetTypeInfoResult { result_value: Some(handler_return) };
8893        ret.write_to_out_protocol(o_prot)?;
8894        o_prot.write_message_end()?;
8895        o_prot.flush()
8896      },
8897      Err(e) => {
8898        match e {
8899          thrift::Error::Application(app_err) => {
8900            let message_ident = TMessageIdentifier::new("GetTypeInfo", TMessageType::Exception, incoming_sequence_number);
8901            o_prot.write_message_begin(&message_ident)?;
8902            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
8903            o_prot.write_message_end()?;
8904            o_prot.flush()
8905          },
8906          _ => {
8907            let ret_err = {
8908              ApplicationError::new(
8909                ApplicationErrorKind::Unknown,
8910                e.to_string()
8911              )
8912            };
8913            let message_ident = TMessageIdentifier::new("GetTypeInfo", TMessageType::Exception, incoming_sequence_number);
8914            o_prot.write_message_begin(&message_ident)?;
8915            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
8916            o_prot.write_message_end()?;
8917            o_prot.flush()
8918          },
8919        }
8920      },
8921    }
8922  }
8923  pub fn process_get_catalogs<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8924    let args = TCLIServiceGetCatalogsArgs::read_from_in_protocol(i_prot)?;
8925    match handler.handle_get_catalogs(args.req) {
8926      Ok(handler_return) => {
8927        let message_ident = TMessageIdentifier::new("GetCatalogs", TMessageType::Reply, incoming_sequence_number);
8928        o_prot.write_message_begin(&message_ident)?;
8929        let ret = TCLIServiceGetCatalogsResult { result_value: Some(handler_return) };
8930        ret.write_to_out_protocol(o_prot)?;
8931        o_prot.write_message_end()?;
8932        o_prot.flush()
8933      },
8934      Err(e) => {
8935        match e {
8936          thrift::Error::Application(app_err) => {
8937            let message_ident = TMessageIdentifier::new("GetCatalogs", TMessageType::Exception, incoming_sequence_number);
8938            o_prot.write_message_begin(&message_ident)?;
8939            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
8940            o_prot.write_message_end()?;
8941            o_prot.flush()
8942          },
8943          _ => {
8944            let ret_err = {
8945              ApplicationError::new(
8946                ApplicationErrorKind::Unknown,
8947                e.to_string()
8948              )
8949            };
8950            let message_ident = TMessageIdentifier::new("GetCatalogs", TMessageType::Exception, incoming_sequence_number);
8951            o_prot.write_message_begin(&message_ident)?;
8952            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
8953            o_prot.write_message_end()?;
8954            o_prot.flush()
8955          },
8956        }
8957      },
8958    }
8959  }
8960  pub fn process_get_schemas<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8961    let args = TCLIServiceGetSchemasArgs::read_from_in_protocol(i_prot)?;
8962    match handler.handle_get_schemas(args.req) {
8963      Ok(handler_return) => {
8964        let message_ident = TMessageIdentifier::new("GetSchemas", TMessageType::Reply, incoming_sequence_number);
8965        o_prot.write_message_begin(&message_ident)?;
8966        let ret = TCLIServiceGetSchemasResult { result_value: Some(handler_return) };
8967        ret.write_to_out_protocol(o_prot)?;
8968        o_prot.write_message_end()?;
8969        o_prot.flush()
8970      },
8971      Err(e) => {
8972        match e {
8973          thrift::Error::Application(app_err) => {
8974            let message_ident = TMessageIdentifier::new("GetSchemas", TMessageType::Exception, incoming_sequence_number);
8975            o_prot.write_message_begin(&message_ident)?;
8976            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
8977            o_prot.write_message_end()?;
8978            o_prot.flush()
8979          },
8980          _ => {
8981            let ret_err = {
8982              ApplicationError::new(
8983                ApplicationErrorKind::Unknown,
8984                e.to_string()
8985              )
8986            };
8987            let message_ident = TMessageIdentifier::new("GetSchemas", TMessageType::Exception, incoming_sequence_number);
8988            o_prot.write_message_begin(&message_ident)?;
8989            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
8990            o_prot.write_message_end()?;
8991            o_prot.flush()
8992          },
8993        }
8994      },
8995    }
8996  }
8997  pub fn process_get_tables<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8998    let args = TCLIServiceGetTablesArgs::read_from_in_protocol(i_prot)?;
8999    match handler.handle_get_tables(args.req) {
9000      Ok(handler_return) => {
9001        let message_ident = TMessageIdentifier::new("GetTables", TMessageType::Reply, incoming_sequence_number);
9002        o_prot.write_message_begin(&message_ident)?;
9003        let ret = TCLIServiceGetTablesResult { result_value: Some(handler_return) };
9004        ret.write_to_out_protocol(o_prot)?;
9005        o_prot.write_message_end()?;
9006        o_prot.flush()
9007      },
9008      Err(e) => {
9009        match e {
9010          thrift::Error::Application(app_err) => {
9011            let message_ident = TMessageIdentifier::new("GetTables", TMessageType::Exception, incoming_sequence_number);
9012            o_prot.write_message_begin(&message_ident)?;
9013            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9014            o_prot.write_message_end()?;
9015            o_prot.flush()
9016          },
9017          _ => {
9018            let ret_err = {
9019              ApplicationError::new(
9020                ApplicationErrorKind::Unknown,
9021                e.to_string()
9022              )
9023            };
9024            let message_ident = TMessageIdentifier::new("GetTables", TMessageType::Exception, incoming_sequence_number);
9025            o_prot.write_message_begin(&message_ident)?;
9026            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9027            o_prot.write_message_end()?;
9028            o_prot.flush()
9029          },
9030        }
9031      },
9032    }
9033  }
9034  pub fn process_get_table_types<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9035    let args = TCLIServiceGetTableTypesArgs::read_from_in_protocol(i_prot)?;
9036    match handler.handle_get_table_types(args.req) {
9037      Ok(handler_return) => {
9038        let message_ident = TMessageIdentifier::new("GetTableTypes", TMessageType::Reply, incoming_sequence_number);
9039        o_prot.write_message_begin(&message_ident)?;
9040        let ret = TCLIServiceGetTableTypesResult { result_value: Some(handler_return) };
9041        ret.write_to_out_protocol(o_prot)?;
9042        o_prot.write_message_end()?;
9043        o_prot.flush()
9044      },
9045      Err(e) => {
9046        match e {
9047          thrift::Error::Application(app_err) => {
9048            let message_ident = TMessageIdentifier::new("GetTableTypes", TMessageType::Exception, incoming_sequence_number);
9049            o_prot.write_message_begin(&message_ident)?;
9050            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9051            o_prot.write_message_end()?;
9052            o_prot.flush()
9053          },
9054          _ => {
9055            let ret_err = {
9056              ApplicationError::new(
9057                ApplicationErrorKind::Unknown,
9058                e.to_string()
9059              )
9060            };
9061            let message_ident = TMessageIdentifier::new("GetTableTypes", TMessageType::Exception, incoming_sequence_number);
9062            o_prot.write_message_begin(&message_ident)?;
9063            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9064            o_prot.write_message_end()?;
9065            o_prot.flush()
9066          },
9067        }
9068      },
9069    }
9070  }
9071  pub fn process_get_columns<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9072    let args = TCLIServiceGetColumnsArgs::read_from_in_protocol(i_prot)?;
9073    match handler.handle_get_columns(args.req) {
9074      Ok(handler_return) => {
9075        let message_ident = TMessageIdentifier::new("GetColumns", TMessageType::Reply, incoming_sequence_number);
9076        o_prot.write_message_begin(&message_ident)?;
9077        let ret = TCLIServiceGetColumnsResult { result_value: Some(handler_return) };
9078        ret.write_to_out_protocol(o_prot)?;
9079        o_prot.write_message_end()?;
9080        o_prot.flush()
9081      },
9082      Err(e) => {
9083        match e {
9084          thrift::Error::Application(app_err) => {
9085            let message_ident = TMessageIdentifier::new("GetColumns", TMessageType::Exception, incoming_sequence_number);
9086            o_prot.write_message_begin(&message_ident)?;
9087            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9088            o_prot.write_message_end()?;
9089            o_prot.flush()
9090          },
9091          _ => {
9092            let ret_err = {
9093              ApplicationError::new(
9094                ApplicationErrorKind::Unknown,
9095                e.to_string()
9096              )
9097            };
9098            let message_ident = TMessageIdentifier::new("GetColumns", TMessageType::Exception, incoming_sequence_number);
9099            o_prot.write_message_begin(&message_ident)?;
9100            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9101            o_prot.write_message_end()?;
9102            o_prot.flush()
9103          },
9104        }
9105      },
9106    }
9107  }
9108  pub fn process_get_functions<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9109    let args = TCLIServiceGetFunctionsArgs::read_from_in_protocol(i_prot)?;
9110    match handler.handle_get_functions(args.req) {
9111      Ok(handler_return) => {
9112        let message_ident = TMessageIdentifier::new("GetFunctions", TMessageType::Reply, incoming_sequence_number);
9113        o_prot.write_message_begin(&message_ident)?;
9114        let ret = TCLIServiceGetFunctionsResult { result_value: Some(handler_return) };
9115        ret.write_to_out_protocol(o_prot)?;
9116        o_prot.write_message_end()?;
9117        o_prot.flush()
9118      },
9119      Err(e) => {
9120        match e {
9121          thrift::Error::Application(app_err) => {
9122            let message_ident = TMessageIdentifier::new("GetFunctions", TMessageType::Exception, incoming_sequence_number);
9123            o_prot.write_message_begin(&message_ident)?;
9124            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9125            o_prot.write_message_end()?;
9126            o_prot.flush()
9127          },
9128          _ => {
9129            let ret_err = {
9130              ApplicationError::new(
9131                ApplicationErrorKind::Unknown,
9132                e.to_string()
9133              )
9134            };
9135            let message_ident = TMessageIdentifier::new("GetFunctions", TMessageType::Exception, incoming_sequence_number);
9136            o_prot.write_message_begin(&message_ident)?;
9137            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9138            o_prot.write_message_end()?;
9139            o_prot.flush()
9140          },
9141        }
9142      },
9143    }
9144  }
9145  pub fn process_get_primary_keys<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9146    let args = TCLIServiceGetPrimaryKeysArgs::read_from_in_protocol(i_prot)?;
9147    match handler.handle_get_primary_keys(args.req) {
9148      Ok(handler_return) => {
9149        let message_ident = TMessageIdentifier::new("GetPrimaryKeys", TMessageType::Reply, incoming_sequence_number);
9150        o_prot.write_message_begin(&message_ident)?;
9151        let ret = TCLIServiceGetPrimaryKeysResult { result_value: Some(handler_return) };
9152        ret.write_to_out_protocol(o_prot)?;
9153        o_prot.write_message_end()?;
9154        o_prot.flush()
9155      },
9156      Err(e) => {
9157        match e {
9158          thrift::Error::Application(app_err) => {
9159            let message_ident = TMessageIdentifier::new("GetPrimaryKeys", TMessageType::Exception, incoming_sequence_number);
9160            o_prot.write_message_begin(&message_ident)?;
9161            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9162            o_prot.write_message_end()?;
9163            o_prot.flush()
9164          },
9165          _ => {
9166            let ret_err = {
9167              ApplicationError::new(
9168                ApplicationErrorKind::Unknown,
9169                e.to_string()
9170              )
9171            };
9172            let message_ident = TMessageIdentifier::new("GetPrimaryKeys", TMessageType::Exception, incoming_sequence_number);
9173            o_prot.write_message_begin(&message_ident)?;
9174            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9175            o_prot.write_message_end()?;
9176            o_prot.flush()
9177          },
9178        }
9179      },
9180    }
9181  }
9182  pub fn process_get_cross_reference<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9183    let args = TCLIServiceGetCrossReferenceArgs::read_from_in_protocol(i_prot)?;
9184    match handler.handle_get_cross_reference(args.req) {
9185      Ok(handler_return) => {
9186        let message_ident = TMessageIdentifier::new("GetCrossReference", TMessageType::Reply, incoming_sequence_number);
9187        o_prot.write_message_begin(&message_ident)?;
9188        let ret = TCLIServiceGetCrossReferenceResult { result_value: Some(handler_return) };
9189        ret.write_to_out_protocol(o_prot)?;
9190        o_prot.write_message_end()?;
9191        o_prot.flush()
9192      },
9193      Err(e) => {
9194        match e {
9195          thrift::Error::Application(app_err) => {
9196            let message_ident = TMessageIdentifier::new("GetCrossReference", TMessageType::Exception, incoming_sequence_number);
9197            o_prot.write_message_begin(&message_ident)?;
9198            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9199            o_prot.write_message_end()?;
9200            o_prot.flush()
9201          },
9202          _ => {
9203            let ret_err = {
9204              ApplicationError::new(
9205                ApplicationErrorKind::Unknown,
9206                e.to_string()
9207              )
9208            };
9209            let message_ident = TMessageIdentifier::new("GetCrossReference", TMessageType::Exception, incoming_sequence_number);
9210            o_prot.write_message_begin(&message_ident)?;
9211            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9212            o_prot.write_message_end()?;
9213            o_prot.flush()
9214          },
9215        }
9216      },
9217    }
9218  }
9219  pub fn process_get_operation_status<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9220    let args = TCLIServiceGetOperationStatusArgs::read_from_in_protocol(i_prot)?;
9221    match handler.handle_get_operation_status(args.req) {
9222      Ok(handler_return) => {
9223        let message_ident = TMessageIdentifier::new("GetOperationStatus", TMessageType::Reply, incoming_sequence_number);
9224        o_prot.write_message_begin(&message_ident)?;
9225        let ret = TCLIServiceGetOperationStatusResult { result_value: Some(handler_return) };
9226        ret.write_to_out_protocol(o_prot)?;
9227        o_prot.write_message_end()?;
9228        o_prot.flush()
9229      },
9230      Err(e) => {
9231        match e {
9232          thrift::Error::Application(app_err) => {
9233            let message_ident = TMessageIdentifier::new("GetOperationStatus", TMessageType::Exception, incoming_sequence_number);
9234            o_prot.write_message_begin(&message_ident)?;
9235            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9236            o_prot.write_message_end()?;
9237            o_prot.flush()
9238          },
9239          _ => {
9240            let ret_err = {
9241              ApplicationError::new(
9242                ApplicationErrorKind::Unknown,
9243                e.to_string()
9244              )
9245            };
9246            let message_ident = TMessageIdentifier::new("GetOperationStatus", TMessageType::Exception, incoming_sequence_number);
9247            o_prot.write_message_begin(&message_ident)?;
9248            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9249            o_prot.write_message_end()?;
9250            o_prot.flush()
9251          },
9252        }
9253      },
9254    }
9255  }
9256  pub fn process_cancel_operation<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9257    let args = TCLIServiceCancelOperationArgs::read_from_in_protocol(i_prot)?;
9258    match handler.handle_cancel_operation(args.req) {
9259      Ok(handler_return) => {
9260        let message_ident = TMessageIdentifier::new("CancelOperation", TMessageType::Reply, incoming_sequence_number);
9261        o_prot.write_message_begin(&message_ident)?;
9262        let ret = TCLIServiceCancelOperationResult { result_value: Some(handler_return) };
9263        ret.write_to_out_protocol(o_prot)?;
9264        o_prot.write_message_end()?;
9265        o_prot.flush()
9266      },
9267      Err(e) => {
9268        match e {
9269          thrift::Error::Application(app_err) => {
9270            let message_ident = TMessageIdentifier::new("CancelOperation", TMessageType::Exception, incoming_sequence_number);
9271            o_prot.write_message_begin(&message_ident)?;
9272            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9273            o_prot.write_message_end()?;
9274            o_prot.flush()
9275          },
9276          _ => {
9277            let ret_err = {
9278              ApplicationError::new(
9279                ApplicationErrorKind::Unknown,
9280                e.to_string()
9281              )
9282            };
9283            let message_ident = TMessageIdentifier::new("CancelOperation", TMessageType::Exception, incoming_sequence_number);
9284            o_prot.write_message_begin(&message_ident)?;
9285            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9286            o_prot.write_message_end()?;
9287            o_prot.flush()
9288          },
9289        }
9290      },
9291    }
9292  }
9293  pub fn process_close_operation<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9294    let args = TCLIServiceCloseOperationArgs::read_from_in_protocol(i_prot)?;
9295    match handler.handle_close_operation(args.req) {
9296      Ok(handler_return) => {
9297        let message_ident = TMessageIdentifier::new("CloseOperation", TMessageType::Reply, incoming_sequence_number);
9298        o_prot.write_message_begin(&message_ident)?;
9299        let ret = TCLIServiceCloseOperationResult { result_value: Some(handler_return) };
9300        ret.write_to_out_protocol(o_prot)?;
9301        o_prot.write_message_end()?;
9302        o_prot.flush()
9303      },
9304      Err(e) => {
9305        match e {
9306          thrift::Error::Application(app_err) => {
9307            let message_ident = TMessageIdentifier::new("CloseOperation", TMessageType::Exception, incoming_sequence_number);
9308            o_prot.write_message_begin(&message_ident)?;
9309            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9310            o_prot.write_message_end()?;
9311            o_prot.flush()
9312          },
9313          _ => {
9314            let ret_err = {
9315              ApplicationError::new(
9316                ApplicationErrorKind::Unknown,
9317                e.to_string()
9318              )
9319            };
9320            let message_ident = TMessageIdentifier::new("CloseOperation", TMessageType::Exception, incoming_sequence_number);
9321            o_prot.write_message_begin(&message_ident)?;
9322            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9323            o_prot.write_message_end()?;
9324            o_prot.flush()
9325          },
9326        }
9327      },
9328    }
9329  }
9330  pub fn process_get_result_set_metadata<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9331    let args = TCLIServiceGetResultSetMetadataArgs::read_from_in_protocol(i_prot)?;
9332    match handler.handle_get_result_set_metadata(args.req) {
9333      Ok(handler_return) => {
9334        let message_ident = TMessageIdentifier::new("GetResultSetMetadata", TMessageType::Reply, incoming_sequence_number);
9335        o_prot.write_message_begin(&message_ident)?;
9336        let ret = TCLIServiceGetResultSetMetadataResult { result_value: Some(handler_return) };
9337        ret.write_to_out_protocol(o_prot)?;
9338        o_prot.write_message_end()?;
9339        o_prot.flush()
9340      },
9341      Err(e) => {
9342        match e {
9343          thrift::Error::Application(app_err) => {
9344            let message_ident = TMessageIdentifier::new("GetResultSetMetadata", TMessageType::Exception, incoming_sequence_number);
9345            o_prot.write_message_begin(&message_ident)?;
9346            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9347            o_prot.write_message_end()?;
9348            o_prot.flush()
9349          },
9350          _ => {
9351            let ret_err = {
9352              ApplicationError::new(
9353                ApplicationErrorKind::Unknown,
9354                e.to_string()
9355              )
9356            };
9357            let message_ident = TMessageIdentifier::new("GetResultSetMetadata", TMessageType::Exception, incoming_sequence_number);
9358            o_prot.write_message_begin(&message_ident)?;
9359            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9360            o_prot.write_message_end()?;
9361            o_prot.flush()
9362          },
9363        }
9364      },
9365    }
9366  }
9367  pub fn process_fetch_results<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9368    let args = TCLIServiceFetchResultsArgs::read_from_in_protocol(i_prot)?;
9369    match handler.handle_fetch_results(args.req) {
9370      Ok(handler_return) => {
9371        let message_ident = TMessageIdentifier::new("FetchResults", TMessageType::Reply, incoming_sequence_number);
9372        o_prot.write_message_begin(&message_ident)?;
9373        let ret = TCLIServiceFetchResultsResult { result_value: Some(handler_return) };
9374        ret.write_to_out_protocol(o_prot)?;
9375        o_prot.write_message_end()?;
9376        o_prot.flush()
9377      },
9378      Err(e) => {
9379        match e {
9380          thrift::Error::Application(app_err) => {
9381            let message_ident = TMessageIdentifier::new("FetchResults", TMessageType::Exception, incoming_sequence_number);
9382            o_prot.write_message_begin(&message_ident)?;
9383            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9384            o_prot.write_message_end()?;
9385            o_prot.flush()
9386          },
9387          _ => {
9388            let ret_err = {
9389              ApplicationError::new(
9390                ApplicationErrorKind::Unknown,
9391                e.to_string()
9392              )
9393            };
9394            let message_ident = TMessageIdentifier::new("FetchResults", TMessageType::Exception, incoming_sequence_number);
9395            o_prot.write_message_begin(&message_ident)?;
9396            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9397            o_prot.write_message_end()?;
9398            o_prot.flush()
9399          },
9400        }
9401      },
9402    }
9403  }
9404  pub fn process_get_delegation_token<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9405    let args = TCLIServiceGetDelegationTokenArgs::read_from_in_protocol(i_prot)?;
9406    match handler.handle_get_delegation_token(args.req) {
9407      Ok(handler_return) => {
9408        let message_ident = TMessageIdentifier::new("GetDelegationToken", TMessageType::Reply, incoming_sequence_number);
9409        o_prot.write_message_begin(&message_ident)?;
9410        let ret = TCLIServiceGetDelegationTokenResult { result_value: Some(handler_return) };
9411        ret.write_to_out_protocol(o_prot)?;
9412        o_prot.write_message_end()?;
9413        o_prot.flush()
9414      },
9415      Err(e) => {
9416        match e {
9417          thrift::Error::Application(app_err) => {
9418            let message_ident = TMessageIdentifier::new("GetDelegationToken", TMessageType::Exception, incoming_sequence_number);
9419            o_prot.write_message_begin(&message_ident)?;
9420            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9421            o_prot.write_message_end()?;
9422            o_prot.flush()
9423          },
9424          _ => {
9425            let ret_err = {
9426              ApplicationError::new(
9427                ApplicationErrorKind::Unknown,
9428                e.to_string()
9429              )
9430            };
9431            let message_ident = TMessageIdentifier::new("GetDelegationToken", TMessageType::Exception, incoming_sequence_number);
9432            o_prot.write_message_begin(&message_ident)?;
9433            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9434            o_prot.write_message_end()?;
9435            o_prot.flush()
9436          },
9437        }
9438      },
9439    }
9440  }
9441  pub fn process_cancel_delegation_token<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9442    let args = TCLIServiceCancelDelegationTokenArgs::read_from_in_protocol(i_prot)?;
9443    match handler.handle_cancel_delegation_token(args.req) {
9444      Ok(handler_return) => {
9445        let message_ident = TMessageIdentifier::new("CancelDelegationToken", TMessageType::Reply, incoming_sequence_number);
9446        o_prot.write_message_begin(&message_ident)?;
9447        let ret = TCLIServiceCancelDelegationTokenResult { result_value: Some(handler_return) };
9448        ret.write_to_out_protocol(o_prot)?;
9449        o_prot.write_message_end()?;
9450        o_prot.flush()
9451      },
9452      Err(e) => {
9453        match e {
9454          thrift::Error::Application(app_err) => {
9455            let message_ident = TMessageIdentifier::new("CancelDelegationToken", TMessageType::Exception, incoming_sequence_number);
9456            o_prot.write_message_begin(&message_ident)?;
9457            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9458            o_prot.write_message_end()?;
9459            o_prot.flush()
9460          },
9461          _ => {
9462            let ret_err = {
9463              ApplicationError::new(
9464                ApplicationErrorKind::Unknown,
9465                e.to_string()
9466              )
9467            };
9468            let message_ident = TMessageIdentifier::new("CancelDelegationToken", TMessageType::Exception, incoming_sequence_number);
9469            o_prot.write_message_begin(&message_ident)?;
9470            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9471            o_prot.write_message_end()?;
9472            o_prot.flush()
9473          },
9474        }
9475      },
9476    }
9477  }
9478  pub fn process_renew_delegation_token<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9479    let args = TCLIServiceRenewDelegationTokenArgs::read_from_in_protocol(i_prot)?;
9480    match handler.handle_renew_delegation_token(args.req) {
9481      Ok(handler_return) => {
9482        let message_ident = TMessageIdentifier::new("RenewDelegationToken", TMessageType::Reply, incoming_sequence_number);
9483        o_prot.write_message_begin(&message_ident)?;
9484        let ret = TCLIServiceRenewDelegationTokenResult { result_value: Some(handler_return) };
9485        ret.write_to_out_protocol(o_prot)?;
9486        o_prot.write_message_end()?;
9487        o_prot.flush()
9488      },
9489      Err(e) => {
9490        match e {
9491          thrift::Error::Application(app_err) => {
9492            let message_ident = TMessageIdentifier::new("RenewDelegationToken", TMessageType::Exception, incoming_sequence_number);
9493            o_prot.write_message_begin(&message_ident)?;
9494            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9495            o_prot.write_message_end()?;
9496            o_prot.flush()
9497          },
9498          _ => {
9499            let ret_err = {
9500              ApplicationError::new(
9501                ApplicationErrorKind::Unknown,
9502                e.to_string()
9503              )
9504            };
9505            let message_ident = TMessageIdentifier::new("RenewDelegationToken", TMessageType::Exception, incoming_sequence_number);
9506            o_prot.write_message_begin(&message_ident)?;
9507            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9508            o_prot.write_message_end()?;
9509            o_prot.flush()
9510          },
9511        }
9512      },
9513    }
9514  }
9515  pub fn process_get_query_id<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9516    let args = TCLIServiceGetQueryIdArgs::read_from_in_protocol(i_prot)?;
9517    match handler.handle_get_query_id(args.req) {
9518      Ok(handler_return) => {
9519        let message_ident = TMessageIdentifier::new("GetQueryId", TMessageType::Reply, incoming_sequence_number);
9520        o_prot.write_message_begin(&message_ident)?;
9521        let ret = TCLIServiceGetQueryIdResult { result_value: Some(handler_return) };
9522        ret.write_to_out_protocol(o_prot)?;
9523        o_prot.write_message_end()?;
9524        o_prot.flush()
9525      },
9526      Err(e) => {
9527        match e {
9528          thrift::Error::Application(app_err) => {
9529            let message_ident = TMessageIdentifier::new("GetQueryId", TMessageType::Exception, incoming_sequence_number);
9530            o_prot.write_message_begin(&message_ident)?;
9531            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9532            o_prot.write_message_end()?;
9533            o_prot.flush()
9534          },
9535          _ => {
9536            let ret_err = {
9537              ApplicationError::new(
9538                ApplicationErrorKind::Unknown,
9539                e.to_string()
9540              )
9541            };
9542            let message_ident = TMessageIdentifier::new("GetQueryId", TMessageType::Exception, incoming_sequence_number);
9543            o_prot.write_message_begin(&message_ident)?;
9544            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9545            o_prot.write_message_end()?;
9546            o_prot.flush()
9547          },
9548        }
9549      },
9550    }
9551  }
9552  pub fn process_set_client_info<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9553    let args = TCLIServiceSetClientInfoArgs::read_from_in_protocol(i_prot)?;
9554    match handler.handle_set_client_info(args.req) {
9555      Ok(handler_return) => {
9556        let message_ident = TMessageIdentifier::new("SetClientInfo", TMessageType::Reply, incoming_sequence_number);
9557        o_prot.write_message_begin(&message_ident)?;
9558        let ret = TCLIServiceSetClientInfoResult { result_value: Some(handler_return) };
9559        ret.write_to_out_protocol(o_prot)?;
9560        o_prot.write_message_end()?;
9561        o_prot.flush()
9562      },
9563      Err(e) => {
9564        match e {
9565          thrift::Error::Application(app_err) => {
9566            let message_ident = TMessageIdentifier::new("SetClientInfo", TMessageType::Exception, incoming_sequence_number);
9567            o_prot.write_message_begin(&message_ident)?;
9568            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9569            o_prot.write_message_end()?;
9570            o_prot.flush()
9571          },
9572          _ => {
9573            let ret_err = {
9574              ApplicationError::new(
9575                ApplicationErrorKind::Unknown,
9576                e.to_string()
9577              )
9578            };
9579            let message_ident = TMessageIdentifier::new("SetClientInfo", TMessageType::Exception, incoming_sequence_number);
9580            o_prot.write_message_begin(&message_ident)?;
9581            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9582            o_prot.write_message_end()?;
9583            o_prot.flush()
9584          },
9585        }
9586      },
9587    }
9588  }
9589  pub fn process_upload_data<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9590    let args = TCLIServiceUploadDataArgs::read_from_in_protocol(i_prot)?;
9591    match handler.handle_upload_data(args.req) {
9592      Ok(handler_return) => {
9593        let message_ident = TMessageIdentifier::new("UploadData", TMessageType::Reply, incoming_sequence_number);
9594        o_prot.write_message_begin(&message_ident)?;
9595        let ret = TCLIServiceUploadDataResult { result_value: Some(handler_return) };
9596        ret.write_to_out_protocol(o_prot)?;
9597        o_prot.write_message_end()?;
9598        o_prot.flush()
9599      },
9600      Err(e) => {
9601        match e {
9602          thrift::Error::Application(app_err) => {
9603            let message_ident = TMessageIdentifier::new("UploadData", TMessageType::Exception, incoming_sequence_number);
9604            o_prot.write_message_begin(&message_ident)?;
9605            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9606            o_prot.write_message_end()?;
9607            o_prot.flush()
9608          },
9609          _ => {
9610            let ret_err = {
9611              ApplicationError::new(
9612                ApplicationErrorKind::Unknown,
9613                e.to_string()
9614              )
9615            };
9616            let message_ident = TMessageIdentifier::new("UploadData", TMessageType::Exception, incoming_sequence_number);
9617            o_prot.write_message_begin(&message_ident)?;
9618            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9619            o_prot.write_message_end()?;
9620            o_prot.flush()
9621          },
9622        }
9623      },
9624    }
9625  }
9626  pub fn process_download_data<H: TCLIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9627    let args = TCLIServiceDownloadDataArgs::read_from_in_protocol(i_prot)?;
9628    match handler.handle_download_data(args.req) {
9629      Ok(handler_return) => {
9630        let message_ident = TMessageIdentifier::new("DownloadData", TMessageType::Reply, incoming_sequence_number);
9631        o_prot.write_message_begin(&message_ident)?;
9632        let ret = TCLIServiceDownloadDataResult { result_value: Some(handler_return) };
9633        ret.write_to_out_protocol(o_prot)?;
9634        o_prot.write_message_end()?;
9635        o_prot.flush()
9636      },
9637      Err(e) => {
9638        match e {
9639          thrift::Error::Application(app_err) => {
9640            let message_ident = TMessageIdentifier::new("DownloadData", TMessageType::Exception, incoming_sequence_number);
9641            o_prot.write_message_begin(&message_ident)?;
9642            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
9643            o_prot.write_message_end()?;
9644            o_prot.flush()
9645          },
9646          _ => {
9647            let ret_err = {
9648              ApplicationError::new(
9649                ApplicationErrorKind::Unknown,
9650                e.to_string()
9651              )
9652            };
9653            let message_ident = TMessageIdentifier::new("DownloadData", TMessageType::Exception, incoming_sequence_number);
9654            o_prot.write_message_begin(&message_ident)?;
9655            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
9656            o_prot.write_message_end()?;
9657            o_prot.flush()
9658          },
9659        }
9660      },
9661    }
9662  }
9663}
9664
9665impl <H: TCLIServiceSyncHandler> TProcessor for TCLIServiceSyncProcessor<H> {
9666  fn process(&self, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9667    let message_ident = i_prot.read_message_begin()?;
9668    let res = match &*message_ident.name {
9669      "OpenSession" => {
9670        self.process_open_session(message_ident.sequence_number, i_prot, o_prot)
9671      },
9672      "CloseSession" => {
9673        self.process_close_session(message_ident.sequence_number, i_prot, o_prot)
9674      },
9675      "GetInfo" => {
9676        self.process_get_info(message_ident.sequence_number, i_prot, o_prot)
9677      },
9678      "ExecuteStatement" => {
9679        self.process_execute_statement(message_ident.sequence_number, i_prot, o_prot)
9680      },
9681      "GetTypeInfo" => {
9682        self.process_get_type_info(message_ident.sequence_number, i_prot, o_prot)
9683      },
9684      "GetCatalogs" => {
9685        self.process_get_catalogs(message_ident.sequence_number, i_prot, o_prot)
9686      },
9687      "GetSchemas" => {
9688        self.process_get_schemas(message_ident.sequence_number, i_prot, o_prot)
9689      },
9690      "GetTables" => {
9691        self.process_get_tables(message_ident.sequence_number, i_prot, o_prot)
9692      },
9693      "GetTableTypes" => {
9694        self.process_get_table_types(message_ident.sequence_number, i_prot, o_prot)
9695      },
9696      "GetColumns" => {
9697        self.process_get_columns(message_ident.sequence_number, i_prot, o_prot)
9698      },
9699      "GetFunctions" => {
9700        self.process_get_functions(message_ident.sequence_number, i_prot, o_prot)
9701      },
9702      "GetPrimaryKeys" => {
9703        self.process_get_primary_keys(message_ident.sequence_number, i_prot, o_prot)
9704      },
9705      "GetCrossReference" => {
9706        self.process_get_cross_reference(message_ident.sequence_number, i_prot, o_prot)
9707      },
9708      "GetOperationStatus" => {
9709        self.process_get_operation_status(message_ident.sequence_number, i_prot, o_prot)
9710      },
9711      "CancelOperation" => {
9712        self.process_cancel_operation(message_ident.sequence_number, i_prot, o_prot)
9713      },
9714      "CloseOperation" => {
9715        self.process_close_operation(message_ident.sequence_number, i_prot, o_prot)
9716      },
9717      "GetResultSetMetadata" => {
9718        self.process_get_result_set_metadata(message_ident.sequence_number, i_prot, o_prot)
9719      },
9720      "FetchResults" => {
9721        self.process_fetch_results(message_ident.sequence_number, i_prot, o_prot)
9722      },
9723      "GetDelegationToken" => {
9724        self.process_get_delegation_token(message_ident.sequence_number, i_prot, o_prot)
9725      },
9726      "CancelDelegationToken" => {
9727        self.process_cancel_delegation_token(message_ident.sequence_number, i_prot, o_prot)
9728      },
9729      "RenewDelegationToken" => {
9730        self.process_renew_delegation_token(message_ident.sequence_number, i_prot, o_prot)
9731      },
9732      "GetQueryId" => {
9733        self.process_get_query_id(message_ident.sequence_number, i_prot, o_prot)
9734      },
9735      "SetClientInfo" => {
9736        self.process_set_client_info(message_ident.sequence_number, i_prot, o_prot)
9737      },
9738      "UploadData" => {
9739        self.process_upload_data(message_ident.sequence_number, i_prot, o_prot)
9740      },
9741      "DownloadData" => {
9742        self.process_download_data(message_ident.sequence_number, i_prot, o_prot)
9743      },
9744      method => {
9745        Err(
9746          thrift::Error::Application(
9747            ApplicationError::new(
9748              ApplicationErrorKind::UnknownMethod,
9749              format!("unknown method {}", method)
9750            )
9751          )
9752        )
9753      },
9754    };
9755    thrift::server::handle_process_result(&message_ident, res, o_prot)
9756  }
9757}
9758
9759//
9760// TCLIServiceOpenSessionArgs
9761//
9762
9763#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9764struct TCLIServiceOpenSessionArgs {
9765  req: TOpenSessionReq,
9766}
9767
9768impl TCLIServiceOpenSessionArgs {
9769  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceOpenSessionArgs> {
9770    i_prot.read_struct_begin()?;
9771    let mut f_1: Option<TOpenSessionReq> = None;
9772    loop {
9773      let field_ident = i_prot.read_field_begin()?;
9774      if field_ident.field_type == TType::Stop {
9775        break;
9776      }
9777      let field_id = field_id(&field_ident)?;
9778      match field_id {
9779        1 => {
9780          let val = TOpenSessionReq::read_from_in_protocol(i_prot)?;
9781          f_1 = Some(val);
9782        },
9783        _ => {
9784          i_prot.skip(field_ident.field_type)?;
9785        },
9786      };
9787      i_prot.read_field_end()?;
9788    }
9789    i_prot.read_struct_end()?;
9790    verify_required_field_exists("TCLIServiceOpenSessionArgs.req", &f_1)?;
9791    let ret = TCLIServiceOpenSessionArgs {
9792      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9793    };
9794    Ok(ret)
9795  }
9796  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9797    let struct_ident = TStructIdentifier::new("OpenSession_args");
9798    o_prot.write_struct_begin(&struct_ident)?;
9799    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9800    self.req.write_to_out_protocol(o_prot)?;
9801    o_prot.write_field_end()?;
9802    o_prot.write_field_stop()?;
9803    o_prot.write_struct_end()
9804  }
9805}
9806
9807//
9808// TCLIServiceOpenSessionResult
9809//
9810
9811#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9812struct TCLIServiceOpenSessionResult {
9813  result_value: Option<TOpenSessionResp>,
9814}
9815
9816impl TCLIServiceOpenSessionResult {
9817  fn ok_or(self) -> thrift::Result<TOpenSessionResp> {
9818    if self.result_value.is_some() {
9819      Ok(self.result_value.unwrap())
9820    } else {
9821      Err(
9822        thrift::Error::Application(
9823          ApplicationError::new(
9824            ApplicationErrorKind::MissingResult,
9825            "no result received for TCLIServiceOpenSession"
9826          )
9827        )
9828      )
9829    }
9830  }
9831  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceOpenSessionResult> {
9832    i_prot.read_struct_begin()?;
9833    let mut f_0: Option<TOpenSessionResp> = None;
9834    loop {
9835      let field_ident = i_prot.read_field_begin()?;
9836      if field_ident.field_type == TType::Stop {
9837        break;
9838      }
9839      let field_id = field_id(&field_ident)?;
9840      match field_id {
9841        0 => {
9842          let val = TOpenSessionResp::read_from_in_protocol(i_prot)?;
9843          f_0 = Some(val);
9844        },
9845        _ => {
9846          i_prot.skip(field_ident.field_type)?;
9847        },
9848      };
9849      i_prot.read_field_end()?;
9850    }
9851    i_prot.read_struct_end()?;
9852    let ret = TCLIServiceOpenSessionResult {
9853      result_value: f_0,
9854    };
9855    Ok(ret)
9856  }
9857  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9858    let struct_ident = TStructIdentifier::new("TCLIServiceOpenSessionResult");
9859    o_prot.write_struct_begin(&struct_ident)?;
9860    if let Some(ref fld_var) = self.result_value {
9861      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9862      fld_var.write_to_out_protocol(o_prot)?;
9863      o_prot.write_field_end()?
9864    }
9865    o_prot.write_field_stop()?;
9866    o_prot.write_struct_end()
9867  }
9868}
9869
9870//
9871// TCLIServiceCloseSessionArgs
9872//
9873
9874#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9875struct TCLIServiceCloseSessionArgs {
9876  req: TCloseSessionReq,
9877}
9878
9879impl TCLIServiceCloseSessionArgs {
9880  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceCloseSessionArgs> {
9881    i_prot.read_struct_begin()?;
9882    let mut f_1: Option<TCloseSessionReq> = None;
9883    loop {
9884      let field_ident = i_prot.read_field_begin()?;
9885      if field_ident.field_type == TType::Stop {
9886        break;
9887      }
9888      let field_id = field_id(&field_ident)?;
9889      match field_id {
9890        1 => {
9891          let val = TCloseSessionReq::read_from_in_protocol(i_prot)?;
9892          f_1 = Some(val);
9893        },
9894        _ => {
9895          i_prot.skip(field_ident.field_type)?;
9896        },
9897      };
9898      i_prot.read_field_end()?;
9899    }
9900    i_prot.read_struct_end()?;
9901    verify_required_field_exists("TCLIServiceCloseSessionArgs.req", &f_1)?;
9902    let ret = TCLIServiceCloseSessionArgs {
9903      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9904    };
9905    Ok(ret)
9906  }
9907  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9908    let struct_ident = TStructIdentifier::new("CloseSession_args");
9909    o_prot.write_struct_begin(&struct_ident)?;
9910    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9911    self.req.write_to_out_protocol(o_prot)?;
9912    o_prot.write_field_end()?;
9913    o_prot.write_field_stop()?;
9914    o_prot.write_struct_end()
9915  }
9916}
9917
9918//
9919// TCLIServiceCloseSessionResult
9920//
9921
9922#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9923struct TCLIServiceCloseSessionResult {
9924  result_value: Option<TCloseSessionResp>,
9925}
9926
9927impl TCLIServiceCloseSessionResult {
9928  fn ok_or(self) -> thrift::Result<TCloseSessionResp> {
9929    if self.result_value.is_some() {
9930      Ok(self.result_value.unwrap())
9931    } else {
9932      Err(
9933        thrift::Error::Application(
9934          ApplicationError::new(
9935            ApplicationErrorKind::MissingResult,
9936            "no result received for TCLIServiceCloseSession"
9937          )
9938        )
9939      )
9940    }
9941  }
9942  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceCloseSessionResult> {
9943    i_prot.read_struct_begin()?;
9944    let mut f_0: Option<TCloseSessionResp> = None;
9945    loop {
9946      let field_ident = i_prot.read_field_begin()?;
9947      if field_ident.field_type == TType::Stop {
9948        break;
9949      }
9950      let field_id = field_id(&field_ident)?;
9951      match field_id {
9952        0 => {
9953          let val = TCloseSessionResp::read_from_in_protocol(i_prot)?;
9954          f_0 = Some(val);
9955        },
9956        _ => {
9957          i_prot.skip(field_ident.field_type)?;
9958        },
9959      };
9960      i_prot.read_field_end()?;
9961    }
9962    i_prot.read_struct_end()?;
9963    let ret = TCLIServiceCloseSessionResult {
9964      result_value: f_0,
9965    };
9966    Ok(ret)
9967  }
9968  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9969    let struct_ident = TStructIdentifier::new("TCLIServiceCloseSessionResult");
9970    o_prot.write_struct_begin(&struct_ident)?;
9971    if let Some(ref fld_var) = self.result_value {
9972      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9973      fld_var.write_to_out_protocol(o_prot)?;
9974      o_prot.write_field_end()?
9975    }
9976    o_prot.write_field_stop()?;
9977    o_prot.write_struct_end()
9978  }
9979}
9980
9981//
9982// TCLIServiceGetInfoArgs
9983//
9984
9985#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9986struct TCLIServiceGetInfoArgs {
9987  req: TGetInfoReq,
9988}
9989
9990impl TCLIServiceGetInfoArgs {
9991  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetInfoArgs> {
9992    i_prot.read_struct_begin()?;
9993    let mut f_1: Option<TGetInfoReq> = None;
9994    loop {
9995      let field_ident = i_prot.read_field_begin()?;
9996      if field_ident.field_type == TType::Stop {
9997        break;
9998      }
9999      let field_id = field_id(&field_ident)?;
10000      match field_id {
10001        1 => {
10002          let val = TGetInfoReq::read_from_in_protocol(i_prot)?;
10003          f_1 = Some(val);
10004        },
10005        _ => {
10006          i_prot.skip(field_ident.field_type)?;
10007        },
10008      };
10009      i_prot.read_field_end()?;
10010    }
10011    i_prot.read_struct_end()?;
10012    verify_required_field_exists("TCLIServiceGetInfoArgs.req", &f_1)?;
10013    let ret = TCLIServiceGetInfoArgs {
10014      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
10015    };
10016    Ok(ret)
10017  }
10018  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10019    let struct_ident = TStructIdentifier::new("GetInfo_args");
10020    o_prot.write_struct_begin(&struct_ident)?;
10021    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
10022    self.req.write_to_out_protocol(o_prot)?;
10023    o_prot.write_field_end()?;
10024    o_prot.write_field_stop()?;
10025    o_prot.write_struct_end()
10026  }
10027}
10028
10029//
10030// TCLIServiceGetInfoResult
10031//
10032
10033#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10034struct TCLIServiceGetInfoResult {
10035  result_value: Option<TGetInfoResp>,
10036}
10037
10038impl TCLIServiceGetInfoResult {
10039  fn ok_or(self) -> thrift::Result<TGetInfoResp> {
10040    if self.result_value.is_some() {
10041      Ok(self.result_value.unwrap())
10042    } else {
10043      Err(
10044        thrift::Error::Application(
10045          ApplicationError::new(
10046            ApplicationErrorKind::MissingResult,
10047            "no result received for TCLIServiceGetInfo"
10048          )
10049        )
10050      )
10051    }
10052  }
10053  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetInfoResult> {
10054    i_prot.read_struct_begin()?;
10055    let mut f_0: Option<TGetInfoResp> = None;
10056    loop {
10057      let field_ident = i_prot.read_field_begin()?;
10058      if field_ident.field_type == TType::Stop {
10059        break;
10060      }
10061      let field_id = field_id(&field_ident)?;
10062      match field_id {
10063        0 => {
10064          let val = TGetInfoResp::read_from_in_protocol(i_prot)?;
10065          f_0 = Some(val);
10066        },
10067        _ => {
10068          i_prot.skip(field_ident.field_type)?;
10069        },
10070      };
10071      i_prot.read_field_end()?;
10072    }
10073    i_prot.read_struct_end()?;
10074    let ret = TCLIServiceGetInfoResult {
10075      result_value: f_0,
10076    };
10077    Ok(ret)
10078  }
10079  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10080    let struct_ident = TStructIdentifier::new("TCLIServiceGetInfoResult");
10081    o_prot.write_struct_begin(&struct_ident)?;
10082    if let Some(ref fld_var) = self.result_value {
10083      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10084      fld_var.write_to_out_protocol(o_prot)?;
10085      o_prot.write_field_end()?
10086    }
10087    o_prot.write_field_stop()?;
10088    o_prot.write_struct_end()
10089  }
10090}
10091
10092//
10093// TCLIServiceExecuteStatementArgs
10094//
10095
10096#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10097struct TCLIServiceExecuteStatementArgs {
10098  req: TExecuteStatementReq,
10099}
10100
10101impl TCLIServiceExecuteStatementArgs {
10102  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceExecuteStatementArgs> {
10103    i_prot.read_struct_begin()?;
10104    let mut f_1: Option<TExecuteStatementReq> = None;
10105    loop {
10106      let field_ident = i_prot.read_field_begin()?;
10107      if field_ident.field_type == TType::Stop {
10108        break;
10109      }
10110      let field_id = field_id(&field_ident)?;
10111      match field_id {
10112        1 => {
10113          let val = TExecuteStatementReq::read_from_in_protocol(i_prot)?;
10114          f_1 = Some(val);
10115        },
10116        _ => {
10117          i_prot.skip(field_ident.field_type)?;
10118        },
10119      };
10120      i_prot.read_field_end()?;
10121    }
10122    i_prot.read_struct_end()?;
10123    verify_required_field_exists("TCLIServiceExecuteStatementArgs.req", &f_1)?;
10124    let ret = TCLIServiceExecuteStatementArgs {
10125      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
10126    };
10127    Ok(ret)
10128  }
10129  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10130    let struct_ident = TStructIdentifier::new("ExecuteStatement_args");
10131    o_prot.write_struct_begin(&struct_ident)?;
10132    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
10133    self.req.write_to_out_protocol(o_prot)?;
10134    o_prot.write_field_end()?;
10135    o_prot.write_field_stop()?;
10136    o_prot.write_struct_end()
10137  }
10138}
10139
10140//
10141// TCLIServiceExecuteStatementResult
10142//
10143
10144#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10145struct TCLIServiceExecuteStatementResult {
10146  result_value: Option<TExecuteStatementResp>,
10147}
10148
10149impl TCLIServiceExecuteStatementResult {
10150  fn ok_or(self) -> thrift::Result<TExecuteStatementResp> {
10151    if self.result_value.is_some() {
10152      Ok(self.result_value.unwrap())
10153    } else {
10154      Err(
10155        thrift::Error::Application(
10156          ApplicationError::new(
10157            ApplicationErrorKind::MissingResult,
10158            "no result received for TCLIServiceExecuteStatement"
10159          )
10160        )
10161      )
10162    }
10163  }
10164  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceExecuteStatementResult> {
10165    i_prot.read_struct_begin()?;
10166    let mut f_0: Option<TExecuteStatementResp> = None;
10167    loop {
10168      let field_ident = i_prot.read_field_begin()?;
10169      if field_ident.field_type == TType::Stop {
10170        break;
10171      }
10172      let field_id = field_id(&field_ident)?;
10173      match field_id {
10174        0 => {
10175          let val = TExecuteStatementResp::read_from_in_protocol(i_prot)?;
10176          f_0 = Some(val);
10177        },
10178        _ => {
10179          i_prot.skip(field_ident.field_type)?;
10180        },
10181      };
10182      i_prot.read_field_end()?;
10183    }
10184    i_prot.read_struct_end()?;
10185    let ret = TCLIServiceExecuteStatementResult {
10186      result_value: f_0,
10187    };
10188    Ok(ret)
10189  }
10190  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10191    let struct_ident = TStructIdentifier::new("TCLIServiceExecuteStatementResult");
10192    o_prot.write_struct_begin(&struct_ident)?;
10193    if let Some(ref fld_var) = self.result_value {
10194      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10195      fld_var.write_to_out_protocol(o_prot)?;
10196      o_prot.write_field_end()?
10197    }
10198    o_prot.write_field_stop()?;
10199    o_prot.write_struct_end()
10200  }
10201}
10202
10203//
10204// TCLIServiceGetTypeInfoArgs
10205//
10206
10207#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10208struct TCLIServiceGetTypeInfoArgs {
10209  req: TGetTypeInfoReq,
10210}
10211
10212impl TCLIServiceGetTypeInfoArgs {
10213  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetTypeInfoArgs> {
10214    i_prot.read_struct_begin()?;
10215    let mut f_1: Option<TGetTypeInfoReq> = None;
10216    loop {
10217      let field_ident = i_prot.read_field_begin()?;
10218      if field_ident.field_type == TType::Stop {
10219        break;
10220      }
10221      let field_id = field_id(&field_ident)?;
10222      match field_id {
10223        1 => {
10224          let val = TGetTypeInfoReq::read_from_in_protocol(i_prot)?;
10225          f_1 = Some(val);
10226        },
10227        _ => {
10228          i_prot.skip(field_ident.field_type)?;
10229        },
10230      };
10231      i_prot.read_field_end()?;
10232    }
10233    i_prot.read_struct_end()?;
10234    verify_required_field_exists("TCLIServiceGetTypeInfoArgs.req", &f_1)?;
10235    let ret = TCLIServiceGetTypeInfoArgs {
10236      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
10237    };
10238    Ok(ret)
10239  }
10240  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10241    let struct_ident = TStructIdentifier::new("GetTypeInfo_args");
10242    o_prot.write_struct_begin(&struct_ident)?;
10243    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
10244    self.req.write_to_out_protocol(o_prot)?;
10245    o_prot.write_field_end()?;
10246    o_prot.write_field_stop()?;
10247    o_prot.write_struct_end()
10248  }
10249}
10250
10251//
10252// TCLIServiceGetTypeInfoResult
10253//
10254
10255#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10256struct TCLIServiceGetTypeInfoResult {
10257  result_value: Option<TGetTypeInfoResp>,
10258}
10259
10260impl TCLIServiceGetTypeInfoResult {
10261  fn ok_or(self) -> thrift::Result<TGetTypeInfoResp> {
10262    if self.result_value.is_some() {
10263      Ok(self.result_value.unwrap())
10264    } else {
10265      Err(
10266        thrift::Error::Application(
10267          ApplicationError::new(
10268            ApplicationErrorKind::MissingResult,
10269            "no result received for TCLIServiceGetTypeInfo"
10270          )
10271        )
10272      )
10273    }
10274  }
10275  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetTypeInfoResult> {
10276    i_prot.read_struct_begin()?;
10277    let mut f_0: Option<TGetTypeInfoResp> = None;
10278    loop {
10279      let field_ident = i_prot.read_field_begin()?;
10280      if field_ident.field_type == TType::Stop {
10281        break;
10282      }
10283      let field_id = field_id(&field_ident)?;
10284      match field_id {
10285        0 => {
10286          let val = TGetTypeInfoResp::read_from_in_protocol(i_prot)?;
10287          f_0 = Some(val);
10288        },
10289        _ => {
10290          i_prot.skip(field_ident.field_type)?;
10291        },
10292      };
10293      i_prot.read_field_end()?;
10294    }
10295    i_prot.read_struct_end()?;
10296    let ret = TCLIServiceGetTypeInfoResult {
10297      result_value: f_0,
10298    };
10299    Ok(ret)
10300  }
10301  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10302    let struct_ident = TStructIdentifier::new("TCLIServiceGetTypeInfoResult");
10303    o_prot.write_struct_begin(&struct_ident)?;
10304    if let Some(ref fld_var) = self.result_value {
10305      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10306      fld_var.write_to_out_protocol(o_prot)?;
10307      o_prot.write_field_end()?
10308    }
10309    o_prot.write_field_stop()?;
10310    o_prot.write_struct_end()
10311  }
10312}
10313
10314//
10315// TCLIServiceGetCatalogsArgs
10316//
10317
10318#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10319struct TCLIServiceGetCatalogsArgs {
10320  req: TGetCatalogsReq,
10321}
10322
10323impl TCLIServiceGetCatalogsArgs {
10324  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetCatalogsArgs> {
10325    i_prot.read_struct_begin()?;
10326    let mut f_1: Option<TGetCatalogsReq> = None;
10327    loop {
10328      let field_ident = i_prot.read_field_begin()?;
10329      if field_ident.field_type == TType::Stop {
10330        break;
10331      }
10332      let field_id = field_id(&field_ident)?;
10333      match field_id {
10334        1 => {
10335          let val = TGetCatalogsReq::read_from_in_protocol(i_prot)?;
10336          f_1 = Some(val);
10337        },
10338        _ => {
10339          i_prot.skip(field_ident.field_type)?;
10340        },
10341      };
10342      i_prot.read_field_end()?;
10343    }
10344    i_prot.read_struct_end()?;
10345    verify_required_field_exists("TCLIServiceGetCatalogsArgs.req", &f_1)?;
10346    let ret = TCLIServiceGetCatalogsArgs {
10347      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
10348    };
10349    Ok(ret)
10350  }
10351  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10352    let struct_ident = TStructIdentifier::new("GetCatalogs_args");
10353    o_prot.write_struct_begin(&struct_ident)?;
10354    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
10355    self.req.write_to_out_protocol(o_prot)?;
10356    o_prot.write_field_end()?;
10357    o_prot.write_field_stop()?;
10358    o_prot.write_struct_end()
10359  }
10360}
10361
10362//
10363// TCLIServiceGetCatalogsResult
10364//
10365
10366#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10367struct TCLIServiceGetCatalogsResult {
10368  result_value: Option<TGetCatalogsResp>,
10369}
10370
10371impl TCLIServiceGetCatalogsResult {
10372  fn ok_or(self) -> thrift::Result<TGetCatalogsResp> {
10373    if self.result_value.is_some() {
10374      Ok(self.result_value.unwrap())
10375    } else {
10376      Err(
10377        thrift::Error::Application(
10378          ApplicationError::new(
10379            ApplicationErrorKind::MissingResult,
10380            "no result received for TCLIServiceGetCatalogs"
10381          )
10382        )
10383      )
10384    }
10385  }
10386  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetCatalogsResult> {
10387    i_prot.read_struct_begin()?;
10388    let mut f_0: Option<TGetCatalogsResp> = None;
10389    loop {
10390      let field_ident = i_prot.read_field_begin()?;
10391      if field_ident.field_type == TType::Stop {
10392        break;
10393      }
10394      let field_id = field_id(&field_ident)?;
10395      match field_id {
10396        0 => {
10397          let val = TGetCatalogsResp::read_from_in_protocol(i_prot)?;
10398          f_0 = Some(val);
10399        },
10400        _ => {
10401          i_prot.skip(field_ident.field_type)?;
10402        },
10403      };
10404      i_prot.read_field_end()?;
10405    }
10406    i_prot.read_struct_end()?;
10407    let ret = TCLIServiceGetCatalogsResult {
10408      result_value: f_0,
10409    };
10410    Ok(ret)
10411  }
10412  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10413    let struct_ident = TStructIdentifier::new("TCLIServiceGetCatalogsResult");
10414    o_prot.write_struct_begin(&struct_ident)?;
10415    if let Some(ref fld_var) = self.result_value {
10416      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10417      fld_var.write_to_out_protocol(o_prot)?;
10418      o_prot.write_field_end()?
10419    }
10420    o_prot.write_field_stop()?;
10421    o_prot.write_struct_end()
10422  }
10423}
10424
10425//
10426// TCLIServiceGetSchemasArgs
10427//
10428
10429#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10430struct TCLIServiceGetSchemasArgs {
10431  req: TGetSchemasReq,
10432}
10433
10434impl TCLIServiceGetSchemasArgs {
10435  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetSchemasArgs> {
10436    i_prot.read_struct_begin()?;
10437    let mut f_1: Option<TGetSchemasReq> = None;
10438    loop {
10439      let field_ident = i_prot.read_field_begin()?;
10440      if field_ident.field_type == TType::Stop {
10441        break;
10442      }
10443      let field_id = field_id(&field_ident)?;
10444      match field_id {
10445        1 => {
10446          let val = TGetSchemasReq::read_from_in_protocol(i_prot)?;
10447          f_1 = Some(val);
10448        },
10449        _ => {
10450          i_prot.skip(field_ident.field_type)?;
10451        },
10452      };
10453      i_prot.read_field_end()?;
10454    }
10455    i_prot.read_struct_end()?;
10456    verify_required_field_exists("TCLIServiceGetSchemasArgs.req", &f_1)?;
10457    let ret = TCLIServiceGetSchemasArgs {
10458      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
10459    };
10460    Ok(ret)
10461  }
10462  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10463    let struct_ident = TStructIdentifier::new("GetSchemas_args");
10464    o_prot.write_struct_begin(&struct_ident)?;
10465    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
10466    self.req.write_to_out_protocol(o_prot)?;
10467    o_prot.write_field_end()?;
10468    o_prot.write_field_stop()?;
10469    o_prot.write_struct_end()
10470  }
10471}
10472
10473//
10474// TCLIServiceGetSchemasResult
10475//
10476
10477#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10478struct TCLIServiceGetSchemasResult {
10479  result_value: Option<TGetSchemasResp>,
10480}
10481
10482impl TCLIServiceGetSchemasResult {
10483  fn ok_or(self) -> thrift::Result<TGetSchemasResp> {
10484    if self.result_value.is_some() {
10485      Ok(self.result_value.unwrap())
10486    } else {
10487      Err(
10488        thrift::Error::Application(
10489          ApplicationError::new(
10490            ApplicationErrorKind::MissingResult,
10491            "no result received for TCLIServiceGetSchemas"
10492          )
10493        )
10494      )
10495    }
10496  }
10497  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetSchemasResult> {
10498    i_prot.read_struct_begin()?;
10499    let mut f_0: Option<TGetSchemasResp> = None;
10500    loop {
10501      let field_ident = i_prot.read_field_begin()?;
10502      if field_ident.field_type == TType::Stop {
10503        break;
10504      }
10505      let field_id = field_id(&field_ident)?;
10506      match field_id {
10507        0 => {
10508          let val = TGetSchemasResp::read_from_in_protocol(i_prot)?;
10509          f_0 = Some(val);
10510        },
10511        _ => {
10512          i_prot.skip(field_ident.field_type)?;
10513        },
10514      };
10515      i_prot.read_field_end()?;
10516    }
10517    i_prot.read_struct_end()?;
10518    let ret = TCLIServiceGetSchemasResult {
10519      result_value: f_0,
10520    };
10521    Ok(ret)
10522  }
10523  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10524    let struct_ident = TStructIdentifier::new("TCLIServiceGetSchemasResult");
10525    o_prot.write_struct_begin(&struct_ident)?;
10526    if let Some(ref fld_var) = self.result_value {
10527      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10528      fld_var.write_to_out_protocol(o_prot)?;
10529      o_prot.write_field_end()?
10530    }
10531    o_prot.write_field_stop()?;
10532    o_prot.write_struct_end()
10533  }
10534}
10535
10536//
10537// TCLIServiceGetTablesArgs
10538//
10539
10540#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10541struct TCLIServiceGetTablesArgs {
10542  req: TGetTablesReq,
10543}
10544
10545impl TCLIServiceGetTablesArgs {
10546  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetTablesArgs> {
10547    i_prot.read_struct_begin()?;
10548    let mut f_1: Option<TGetTablesReq> = None;
10549    loop {
10550      let field_ident = i_prot.read_field_begin()?;
10551      if field_ident.field_type == TType::Stop {
10552        break;
10553      }
10554      let field_id = field_id(&field_ident)?;
10555      match field_id {
10556        1 => {
10557          let val = TGetTablesReq::read_from_in_protocol(i_prot)?;
10558          f_1 = Some(val);
10559        },
10560        _ => {
10561          i_prot.skip(field_ident.field_type)?;
10562        },
10563      };
10564      i_prot.read_field_end()?;
10565    }
10566    i_prot.read_struct_end()?;
10567    verify_required_field_exists("TCLIServiceGetTablesArgs.req", &f_1)?;
10568    let ret = TCLIServiceGetTablesArgs {
10569      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
10570    };
10571    Ok(ret)
10572  }
10573  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10574    let struct_ident = TStructIdentifier::new("GetTables_args");
10575    o_prot.write_struct_begin(&struct_ident)?;
10576    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
10577    self.req.write_to_out_protocol(o_prot)?;
10578    o_prot.write_field_end()?;
10579    o_prot.write_field_stop()?;
10580    o_prot.write_struct_end()
10581  }
10582}
10583
10584//
10585// TCLIServiceGetTablesResult
10586//
10587
10588#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10589struct TCLIServiceGetTablesResult {
10590  result_value: Option<TGetTablesResp>,
10591}
10592
10593impl TCLIServiceGetTablesResult {
10594  fn ok_or(self) -> thrift::Result<TGetTablesResp> {
10595    if self.result_value.is_some() {
10596      Ok(self.result_value.unwrap())
10597    } else {
10598      Err(
10599        thrift::Error::Application(
10600          ApplicationError::new(
10601            ApplicationErrorKind::MissingResult,
10602            "no result received for TCLIServiceGetTables"
10603          )
10604        )
10605      )
10606    }
10607  }
10608  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetTablesResult> {
10609    i_prot.read_struct_begin()?;
10610    let mut f_0: Option<TGetTablesResp> = None;
10611    loop {
10612      let field_ident = i_prot.read_field_begin()?;
10613      if field_ident.field_type == TType::Stop {
10614        break;
10615      }
10616      let field_id = field_id(&field_ident)?;
10617      match field_id {
10618        0 => {
10619          let val = TGetTablesResp::read_from_in_protocol(i_prot)?;
10620          f_0 = Some(val);
10621        },
10622        _ => {
10623          i_prot.skip(field_ident.field_type)?;
10624        },
10625      };
10626      i_prot.read_field_end()?;
10627    }
10628    i_prot.read_struct_end()?;
10629    let ret = TCLIServiceGetTablesResult {
10630      result_value: f_0,
10631    };
10632    Ok(ret)
10633  }
10634  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10635    let struct_ident = TStructIdentifier::new("TCLIServiceGetTablesResult");
10636    o_prot.write_struct_begin(&struct_ident)?;
10637    if let Some(ref fld_var) = self.result_value {
10638      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10639      fld_var.write_to_out_protocol(o_prot)?;
10640      o_prot.write_field_end()?
10641    }
10642    o_prot.write_field_stop()?;
10643    o_prot.write_struct_end()
10644  }
10645}
10646
10647//
10648// TCLIServiceGetTableTypesArgs
10649//
10650
10651#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10652struct TCLIServiceGetTableTypesArgs {
10653  req: TGetTableTypesReq,
10654}
10655
10656impl TCLIServiceGetTableTypesArgs {
10657  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetTableTypesArgs> {
10658    i_prot.read_struct_begin()?;
10659    let mut f_1: Option<TGetTableTypesReq> = None;
10660    loop {
10661      let field_ident = i_prot.read_field_begin()?;
10662      if field_ident.field_type == TType::Stop {
10663        break;
10664      }
10665      let field_id = field_id(&field_ident)?;
10666      match field_id {
10667        1 => {
10668          let val = TGetTableTypesReq::read_from_in_protocol(i_prot)?;
10669          f_1 = Some(val);
10670        },
10671        _ => {
10672          i_prot.skip(field_ident.field_type)?;
10673        },
10674      };
10675      i_prot.read_field_end()?;
10676    }
10677    i_prot.read_struct_end()?;
10678    verify_required_field_exists("TCLIServiceGetTableTypesArgs.req", &f_1)?;
10679    let ret = TCLIServiceGetTableTypesArgs {
10680      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
10681    };
10682    Ok(ret)
10683  }
10684  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10685    let struct_ident = TStructIdentifier::new("GetTableTypes_args");
10686    o_prot.write_struct_begin(&struct_ident)?;
10687    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
10688    self.req.write_to_out_protocol(o_prot)?;
10689    o_prot.write_field_end()?;
10690    o_prot.write_field_stop()?;
10691    o_prot.write_struct_end()
10692  }
10693}
10694
10695//
10696// TCLIServiceGetTableTypesResult
10697//
10698
10699#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10700struct TCLIServiceGetTableTypesResult {
10701  result_value: Option<TGetTableTypesResp>,
10702}
10703
10704impl TCLIServiceGetTableTypesResult {
10705  fn ok_or(self) -> thrift::Result<TGetTableTypesResp> {
10706    if self.result_value.is_some() {
10707      Ok(self.result_value.unwrap())
10708    } else {
10709      Err(
10710        thrift::Error::Application(
10711          ApplicationError::new(
10712            ApplicationErrorKind::MissingResult,
10713            "no result received for TCLIServiceGetTableTypes"
10714          )
10715        )
10716      )
10717    }
10718  }
10719  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetTableTypesResult> {
10720    i_prot.read_struct_begin()?;
10721    let mut f_0: Option<TGetTableTypesResp> = None;
10722    loop {
10723      let field_ident = i_prot.read_field_begin()?;
10724      if field_ident.field_type == TType::Stop {
10725        break;
10726      }
10727      let field_id = field_id(&field_ident)?;
10728      match field_id {
10729        0 => {
10730          let val = TGetTableTypesResp::read_from_in_protocol(i_prot)?;
10731          f_0 = Some(val);
10732        },
10733        _ => {
10734          i_prot.skip(field_ident.field_type)?;
10735        },
10736      };
10737      i_prot.read_field_end()?;
10738    }
10739    i_prot.read_struct_end()?;
10740    let ret = TCLIServiceGetTableTypesResult {
10741      result_value: f_0,
10742    };
10743    Ok(ret)
10744  }
10745  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10746    let struct_ident = TStructIdentifier::new("TCLIServiceGetTableTypesResult");
10747    o_prot.write_struct_begin(&struct_ident)?;
10748    if let Some(ref fld_var) = self.result_value {
10749      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10750      fld_var.write_to_out_protocol(o_prot)?;
10751      o_prot.write_field_end()?
10752    }
10753    o_prot.write_field_stop()?;
10754    o_prot.write_struct_end()
10755  }
10756}
10757
10758//
10759// TCLIServiceGetColumnsArgs
10760//
10761
10762#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10763struct TCLIServiceGetColumnsArgs {
10764  req: TGetColumnsReq,
10765}
10766
10767impl TCLIServiceGetColumnsArgs {
10768  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetColumnsArgs> {
10769    i_prot.read_struct_begin()?;
10770    let mut f_1: Option<TGetColumnsReq> = None;
10771    loop {
10772      let field_ident = i_prot.read_field_begin()?;
10773      if field_ident.field_type == TType::Stop {
10774        break;
10775      }
10776      let field_id = field_id(&field_ident)?;
10777      match field_id {
10778        1 => {
10779          let val = TGetColumnsReq::read_from_in_protocol(i_prot)?;
10780          f_1 = Some(val);
10781        },
10782        _ => {
10783          i_prot.skip(field_ident.field_type)?;
10784        },
10785      };
10786      i_prot.read_field_end()?;
10787    }
10788    i_prot.read_struct_end()?;
10789    verify_required_field_exists("TCLIServiceGetColumnsArgs.req", &f_1)?;
10790    let ret = TCLIServiceGetColumnsArgs {
10791      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
10792    };
10793    Ok(ret)
10794  }
10795  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10796    let struct_ident = TStructIdentifier::new("GetColumns_args");
10797    o_prot.write_struct_begin(&struct_ident)?;
10798    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
10799    self.req.write_to_out_protocol(o_prot)?;
10800    o_prot.write_field_end()?;
10801    o_prot.write_field_stop()?;
10802    o_prot.write_struct_end()
10803  }
10804}
10805
10806//
10807// TCLIServiceGetColumnsResult
10808//
10809
10810#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10811struct TCLIServiceGetColumnsResult {
10812  result_value: Option<TGetColumnsResp>,
10813}
10814
10815impl TCLIServiceGetColumnsResult {
10816  fn ok_or(self) -> thrift::Result<TGetColumnsResp> {
10817    if self.result_value.is_some() {
10818      Ok(self.result_value.unwrap())
10819    } else {
10820      Err(
10821        thrift::Error::Application(
10822          ApplicationError::new(
10823            ApplicationErrorKind::MissingResult,
10824            "no result received for TCLIServiceGetColumns"
10825          )
10826        )
10827      )
10828    }
10829  }
10830  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetColumnsResult> {
10831    i_prot.read_struct_begin()?;
10832    let mut f_0: Option<TGetColumnsResp> = None;
10833    loop {
10834      let field_ident = i_prot.read_field_begin()?;
10835      if field_ident.field_type == TType::Stop {
10836        break;
10837      }
10838      let field_id = field_id(&field_ident)?;
10839      match field_id {
10840        0 => {
10841          let val = TGetColumnsResp::read_from_in_protocol(i_prot)?;
10842          f_0 = Some(val);
10843        },
10844        _ => {
10845          i_prot.skip(field_ident.field_type)?;
10846        },
10847      };
10848      i_prot.read_field_end()?;
10849    }
10850    i_prot.read_struct_end()?;
10851    let ret = TCLIServiceGetColumnsResult {
10852      result_value: f_0,
10853    };
10854    Ok(ret)
10855  }
10856  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10857    let struct_ident = TStructIdentifier::new("TCLIServiceGetColumnsResult");
10858    o_prot.write_struct_begin(&struct_ident)?;
10859    if let Some(ref fld_var) = self.result_value {
10860      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10861      fld_var.write_to_out_protocol(o_prot)?;
10862      o_prot.write_field_end()?
10863    }
10864    o_prot.write_field_stop()?;
10865    o_prot.write_struct_end()
10866  }
10867}
10868
10869//
10870// TCLIServiceGetFunctionsArgs
10871//
10872
10873#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10874struct TCLIServiceGetFunctionsArgs {
10875  req: TGetFunctionsReq,
10876}
10877
10878impl TCLIServiceGetFunctionsArgs {
10879  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetFunctionsArgs> {
10880    i_prot.read_struct_begin()?;
10881    let mut f_1: Option<TGetFunctionsReq> = None;
10882    loop {
10883      let field_ident = i_prot.read_field_begin()?;
10884      if field_ident.field_type == TType::Stop {
10885        break;
10886      }
10887      let field_id = field_id(&field_ident)?;
10888      match field_id {
10889        1 => {
10890          let val = TGetFunctionsReq::read_from_in_protocol(i_prot)?;
10891          f_1 = Some(val);
10892        },
10893        _ => {
10894          i_prot.skip(field_ident.field_type)?;
10895        },
10896      };
10897      i_prot.read_field_end()?;
10898    }
10899    i_prot.read_struct_end()?;
10900    verify_required_field_exists("TCLIServiceGetFunctionsArgs.req", &f_1)?;
10901    let ret = TCLIServiceGetFunctionsArgs {
10902      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
10903    };
10904    Ok(ret)
10905  }
10906  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10907    let struct_ident = TStructIdentifier::new("GetFunctions_args");
10908    o_prot.write_struct_begin(&struct_ident)?;
10909    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
10910    self.req.write_to_out_protocol(o_prot)?;
10911    o_prot.write_field_end()?;
10912    o_prot.write_field_stop()?;
10913    o_prot.write_struct_end()
10914  }
10915}
10916
10917//
10918// TCLIServiceGetFunctionsResult
10919//
10920
10921#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10922struct TCLIServiceGetFunctionsResult {
10923  result_value: Option<TGetFunctionsResp>,
10924}
10925
10926impl TCLIServiceGetFunctionsResult {
10927  fn ok_or(self) -> thrift::Result<TGetFunctionsResp> {
10928    if self.result_value.is_some() {
10929      Ok(self.result_value.unwrap())
10930    } else {
10931      Err(
10932        thrift::Error::Application(
10933          ApplicationError::new(
10934            ApplicationErrorKind::MissingResult,
10935            "no result received for TCLIServiceGetFunctions"
10936          )
10937        )
10938      )
10939    }
10940  }
10941  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetFunctionsResult> {
10942    i_prot.read_struct_begin()?;
10943    let mut f_0: Option<TGetFunctionsResp> = None;
10944    loop {
10945      let field_ident = i_prot.read_field_begin()?;
10946      if field_ident.field_type == TType::Stop {
10947        break;
10948      }
10949      let field_id = field_id(&field_ident)?;
10950      match field_id {
10951        0 => {
10952          let val = TGetFunctionsResp::read_from_in_protocol(i_prot)?;
10953          f_0 = Some(val);
10954        },
10955        _ => {
10956          i_prot.skip(field_ident.field_type)?;
10957        },
10958      };
10959      i_prot.read_field_end()?;
10960    }
10961    i_prot.read_struct_end()?;
10962    let ret = TCLIServiceGetFunctionsResult {
10963      result_value: f_0,
10964    };
10965    Ok(ret)
10966  }
10967  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10968    let struct_ident = TStructIdentifier::new("TCLIServiceGetFunctionsResult");
10969    o_prot.write_struct_begin(&struct_ident)?;
10970    if let Some(ref fld_var) = self.result_value {
10971      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10972      fld_var.write_to_out_protocol(o_prot)?;
10973      o_prot.write_field_end()?
10974    }
10975    o_prot.write_field_stop()?;
10976    o_prot.write_struct_end()
10977  }
10978}
10979
10980//
10981// TCLIServiceGetPrimaryKeysArgs
10982//
10983
10984#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10985struct TCLIServiceGetPrimaryKeysArgs {
10986  req: TGetPrimaryKeysReq,
10987}
10988
10989impl TCLIServiceGetPrimaryKeysArgs {
10990  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetPrimaryKeysArgs> {
10991    i_prot.read_struct_begin()?;
10992    let mut f_1: Option<TGetPrimaryKeysReq> = None;
10993    loop {
10994      let field_ident = i_prot.read_field_begin()?;
10995      if field_ident.field_type == TType::Stop {
10996        break;
10997      }
10998      let field_id = field_id(&field_ident)?;
10999      match field_id {
11000        1 => {
11001          let val = TGetPrimaryKeysReq::read_from_in_protocol(i_prot)?;
11002          f_1 = Some(val);
11003        },
11004        _ => {
11005          i_prot.skip(field_ident.field_type)?;
11006        },
11007      };
11008      i_prot.read_field_end()?;
11009    }
11010    i_prot.read_struct_end()?;
11011    verify_required_field_exists("TCLIServiceGetPrimaryKeysArgs.req", &f_1)?;
11012    let ret = TCLIServiceGetPrimaryKeysArgs {
11013      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
11014    };
11015    Ok(ret)
11016  }
11017  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11018    let struct_ident = TStructIdentifier::new("GetPrimaryKeys_args");
11019    o_prot.write_struct_begin(&struct_ident)?;
11020    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
11021    self.req.write_to_out_protocol(o_prot)?;
11022    o_prot.write_field_end()?;
11023    o_prot.write_field_stop()?;
11024    o_prot.write_struct_end()
11025  }
11026}
11027
11028//
11029// TCLIServiceGetPrimaryKeysResult
11030//
11031
11032#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11033struct TCLIServiceGetPrimaryKeysResult {
11034  result_value: Option<TGetPrimaryKeysResp>,
11035}
11036
11037impl TCLIServiceGetPrimaryKeysResult {
11038  fn ok_or(self) -> thrift::Result<TGetPrimaryKeysResp> {
11039    if self.result_value.is_some() {
11040      Ok(self.result_value.unwrap())
11041    } else {
11042      Err(
11043        thrift::Error::Application(
11044          ApplicationError::new(
11045            ApplicationErrorKind::MissingResult,
11046            "no result received for TCLIServiceGetPrimaryKeys"
11047          )
11048        )
11049      )
11050    }
11051  }
11052  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetPrimaryKeysResult> {
11053    i_prot.read_struct_begin()?;
11054    let mut f_0: Option<TGetPrimaryKeysResp> = None;
11055    loop {
11056      let field_ident = i_prot.read_field_begin()?;
11057      if field_ident.field_type == TType::Stop {
11058        break;
11059      }
11060      let field_id = field_id(&field_ident)?;
11061      match field_id {
11062        0 => {
11063          let val = TGetPrimaryKeysResp::read_from_in_protocol(i_prot)?;
11064          f_0 = Some(val);
11065        },
11066        _ => {
11067          i_prot.skip(field_ident.field_type)?;
11068        },
11069      };
11070      i_prot.read_field_end()?;
11071    }
11072    i_prot.read_struct_end()?;
11073    let ret = TCLIServiceGetPrimaryKeysResult {
11074      result_value: f_0,
11075    };
11076    Ok(ret)
11077  }
11078  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11079    let struct_ident = TStructIdentifier::new("TCLIServiceGetPrimaryKeysResult");
11080    o_prot.write_struct_begin(&struct_ident)?;
11081    if let Some(ref fld_var) = self.result_value {
11082      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
11083      fld_var.write_to_out_protocol(o_prot)?;
11084      o_prot.write_field_end()?
11085    }
11086    o_prot.write_field_stop()?;
11087    o_prot.write_struct_end()
11088  }
11089}
11090
11091//
11092// TCLIServiceGetCrossReferenceArgs
11093//
11094
11095#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11096struct TCLIServiceGetCrossReferenceArgs {
11097  req: TGetCrossReferenceReq,
11098}
11099
11100impl TCLIServiceGetCrossReferenceArgs {
11101  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetCrossReferenceArgs> {
11102    i_prot.read_struct_begin()?;
11103    let mut f_1: Option<TGetCrossReferenceReq> = None;
11104    loop {
11105      let field_ident = i_prot.read_field_begin()?;
11106      if field_ident.field_type == TType::Stop {
11107        break;
11108      }
11109      let field_id = field_id(&field_ident)?;
11110      match field_id {
11111        1 => {
11112          let val = TGetCrossReferenceReq::read_from_in_protocol(i_prot)?;
11113          f_1 = Some(val);
11114        },
11115        _ => {
11116          i_prot.skip(field_ident.field_type)?;
11117        },
11118      };
11119      i_prot.read_field_end()?;
11120    }
11121    i_prot.read_struct_end()?;
11122    verify_required_field_exists("TCLIServiceGetCrossReferenceArgs.req", &f_1)?;
11123    let ret = TCLIServiceGetCrossReferenceArgs {
11124      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
11125    };
11126    Ok(ret)
11127  }
11128  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11129    let struct_ident = TStructIdentifier::new("GetCrossReference_args");
11130    o_prot.write_struct_begin(&struct_ident)?;
11131    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
11132    self.req.write_to_out_protocol(o_prot)?;
11133    o_prot.write_field_end()?;
11134    o_prot.write_field_stop()?;
11135    o_prot.write_struct_end()
11136  }
11137}
11138
11139//
11140// TCLIServiceGetCrossReferenceResult
11141//
11142
11143#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11144struct TCLIServiceGetCrossReferenceResult {
11145  result_value: Option<TGetCrossReferenceResp>,
11146}
11147
11148impl TCLIServiceGetCrossReferenceResult {
11149  fn ok_or(self) -> thrift::Result<TGetCrossReferenceResp> {
11150    if self.result_value.is_some() {
11151      Ok(self.result_value.unwrap())
11152    } else {
11153      Err(
11154        thrift::Error::Application(
11155          ApplicationError::new(
11156            ApplicationErrorKind::MissingResult,
11157            "no result received for TCLIServiceGetCrossReference"
11158          )
11159        )
11160      )
11161    }
11162  }
11163  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetCrossReferenceResult> {
11164    i_prot.read_struct_begin()?;
11165    let mut f_0: Option<TGetCrossReferenceResp> = None;
11166    loop {
11167      let field_ident = i_prot.read_field_begin()?;
11168      if field_ident.field_type == TType::Stop {
11169        break;
11170      }
11171      let field_id = field_id(&field_ident)?;
11172      match field_id {
11173        0 => {
11174          let val = TGetCrossReferenceResp::read_from_in_protocol(i_prot)?;
11175          f_0 = Some(val);
11176        },
11177        _ => {
11178          i_prot.skip(field_ident.field_type)?;
11179        },
11180      };
11181      i_prot.read_field_end()?;
11182    }
11183    i_prot.read_struct_end()?;
11184    let ret = TCLIServiceGetCrossReferenceResult {
11185      result_value: f_0,
11186    };
11187    Ok(ret)
11188  }
11189  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11190    let struct_ident = TStructIdentifier::new("TCLIServiceGetCrossReferenceResult");
11191    o_prot.write_struct_begin(&struct_ident)?;
11192    if let Some(ref fld_var) = self.result_value {
11193      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
11194      fld_var.write_to_out_protocol(o_prot)?;
11195      o_prot.write_field_end()?
11196    }
11197    o_prot.write_field_stop()?;
11198    o_prot.write_struct_end()
11199  }
11200}
11201
11202//
11203// TCLIServiceGetOperationStatusArgs
11204//
11205
11206#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11207struct TCLIServiceGetOperationStatusArgs {
11208  req: TGetOperationStatusReq,
11209}
11210
11211impl TCLIServiceGetOperationStatusArgs {
11212  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetOperationStatusArgs> {
11213    i_prot.read_struct_begin()?;
11214    let mut f_1: Option<TGetOperationStatusReq> = None;
11215    loop {
11216      let field_ident = i_prot.read_field_begin()?;
11217      if field_ident.field_type == TType::Stop {
11218        break;
11219      }
11220      let field_id = field_id(&field_ident)?;
11221      match field_id {
11222        1 => {
11223          let val = TGetOperationStatusReq::read_from_in_protocol(i_prot)?;
11224          f_1 = Some(val);
11225        },
11226        _ => {
11227          i_prot.skip(field_ident.field_type)?;
11228        },
11229      };
11230      i_prot.read_field_end()?;
11231    }
11232    i_prot.read_struct_end()?;
11233    verify_required_field_exists("TCLIServiceGetOperationStatusArgs.req", &f_1)?;
11234    let ret = TCLIServiceGetOperationStatusArgs {
11235      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
11236    };
11237    Ok(ret)
11238  }
11239  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11240    let struct_ident = TStructIdentifier::new("GetOperationStatus_args");
11241    o_prot.write_struct_begin(&struct_ident)?;
11242    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
11243    self.req.write_to_out_protocol(o_prot)?;
11244    o_prot.write_field_end()?;
11245    o_prot.write_field_stop()?;
11246    o_prot.write_struct_end()
11247  }
11248}
11249
11250//
11251// TCLIServiceGetOperationStatusResult
11252//
11253
11254#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11255struct TCLIServiceGetOperationStatusResult {
11256  result_value: Option<TGetOperationStatusResp>,
11257}
11258
11259impl TCLIServiceGetOperationStatusResult {
11260  fn ok_or(self) -> thrift::Result<TGetOperationStatusResp> {
11261    if self.result_value.is_some() {
11262      Ok(self.result_value.unwrap())
11263    } else {
11264      Err(
11265        thrift::Error::Application(
11266          ApplicationError::new(
11267            ApplicationErrorKind::MissingResult,
11268            "no result received for TCLIServiceGetOperationStatus"
11269          )
11270        )
11271      )
11272    }
11273  }
11274  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetOperationStatusResult> {
11275    i_prot.read_struct_begin()?;
11276    let mut f_0: Option<TGetOperationStatusResp> = None;
11277    loop {
11278      let field_ident = i_prot.read_field_begin()?;
11279      if field_ident.field_type == TType::Stop {
11280        break;
11281      }
11282      let field_id = field_id(&field_ident)?;
11283      match field_id {
11284        0 => {
11285          let val = TGetOperationStatusResp::read_from_in_protocol(i_prot)?;
11286          f_0 = Some(val);
11287        },
11288        _ => {
11289          i_prot.skip(field_ident.field_type)?;
11290        },
11291      };
11292      i_prot.read_field_end()?;
11293    }
11294    i_prot.read_struct_end()?;
11295    let ret = TCLIServiceGetOperationStatusResult {
11296      result_value: f_0,
11297    };
11298    Ok(ret)
11299  }
11300  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11301    let struct_ident = TStructIdentifier::new("TCLIServiceGetOperationStatusResult");
11302    o_prot.write_struct_begin(&struct_ident)?;
11303    if let Some(ref fld_var) = self.result_value {
11304      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
11305      fld_var.write_to_out_protocol(o_prot)?;
11306      o_prot.write_field_end()?
11307    }
11308    o_prot.write_field_stop()?;
11309    o_prot.write_struct_end()
11310  }
11311}
11312
11313//
11314// TCLIServiceCancelOperationArgs
11315//
11316
11317#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11318struct TCLIServiceCancelOperationArgs {
11319  req: TCancelOperationReq,
11320}
11321
11322impl TCLIServiceCancelOperationArgs {
11323  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceCancelOperationArgs> {
11324    i_prot.read_struct_begin()?;
11325    let mut f_1: Option<TCancelOperationReq> = None;
11326    loop {
11327      let field_ident = i_prot.read_field_begin()?;
11328      if field_ident.field_type == TType::Stop {
11329        break;
11330      }
11331      let field_id = field_id(&field_ident)?;
11332      match field_id {
11333        1 => {
11334          let val = TCancelOperationReq::read_from_in_protocol(i_prot)?;
11335          f_1 = Some(val);
11336        },
11337        _ => {
11338          i_prot.skip(field_ident.field_type)?;
11339        },
11340      };
11341      i_prot.read_field_end()?;
11342    }
11343    i_prot.read_struct_end()?;
11344    verify_required_field_exists("TCLIServiceCancelOperationArgs.req", &f_1)?;
11345    let ret = TCLIServiceCancelOperationArgs {
11346      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
11347    };
11348    Ok(ret)
11349  }
11350  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11351    let struct_ident = TStructIdentifier::new("CancelOperation_args");
11352    o_prot.write_struct_begin(&struct_ident)?;
11353    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
11354    self.req.write_to_out_protocol(o_prot)?;
11355    o_prot.write_field_end()?;
11356    o_prot.write_field_stop()?;
11357    o_prot.write_struct_end()
11358  }
11359}
11360
11361//
11362// TCLIServiceCancelOperationResult
11363//
11364
11365#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11366struct TCLIServiceCancelOperationResult {
11367  result_value: Option<TCancelOperationResp>,
11368}
11369
11370impl TCLIServiceCancelOperationResult {
11371  fn ok_or(self) -> thrift::Result<TCancelOperationResp> {
11372    if self.result_value.is_some() {
11373      Ok(self.result_value.unwrap())
11374    } else {
11375      Err(
11376        thrift::Error::Application(
11377          ApplicationError::new(
11378            ApplicationErrorKind::MissingResult,
11379            "no result received for TCLIServiceCancelOperation"
11380          )
11381        )
11382      )
11383    }
11384  }
11385  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceCancelOperationResult> {
11386    i_prot.read_struct_begin()?;
11387    let mut f_0: Option<TCancelOperationResp> = None;
11388    loop {
11389      let field_ident = i_prot.read_field_begin()?;
11390      if field_ident.field_type == TType::Stop {
11391        break;
11392      }
11393      let field_id = field_id(&field_ident)?;
11394      match field_id {
11395        0 => {
11396          let val = TCancelOperationResp::read_from_in_protocol(i_prot)?;
11397          f_0 = Some(val);
11398        },
11399        _ => {
11400          i_prot.skip(field_ident.field_type)?;
11401        },
11402      };
11403      i_prot.read_field_end()?;
11404    }
11405    i_prot.read_struct_end()?;
11406    let ret = TCLIServiceCancelOperationResult {
11407      result_value: f_0,
11408    };
11409    Ok(ret)
11410  }
11411  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11412    let struct_ident = TStructIdentifier::new("TCLIServiceCancelOperationResult");
11413    o_prot.write_struct_begin(&struct_ident)?;
11414    if let Some(ref fld_var) = self.result_value {
11415      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
11416      fld_var.write_to_out_protocol(o_prot)?;
11417      o_prot.write_field_end()?
11418    }
11419    o_prot.write_field_stop()?;
11420    o_prot.write_struct_end()
11421  }
11422}
11423
11424//
11425// TCLIServiceCloseOperationArgs
11426//
11427
11428#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11429struct TCLIServiceCloseOperationArgs {
11430  req: TCloseOperationReq,
11431}
11432
11433impl TCLIServiceCloseOperationArgs {
11434  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceCloseOperationArgs> {
11435    i_prot.read_struct_begin()?;
11436    let mut f_1: Option<TCloseOperationReq> = None;
11437    loop {
11438      let field_ident = i_prot.read_field_begin()?;
11439      if field_ident.field_type == TType::Stop {
11440        break;
11441      }
11442      let field_id = field_id(&field_ident)?;
11443      match field_id {
11444        1 => {
11445          let val = TCloseOperationReq::read_from_in_protocol(i_prot)?;
11446          f_1 = Some(val);
11447        },
11448        _ => {
11449          i_prot.skip(field_ident.field_type)?;
11450        },
11451      };
11452      i_prot.read_field_end()?;
11453    }
11454    i_prot.read_struct_end()?;
11455    verify_required_field_exists("TCLIServiceCloseOperationArgs.req", &f_1)?;
11456    let ret = TCLIServiceCloseOperationArgs {
11457      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
11458    };
11459    Ok(ret)
11460  }
11461  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11462    let struct_ident = TStructIdentifier::new("CloseOperation_args");
11463    o_prot.write_struct_begin(&struct_ident)?;
11464    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
11465    self.req.write_to_out_protocol(o_prot)?;
11466    o_prot.write_field_end()?;
11467    o_prot.write_field_stop()?;
11468    o_prot.write_struct_end()
11469  }
11470}
11471
11472//
11473// TCLIServiceCloseOperationResult
11474//
11475
11476#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11477struct TCLIServiceCloseOperationResult {
11478  result_value: Option<TCloseOperationResp>,
11479}
11480
11481impl TCLIServiceCloseOperationResult {
11482  fn ok_or(self) -> thrift::Result<TCloseOperationResp> {
11483    if self.result_value.is_some() {
11484      Ok(self.result_value.unwrap())
11485    } else {
11486      Err(
11487        thrift::Error::Application(
11488          ApplicationError::new(
11489            ApplicationErrorKind::MissingResult,
11490            "no result received for TCLIServiceCloseOperation"
11491          )
11492        )
11493      )
11494    }
11495  }
11496  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceCloseOperationResult> {
11497    i_prot.read_struct_begin()?;
11498    let mut f_0: Option<TCloseOperationResp> = None;
11499    loop {
11500      let field_ident = i_prot.read_field_begin()?;
11501      if field_ident.field_type == TType::Stop {
11502        break;
11503      }
11504      let field_id = field_id(&field_ident)?;
11505      match field_id {
11506        0 => {
11507          let val = TCloseOperationResp::read_from_in_protocol(i_prot)?;
11508          f_0 = Some(val);
11509        },
11510        _ => {
11511          i_prot.skip(field_ident.field_type)?;
11512        },
11513      };
11514      i_prot.read_field_end()?;
11515    }
11516    i_prot.read_struct_end()?;
11517    let ret = TCLIServiceCloseOperationResult {
11518      result_value: f_0,
11519    };
11520    Ok(ret)
11521  }
11522  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11523    let struct_ident = TStructIdentifier::new("TCLIServiceCloseOperationResult");
11524    o_prot.write_struct_begin(&struct_ident)?;
11525    if let Some(ref fld_var) = self.result_value {
11526      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
11527      fld_var.write_to_out_protocol(o_prot)?;
11528      o_prot.write_field_end()?
11529    }
11530    o_prot.write_field_stop()?;
11531    o_prot.write_struct_end()
11532  }
11533}
11534
11535//
11536// TCLIServiceGetResultSetMetadataArgs
11537//
11538
11539#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11540struct TCLIServiceGetResultSetMetadataArgs {
11541  req: TGetResultSetMetadataReq,
11542}
11543
11544impl TCLIServiceGetResultSetMetadataArgs {
11545  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetResultSetMetadataArgs> {
11546    i_prot.read_struct_begin()?;
11547    let mut f_1: Option<TGetResultSetMetadataReq> = None;
11548    loop {
11549      let field_ident = i_prot.read_field_begin()?;
11550      if field_ident.field_type == TType::Stop {
11551        break;
11552      }
11553      let field_id = field_id(&field_ident)?;
11554      match field_id {
11555        1 => {
11556          let val = TGetResultSetMetadataReq::read_from_in_protocol(i_prot)?;
11557          f_1 = Some(val);
11558        },
11559        _ => {
11560          i_prot.skip(field_ident.field_type)?;
11561        },
11562      };
11563      i_prot.read_field_end()?;
11564    }
11565    i_prot.read_struct_end()?;
11566    verify_required_field_exists("TCLIServiceGetResultSetMetadataArgs.req", &f_1)?;
11567    let ret = TCLIServiceGetResultSetMetadataArgs {
11568      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
11569    };
11570    Ok(ret)
11571  }
11572  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11573    let struct_ident = TStructIdentifier::new("GetResultSetMetadata_args");
11574    o_prot.write_struct_begin(&struct_ident)?;
11575    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
11576    self.req.write_to_out_protocol(o_prot)?;
11577    o_prot.write_field_end()?;
11578    o_prot.write_field_stop()?;
11579    o_prot.write_struct_end()
11580  }
11581}
11582
11583//
11584// TCLIServiceGetResultSetMetadataResult
11585//
11586
11587#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11588struct TCLIServiceGetResultSetMetadataResult {
11589  result_value: Option<TGetResultSetMetadataResp>,
11590}
11591
11592impl TCLIServiceGetResultSetMetadataResult {
11593  fn ok_or(self) -> thrift::Result<TGetResultSetMetadataResp> {
11594    if self.result_value.is_some() {
11595      Ok(self.result_value.unwrap())
11596    } else {
11597      Err(
11598        thrift::Error::Application(
11599          ApplicationError::new(
11600            ApplicationErrorKind::MissingResult,
11601            "no result received for TCLIServiceGetSetMetadataResult"
11602          )
11603        )
11604      )
11605    }
11606  }
11607  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetResultSetMetadataResult> {
11608    i_prot.read_struct_begin()?;
11609    let mut f_0: Option<TGetResultSetMetadataResp> = None;
11610    loop {
11611      let field_ident = i_prot.read_field_begin()?;
11612      if field_ident.field_type == TType::Stop {
11613        break;
11614      }
11615      let field_id = field_id(&field_ident)?;
11616      match field_id {
11617        0 => {
11618          let val = TGetResultSetMetadataResp::read_from_in_protocol(i_prot)?;
11619          f_0 = Some(val);
11620        },
11621        _ => {
11622          i_prot.skip(field_ident.field_type)?;
11623        },
11624      };
11625      i_prot.read_field_end()?;
11626    }
11627    i_prot.read_struct_end()?;
11628    let ret = TCLIServiceGetResultSetMetadataResult {
11629      result_value: f_0,
11630    };
11631    Ok(ret)
11632  }
11633  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11634    let struct_ident = TStructIdentifier::new("TCLIServiceGetResultSetMetadataResult");
11635    o_prot.write_struct_begin(&struct_ident)?;
11636    if let Some(ref fld_var) = self.result_value {
11637      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
11638      fld_var.write_to_out_protocol(o_prot)?;
11639      o_prot.write_field_end()?
11640    }
11641    o_prot.write_field_stop()?;
11642    o_prot.write_struct_end()
11643  }
11644}
11645
11646//
11647// TCLIServiceFetchResultsArgs
11648//
11649
11650#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11651struct TCLIServiceFetchResultsArgs {
11652  req: TFetchResultsReq,
11653}
11654
11655impl TCLIServiceFetchResultsArgs {
11656  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceFetchResultsArgs> {
11657    i_prot.read_struct_begin()?;
11658    let mut f_1: Option<TFetchResultsReq> = None;
11659    loop {
11660      let field_ident = i_prot.read_field_begin()?;
11661      if field_ident.field_type == TType::Stop {
11662        break;
11663      }
11664      let field_id = field_id(&field_ident)?;
11665      match field_id {
11666        1 => {
11667          let val = TFetchResultsReq::read_from_in_protocol(i_prot)?;
11668          f_1 = Some(val);
11669        },
11670        _ => {
11671          i_prot.skip(field_ident.field_type)?;
11672        },
11673      };
11674      i_prot.read_field_end()?;
11675    }
11676    i_prot.read_struct_end()?;
11677    verify_required_field_exists("TCLIServiceFetchResultsArgs.req", &f_1)?;
11678    let ret = TCLIServiceFetchResultsArgs {
11679      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
11680    };
11681    Ok(ret)
11682  }
11683  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11684    let struct_ident = TStructIdentifier::new("FetchResults_args");
11685    o_prot.write_struct_begin(&struct_ident)?;
11686    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
11687    self.req.write_to_out_protocol(o_prot)?;
11688    o_prot.write_field_end()?;
11689    o_prot.write_field_stop()?;
11690    o_prot.write_struct_end()
11691  }
11692}
11693
11694//
11695// TCLIServiceFetchResultsResult
11696//
11697
11698#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11699struct TCLIServiceFetchResultsResult {
11700  result_value: Option<TFetchResultsResp>,
11701}
11702
11703impl TCLIServiceFetchResultsResult {
11704  fn ok_or(self) -> thrift::Result<TFetchResultsResp> {
11705    if self.result_value.is_some() {
11706      Ok(self.result_value.unwrap())
11707    } else {
11708      Err(
11709        thrift::Error::Application(
11710          ApplicationError::new(
11711            ApplicationErrorKind::MissingResult,
11712            "no result received for TCLIServiceFetchsResult"
11713          )
11714        )
11715      )
11716    }
11717  }
11718  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceFetchResultsResult> {
11719    i_prot.read_struct_begin()?;
11720    let mut f_0: Option<TFetchResultsResp> = None;
11721    loop {
11722      let field_ident = i_prot.read_field_begin()?;
11723      if field_ident.field_type == TType::Stop {
11724        break;
11725      }
11726      let field_id = field_id(&field_ident)?;
11727      match field_id {
11728        0 => {
11729          let val = TFetchResultsResp::read_from_in_protocol(i_prot)?;
11730          f_0 = Some(val);
11731        },
11732        _ => {
11733          i_prot.skip(field_ident.field_type)?;
11734        },
11735      };
11736      i_prot.read_field_end()?;
11737    }
11738    i_prot.read_struct_end()?;
11739    let ret = TCLIServiceFetchResultsResult {
11740      result_value: f_0,
11741    };
11742    Ok(ret)
11743  }
11744  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11745    let struct_ident = TStructIdentifier::new("TCLIServiceFetchResultsResult");
11746    o_prot.write_struct_begin(&struct_ident)?;
11747    if let Some(ref fld_var) = self.result_value {
11748      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
11749      fld_var.write_to_out_protocol(o_prot)?;
11750      o_prot.write_field_end()?
11751    }
11752    o_prot.write_field_stop()?;
11753    o_prot.write_struct_end()
11754  }
11755}
11756
11757//
11758// TCLIServiceGetDelegationTokenArgs
11759//
11760
11761#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11762struct TCLIServiceGetDelegationTokenArgs {
11763  req: TGetDelegationTokenReq,
11764}
11765
11766impl TCLIServiceGetDelegationTokenArgs {
11767  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetDelegationTokenArgs> {
11768    i_prot.read_struct_begin()?;
11769    let mut f_1: Option<TGetDelegationTokenReq> = None;
11770    loop {
11771      let field_ident = i_prot.read_field_begin()?;
11772      if field_ident.field_type == TType::Stop {
11773        break;
11774      }
11775      let field_id = field_id(&field_ident)?;
11776      match field_id {
11777        1 => {
11778          let val = TGetDelegationTokenReq::read_from_in_protocol(i_prot)?;
11779          f_1 = Some(val);
11780        },
11781        _ => {
11782          i_prot.skip(field_ident.field_type)?;
11783        },
11784      };
11785      i_prot.read_field_end()?;
11786    }
11787    i_prot.read_struct_end()?;
11788    verify_required_field_exists("TCLIServiceGetDelegationTokenArgs.req", &f_1)?;
11789    let ret = TCLIServiceGetDelegationTokenArgs {
11790      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
11791    };
11792    Ok(ret)
11793  }
11794  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11795    let struct_ident = TStructIdentifier::new("GetDelegationToken_args");
11796    o_prot.write_struct_begin(&struct_ident)?;
11797    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
11798    self.req.write_to_out_protocol(o_prot)?;
11799    o_prot.write_field_end()?;
11800    o_prot.write_field_stop()?;
11801    o_prot.write_struct_end()
11802  }
11803}
11804
11805//
11806// TCLIServiceGetDelegationTokenResult
11807//
11808
11809#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11810struct TCLIServiceGetDelegationTokenResult {
11811  result_value: Option<TGetDelegationTokenResp>,
11812}
11813
11814impl TCLIServiceGetDelegationTokenResult {
11815  fn ok_or(self) -> thrift::Result<TGetDelegationTokenResp> {
11816    if self.result_value.is_some() {
11817      Ok(self.result_value.unwrap())
11818    } else {
11819      Err(
11820        thrift::Error::Application(
11821          ApplicationError::new(
11822            ApplicationErrorKind::MissingResult,
11823            "no result received for TCLIServiceGetDelegationToken"
11824          )
11825        )
11826      )
11827    }
11828  }
11829  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetDelegationTokenResult> {
11830    i_prot.read_struct_begin()?;
11831    let mut f_0: Option<TGetDelegationTokenResp> = None;
11832    loop {
11833      let field_ident = i_prot.read_field_begin()?;
11834      if field_ident.field_type == TType::Stop {
11835        break;
11836      }
11837      let field_id = field_id(&field_ident)?;
11838      match field_id {
11839        0 => {
11840          let val = TGetDelegationTokenResp::read_from_in_protocol(i_prot)?;
11841          f_0 = Some(val);
11842        },
11843        _ => {
11844          i_prot.skip(field_ident.field_type)?;
11845        },
11846      };
11847      i_prot.read_field_end()?;
11848    }
11849    i_prot.read_struct_end()?;
11850    let ret = TCLIServiceGetDelegationTokenResult {
11851      result_value: f_0,
11852    };
11853    Ok(ret)
11854  }
11855  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11856    let struct_ident = TStructIdentifier::new("TCLIServiceGetDelegationTokenResult");
11857    o_prot.write_struct_begin(&struct_ident)?;
11858    if let Some(ref fld_var) = self.result_value {
11859      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
11860      fld_var.write_to_out_protocol(o_prot)?;
11861      o_prot.write_field_end()?
11862    }
11863    o_prot.write_field_stop()?;
11864    o_prot.write_struct_end()
11865  }
11866}
11867
11868//
11869// TCLIServiceCancelDelegationTokenArgs
11870//
11871
11872#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11873struct TCLIServiceCancelDelegationTokenArgs {
11874  req: TCancelDelegationTokenReq,
11875}
11876
11877impl TCLIServiceCancelDelegationTokenArgs {
11878  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceCancelDelegationTokenArgs> {
11879    i_prot.read_struct_begin()?;
11880    let mut f_1: Option<TCancelDelegationTokenReq> = None;
11881    loop {
11882      let field_ident = i_prot.read_field_begin()?;
11883      if field_ident.field_type == TType::Stop {
11884        break;
11885      }
11886      let field_id = field_id(&field_ident)?;
11887      match field_id {
11888        1 => {
11889          let val = TCancelDelegationTokenReq::read_from_in_protocol(i_prot)?;
11890          f_1 = Some(val);
11891        },
11892        _ => {
11893          i_prot.skip(field_ident.field_type)?;
11894        },
11895      };
11896      i_prot.read_field_end()?;
11897    }
11898    i_prot.read_struct_end()?;
11899    verify_required_field_exists("TCLIServiceCancelDelegationTokenArgs.req", &f_1)?;
11900    let ret = TCLIServiceCancelDelegationTokenArgs {
11901      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
11902    };
11903    Ok(ret)
11904  }
11905  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11906    let struct_ident = TStructIdentifier::new("CancelDelegationToken_args");
11907    o_prot.write_struct_begin(&struct_ident)?;
11908    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
11909    self.req.write_to_out_protocol(o_prot)?;
11910    o_prot.write_field_end()?;
11911    o_prot.write_field_stop()?;
11912    o_prot.write_struct_end()
11913  }
11914}
11915
11916//
11917// TCLIServiceCancelDelegationTokenResult
11918//
11919
11920#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11921struct TCLIServiceCancelDelegationTokenResult {
11922  result_value: Option<TCancelDelegationTokenResp>,
11923}
11924
11925impl TCLIServiceCancelDelegationTokenResult {
11926  fn ok_or(self) -> thrift::Result<TCancelDelegationTokenResp> {
11927    if self.result_value.is_some() {
11928      Ok(self.result_value.unwrap())
11929    } else {
11930      Err(
11931        thrift::Error::Application(
11932          ApplicationError::new(
11933            ApplicationErrorKind::MissingResult,
11934            "no result received for TCLIServiceCancelDelegationToken"
11935          )
11936        )
11937      )
11938    }
11939  }
11940  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceCancelDelegationTokenResult> {
11941    i_prot.read_struct_begin()?;
11942    let mut f_0: Option<TCancelDelegationTokenResp> = None;
11943    loop {
11944      let field_ident = i_prot.read_field_begin()?;
11945      if field_ident.field_type == TType::Stop {
11946        break;
11947      }
11948      let field_id = field_id(&field_ident)?;
11949      match field_id {
11950        0 => {
11951          let val = TCancelDelegationTokenResp::read_from_in_protocol(i_prot)?;
11952          f_0 = Some(val);
11953        },
11954        _ => {
11955          i_prot.skip(field_ident.field_type)?;
11956        },
11957      };
11958      i_prot.read_field_end()?;
11959    }
11960    i_prot.read_struct_end()?;
11961    let ret = TCLIServiceCancelDelegationTokenResult {
11962      result_value: f_0,
11963    };
11964    Ok(ret)
11965  }
11966  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
11967    let struct_ident = TStructIdentifier::new("TCLIServiceCancelDelegationTokenResult");
11968    o_prot.write_struct_begin(&struct_ident)?;
11969    if let Some(ref fld_var) = self.result_value {
11970      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
11971      fld_var.write_to_out_protocol(o_prot)?;
11972      o_prot.write_field_end()?
11973    }
11974    o_prot.write_field_stop()?;
11975    o_prot.write_struct_end()
11976  }
11977}
11978
11979//
11980// TCLIServiceRenewDelegationTokenArgs
11981//
11982
11983#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11984struct TCLIServiceRenewDelegationTokenArgs {
11985  req: TRenewDelegationTokenReq,
11986}
11987
11988impl TCLIServiceRenewDelegationTokenArgs {
11989  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceRenewDelegationTokenArgs> {
11990    i_prot.read_struct_begin()?;
11991    let mut f_1: Option<TRenewDelegationTokenReq> = None;
11992    loop {
11993      let field_ident = i_prot.read_field_begin()?;
11994      if field_ident.field_type == TType::Stop {
11995        break;
11996      }
11997      let field_id = field_id(&field_ident)?;
11998      match field_id {
11999        1 => {
12000          let val = TRenewDelegationTokenReq::read_from_in_protocol(i_prot)?;
12001          f_1 = Some(val);
12002        },
12003        _ => {
12004          i_prot.skip(field_ident.field_type)?;
12005        },
12006      };
12007      i_prot.read_field_end()?;
12008    }
12009    i_prot.read_struct_end()?;
12010    verify_required_field_exists("TCLIServiceRenewDelegationTokenArgs.req", &f_1)?;
12011    let ret = TCLIServiceRenewDelegationTokenArgs {
12012      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
12013    };
12014    Ok(ret)
12015  }
12016  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
12017    let struct_ident = TStructIdentifier::new("RenewDelegationToken_args");
12018    o_prot.write_struct_begin(&struct_ident)?;
12019    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
12020    self.req.write_to_out_protocol(o_prot)?;
12021    o_prot.write_field_end()?;
12022    o_prot.write_field_stop()?;
12023    o_prot.write_struct_end()
12024  }
12025}
12026
12027//
12028// TCLIServiceRenewDelegationTokenResult
12029//
12030
12031#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12032struct TCLIServiceRenewDelegationTokenResult {
12033  result_value: Option<TRenewDelegationTokenResp>,
12034}
12035
12036impl TCLIServiceRenewDelegationTokenResult {
12037  fn ok_or(self) -> thrift::Result<TRenewDelegationTokenResp> {
12038    if self.result_value.is_some() {
12039      Ok(self.result_value.unwrap())
12040    } else {
12041      Err(
12042        thrift::Error::Application(
12043          ApplicationError::new(
12044            ApplicationErrorKind::MissingResult,
12045            "no result received for TCLIServiceRenewDelegationToken"
12046          )
12047        )
12048      )
12049    }
12050  }
12051  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceRenewDelegationTokenResult> {
12052    i_prot.read_struct_begin()?;
12053    let mut f_0: Option<TRenewDelegationTokenResp> = None;
12054    loop {
12055      let field_ident = i_prot.read_field_begin()?;
12056      if field_ident.field_type == TType::Stop {
12057        break;
12058      }
12059      let field_id = field_id(&field_ident)?;
12060      match field_id {
12061        0 => {
12062          let val = TRenewDelegationTokenResp::read_from_in_protocol(i_prot)?;
12063          f_0 = Some(val);
12064        },
12065        _ => {
12066          i_prot.skip(field_ident.field_type)?;
12067        },
12068      };
12069      i_prot.read_field_end()?;
12070    }
12071    i_prot.read_struct_end()?;
12072    let ret = TCLIServiceRenewDelegationTokenResult {
12073      result_value: f_0,
12074    };
12075    Ok(ret)
12076  }
12077  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
12078    let struct_ident = TStructIdentifier::new("TCLIServiceRenewDelegationTokenResult");
12079    o_prot.write_struct_begin(&struct_ident)?;
12080    if let Some(ref fld_var) = self.result_value {
12081      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
12082      fld_var.write_to_out_protocol(o_prot)?;
12083      o_prot.write_field_end()?
12084    }
12085    o_prot.write_field_stop()?;
12086    o_prot.write_struct_end()
12087  }
12088}
12089
12090//
12091// TCLIServiceGetQueryIdArgs
12092//
12093
12094#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12095struct TCLIServiceGetQueryIdArgs {
12096  req: TGetQueryIdReq,
12097}
12098
12099impl TCLIServiceGetQueryIdArgs {
12100  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetQueryIdArgs> {
12101    i_prot.read_struct_begin()?;
12102    let mut f_1: Option<TGetQueryIdReq> = None;
12103    loop {
12104      let field_ident = i_prot.read_field_begin()?;
12105      if field_ident.field_type == TType::Stop {
12106        break;
12107      }
12108      let field_id = field_id(&field_ident)?;
12109      match field_id {
12110        1 => {
12111          let val = TGetQueryIdReq::read_from_in_protocol(i_prot)?;
12112          f_1 = Some(val);
12113        },
12114        _ => {
12115          i_prot.skip(field_ident.field_type)?;
12116        },
12117      };
12118      i_prot.read_field_end()?;
12119    }
12120    i_prot.read_struct_end()?;
12121    verify_required_field_exists("TCLIServiceGetQueryIdArgs.req", &f_1)?;
12122    let ret = TCLIServiceGetQueryIdArgs {
12123      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
12124    };
12125    Ok(ret)
12126  }
12127  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
12128    let struct_ident = TStructIdentifier::new("GetQueryId_args");
12129    o_prot.write_struct_begin(&struct_ident)?;
12130    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
12131    self.req.write_to_out_protocol(o_prot)?;
12132    o_prot.write_field_end()?;
12133    o_prot.write_field_stop()?;
12134    o_prot.write_struct_end()
12135  }
12136}
12137
12138//
12139// TCLIServiceGetQueryIdResult
12140//
12141
12142#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12143struct TCLIServiceGetQueryIdResult {
12144  result_value: Option<TGetQueryIdResp>,
12145}
12146
12147impl TCLIServiceGetQueryIdResult {
12148  fn ok_or(self) -> thrift::Result<TGetQueryIdResp> {
12149    if self.result_value.is_some() {
12150      Ok(self.result_value.unwrap())
12151    } else {
12152      Err(
12153        thrift::Error::Application(
12154          ApplicationError::new(
12155            ApplicationErrorKind::MissingResult,
12156            "no result received for TCLIServiceGetQueryId"
12157          )
12158        )
12159      )
12160    }
12161  }
12162  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceGetQueryIdResult> {
12163    i_prot.read_struct_begin()?;
12164    let mut f_0: Option<TGetQueryIdResp> = None;
12165    loop {
12166      let field_ident = i_prot.read_field_begin()?;
12167      if field_ident.field_type == TType::Stop {
12168        break;
12169      }
12170      let field_id = field_id(&field_ident)?;
12171      match field_id {
12172        0 => {
12173          let val = TGetQueryIdResp::read_from_in_protocol(i_prot)?;
12174          f_0 = Some(val);
12175        },
12176        _ => {
12177          i_prot.skip(field_ident.field_type)?;
12178        },
12179      };
12180      i_prot.read_field_end()?;
12181    }
12182    i_prot.read_struct_end()?;
12183    let ret = TCLIServiceGetQueryIdResult {
12184      result_value: f_0,
12185    };
12186    Ok(ret)
12187  }
12188  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
12189    let struct_ident = TStructIdentifier::new("TCLIServiceGetQueryIdResult");
12190    o_prot.write_struct_begin(&struct_ident)?;
12191    if let Some(ref fld_var) = self.result_value {
12192      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
12193      fld_var.write_to_out_protocol(o_prot)?;
12194      o_prot.write_field_end()?
12195    }
12196    o_prot.write_field_stop()?;
12197    o_prot.write_struct_end()
12198  }
12199}
12200
12201//
12202// TCLIServiceSetClientInfoArgs
12203//
12204
12205#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12206struct TCLIServiceSetClientInfoArgs {
12207  req: TSetClientInfoReq,
12208}
12209
12210impl TCLIServiceSetClientInfoArgs {
12211  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceSetClientInfoArgs> {
12212    i_prot.read_struct_begin()?;
12213    let mut f_1: Option<TSetClientInfoReq> = None;
12214    loop {
12215      let field_ident = i_prot.read_field_begin()?;
12216      if field_ident.field_type == TType::Stop {
12217        break;
12218      }
12219      let field_id = field_id(&field_ident)?;
12220      match field_id {
12221        1 => {
12222          let val = TSetClientInfoReq::read_from_in_protocol(i_prot)?;
12223          f_1 = Some(val);
12224        },
12225        _ => {
12226          i_prot.skip(field_ident.field_type)?;
12227        },
12228      };
12229      i_prot.read_field_end()?;
12230    }
12231    i_prot.read_struct_end()?;
12232    verify_required_field_exists("TCLIServiceSetClientInfoArgs.req", &f_1)?;
12233    let ret = TCLIServiceSetClientInfoArgs {
12234      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
12235    };
12236    Ok(ret)
12237  }
12238  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
12239    let struct_ident = TStructIdentifier::new("SetClientInfo_args");
12240    o_prot.write_struct_begin(&struct_ident)?;
12241    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
12242    self.req.write_to_out_protocol(o_prot)?;
12243    o_prot.write_field_end()?;
12244    o_prot.write_field_stop()?;
12245    o_prot.write_struct_end()
12246  }
12247}
12248
12249//
12250// TCLIServiceSetClientInfoResult
12251//
12252
12253#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12254struct TCLIServiceSetClientInfoResult {
12255  result_value: Option<TSetClientInfoResp>,
12256}
12257
12258impl TCLIServiceSetClientInfoResult {
12259  fn ok_or(self) -> thrift::Result<TSetClientInfoResp> {
12260    if self.result_value.is_some() {
12261      Ok(self.result_value.unwrap())
12262    } else {
12263      Err(
12264        thrift::Error::Application(
12265          ApplicationError::new(
12266            ApplicationErrorKind::MissingResult,
12267            "no result received for TCLIServiceSetClientInfo"
12268          )
12269        )
12270      )
12271    }
12272  }
12273  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceSetClientInfoResult> {
12274    i_prot.read_struct_begin()?;
12275    let mut f_0: Option<TSetClientInfoResp> = None;
12276    loop {
12277      let field_ident = i_prot.read_field_begin()?;
12278      if field_ident.field_type == TType::Stop {
12279        break;
12280      }
12281      let field_id = field_id(&field_ident)?;
12282      match field_id {
12283        0 => {
12284          let val = TSetClientInfoResp::read_from_in_protocol(i_prot)?;
12285          f_0 = Some(val);
12286        },
12287        _ => {
12288          i_prot.skip(field_ident.field_type)?;
12289        },
12290      };
12291      i_prot.read_field_end()?;
12292    }
12293    i_prot.read_struct_end()?;
12294    let ret = TCLIServiceSetClientInfoResult {
12295      result_value: f_0,
12296    };
12297    Ok(ret)
12298  }
12299  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
12300    let struct_ident = TStructIdentifier::new("TCLIServiceSetClientInfoResult");
12301    o_prot.write_struct_begin(&struct_ident)?;
12302    if let Some(ref fld_var) = self.result_value {
12303      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
12304      fld_var.write_to_out_protocol(o_prot)?;
12305      o_prot.write_field_end()?
12306    }
12307    o_prot.write_field_stop()?;
12308    o_prot.write_struct_end()
12309  }
12310}
12311
12312//
12313// TCLIServiceUploadDataArgs
12314//
12315
12316#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12317struct TCLIServiceUploadDataArgs {
12318  req: TUploadDataReq,
12319}
12320
12321impl TCLIServiceUploadDataArgs {
12322  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceUploadDataArgs> {
12323    i_prot.read_struct_begin()?;
12324    let mut f_1: Option<TUploadDataReq> = None;
12325    loop {
12326      let field_ident = i_prot.read_field_begin()?;
12327      if field_ident.field_type == TType::Stop {
12328        break;
12329      }
12330      let field_id = field_id(&field_ident)?;
12331      match field_id {
12332        1 => {
12333          let val = TUploadDataReq::read_from_in_protocol(i_prot)?;
12334          f_1 = Some(val);
12335        },
12336        _ => {
12337          i_prot.skip(field_ident.field_type)?;
12338        },
12339      };
12340      i_prot.read_field_end()?;
12341    }
12342    i_prot.read_struct_end()?;
12343    verify_required_field_exists("TCLIServiceUploadDataArgs.req", &f_1)?;
12344    let ret = TCLIServiceUploadDataArgs {
12345      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
12346    };
12347    Ok(ret)
12348  }
12349  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
12350    let struct_ident = TStructIdentifier::new("UploadData_args");
12351    o_prot.write_struct_begin(&struct_ident)?;
12352    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
12353    self.req.write_to_out_protocol(o_prot)?;
12354    o_prot.write_field_end()?;
12355    o_prot.write_field_stop()?;
12356    o_prot.write_struct_end()
12357  }
12358}
12359
12360//
12361// TCLIServiceUploadDataResult
12362//
12363
12364#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12365struct TCLIServiceUploadDataResult {
12366  result_value: Option<TUploadDataResp>,
12367}
12368
12369impl TCLIServiceUploadDataResult {
12370  fn ok_or(self) -> thrift::Result<TUploadDataResp> {
12371    if self.result_value.is_some() {
12372      Ok(self.result_value.unwrap())
12373    } else {
12374      Err(
12375        thrift::Error::Application(
12376          ApplicationError::new(
12377            ApplicationErrorKind::MissingResult,
12378            "no result received for TCLIServiceUploadData"
12379          )
12380        )
12381      )
12382    }
12383  }
12384  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceUploadDataResult> {
12385    i_prot.read_struct_begin()?;
12386    let mut f_0: Option<TUploadDataResp> = None;
12387    loop {
12388      let field_ident = i_prot.read_field_begin()?;
12389      if field_ident.field_type == TType::Stop {
12390        break;
12391      }
12392      let field_id = field_id(&field_ident)?;
12393      match field_id {
12394        0 => {
12395          let val = TUploadDataResp::read_from_in_protocol(i_prot)?;
12396          f_0 = Some(val);
12397        },
12398        _ => {
12399          i_prot.skip(field_ident.field_type)?;
12400        },
12401      };
12402      i_prot.read_field_end()?;
12403    }
12404    i_prot.read_struct_end()?;
12405    let ret = TCLIServiceUploadDataResult {
12406      result_value: f_0,
12407    };
12408    Ok(ret)
12409  }
12410  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
12411    let struct_ident = TStructIdentifier::new("TCLIServiceUploadDataResult");
12412    o_prot.write_struct_begin(&struct_ident)?;
12413    if let Some(ref fld_var) = self.result_value {
12414      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
12415      fld_var.write_to_out_protocol(o_prot)?;
12416      o_prot.write_field_end()?
12417    }
12418    o_prot.write_field_stop()?;
12419    o_prot.write_struct_end()
12420  }
12421}
12422
12423//
12424// TCLIServiceDownloadDataArgs
12425//
12426
12427#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12428struct TCLIServiceDownloadDataArgs {
12429  req: TDownloadDataReq,
12430}
12431
12432impl TCLIServiceDownloadDataArgs {
12433  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceDownloadDataArgs> {
12434    i_prot.read_struct_begin()?;
12435    let mut f_1: Option<TDownloadDataReq> = None;
12436    loop {
12437      let field_ident = i_prot.read_field_begin()?;
12438      if field_ident.field_type == TType::Stop {
12439        break;
12440      }
12441      let field_id = field_id(&field_ident)?;
12442      match field_id {
12443        1 => {
12444          let val = TDownloadDataReq::read_from_in_protocol(i_prot)?;
12445          f_1 = Some(val);
12446        },
12447        _ => {
12448          i_prot.skip(field_ident.field_type)?;
12449        },
12450      };
12451      i_prot.read_field_end()?;
12452    }
12453    i_prot.read_struct_end()?;
12454    verify_required_field_exists("TCLIServiceDownloadDataArgs.req", &f_1)?;
12455    let ret = TCLIServiceDownloadDataArgs {
12456      req: f_1.expect("auto-generated code should have checked for presence of required fields"),
12457    };
12458    Ok(ret)
12459  }
12460  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
12461    let struct_ident = TStructIdentifier::new("DownloadData_args");
12462    o_prot.write_struct_begin(&struct_ident)?;
12463    o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
12464    self.req.write_to_out_protocol(o_prot)?;
12465    o_prot.write_field_end()?;
12466    o_prot.write_field_stop()?;
12467    o_prot.write_struct_end()
12468  }
12469}
12470
12471//
12472// TCLIServiceDownloadDataResult
12473//
12474
12475#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12476struct TCLIServiceDownloadDataResult {
12477  result_value: Option<TDownloadDataResp>,
12478}
12479
12480impl TCLIServiceDownloadDataResult {
12481  fn ok_or(self) -> thrift::Result<TDownloadDataResp> {
12482    if self.result_value.is_some() {
12483      Ok(self.result_value.unwrap())
12484    } else {
12485      Err(
12486        thrift::Error::Application(
12487          ApplicationError::new(
12488            ApplicationErrorKind::MissingResult,
12489            "no result received for TCLIServiceDownloadData"
12490          )
12491        )
12492      )
12493    }
12494  }
12495  fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCLIServiceDownloadDataResult> {
12496    i_prot.read_struct_begin()?;
12497    let mut f_0: Option<TDownloadDataResp> = None;
12498    loop {
12499      let field_ident = i_prot.read_field_begin()?;
12500      if field_ident.field_type == TType::Stop {
12501        break;
12502      }
12503      let field_id = field_id(&field_ident)?;
12504      match field_id {
12505        0 => {
12506          let val = TDownloadDataResp::read_from_in_protocol(i_prot)?;
12507          f_0 = Some(val);
12508        },
12509        _ => {
12510          i_prot.skip(field_ident.field_type)?;
12511        },
12512      };
12513      i_prot.read_field_end()?;
12514    }
12515    i_prot.read_struct_end()?;
12516    let ret = TCLIServiceDownloadDataResult {
12517      result_value: f_0,
12518    };
12519    Ok(ret)
12520  }
12521  fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
12522    let struct_ident = TStructIdentifier::new("TCLIServiceDownloadDataResult");
12523    o_prot.write_struct_begin(&struct_ident)?;
12524    if let Some(ref fld_var) = self.result_value {
12525      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
12526      fld_var.write_to_out_protocol(o_prot)?;
12527      o_prot.write_field_end()?
12528    }
12529    o_prot.write_field_stop()?;
12530    o_prot.write_struct_end()
12531  }
12532}
12533