1#![allow(unused_imports)]
5#![allow(unused_extern_crates)]
6#![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments, type_complexity))]
7#![cfg_attr(rustfmt, rustfmt_skip)]
8
9extern crate thrift;
10
11use thrift::OrderedFloat;
12use std::cell::RefCell;
13use std::collections::{BTreeMap, BTreeSet};
14use std::convert::{From, TryFrom};
15use std::default::Default;
16use std::error::Error;
17use std::fmt;
18use std::fmt::{Display, Formatter};
19use std::rc::Rc;
20
21use thrift::{ApplicationError, ApplicationErrorKind, ProtocolError, ProtocolErrorKind, TThriftClient};
22use thrift::protocol::{TFieldIdentifier, TListIdentifier, TMapIdentifier, TMessageIdentifier, TMessageType, TInputProtocol, TOutputProtocol, TSetIdentifier, TStructIdentifier, TType};
23use thrift::protocol::field_id;
24use thrift::protocol::verify_expected_message_type;
25use thrift::protocol::verify_expected_sequence_number;
26use thrift::protocol::verify_expected_service_call;
27use thrift::protocol::verify_required_field_exists;
28use thrift::server::TProcessor;
29
30#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31pub enum TSProtocolVersion {
32 IotdbServiceProtocolV1 = 0,
33 IotdbServiceProtocolV2 = 1,
34 IotdbServiceProtocolV3 = 2,
35}
36
37impl TSProtocolVersion {
38 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
39 o_prot.write_i32(*self as i32)
40 }
41 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSProtocolVersion> {
42 let enum_value = i_prot.read_i32()?;
43 TSProtocolVersion::try_from(enum_value) }
44}
45
46impl TryFrom<i32> for TSProtocolVersion {
47 type Error = thrift::Error; fn try_from(i: i32) -> Result<Self, Self::Error> {
48 match i {
49 0 => Ok(TSProtocolVersion::IotdbServiceProtocolV1),
50 1 => Ok(TSProtocolVersion::IotdbServiceProtocolV2),
51 2 => Ok(TSProtocolVersion::IotdbServiceProtocolV3),
52 _ => {
53 Err(
54 thrift::Error::Protocol(
55 ProtocolError::new(
56 ProtocolErrorKind::InvalidData,
57 format!("cannot convert enum constant {} to TSProtocolVersion", i)
58 )
59 )
60 )
61 },
62 }
63 }
64}
65
66#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
71pub struct EndPoint {
72 pub ip: String,
73 pub port: i32,
74}
75
76impl EndPoint {
77 pub fn new(ip: String, port: i32) -> EndPoint {
78 EndPoint {
79 ip: ip,
80 port: port,
81 }
82 }
83 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<EndPoint> {
84 i_prot.read_struct_begin()?;
85 let mut f_1: Option<String> = None;
86 let mut f_2: Option<i32> = None;
87 loop {
88 let field_ident = i_prot.read_field_begin()?;
89 if field_ident.field_type == TType::Stop {
90 break;
91 }
92 let field_id = field_id(&field_ident)?;
93 match field_id {
94 1 => {
95 let val = i_prot.read_string()?;
96 f_1 = Some(val);
97 },
98 2 => {
99 let val = i_prot.read_i32()?;
100 f_2 = Some(val);
101 },
102 _ => {
103 i_prot.skip(field_ident.field_type)?;
104 },
105 };
106 i_prot.read_field_end()?;
107 }
108 i_prot.read_struct_end()?;
109 verify_required_field_exists("EndPoint.ip", &f_1)?;
110 verify_required_field_exists("EndPoint.port", &f_2)?;
111 let ret = EndPoint {
112 ip: f_1.expect("auto-generated code should have checked for presence of required fields"),
113 port: f_2.expect("auto-generated code should have checked for presence of required fields"),
114 };
115 Ok(ret)
116 }
117 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
118 let struct_ident = TStructIdentifier::new("EndPoint");
119 o_prot.write_struct_begin(&struct_ident)?;
120 o_prot.write_field_begin(&TFieldIdentifier::new("ip", TType::String, 1))?;
121 o_prot.write_string(&self.ip)?;
122 o_prot.write_field_end()?;
123 o_prot.write_field_begin(&TFieldIdentifier::new("port", TType::I32, 2))?;
124 o_prot.write_i32(self.port)?;
125 o_prot.write_field_end()?;
126 o_prot.write_field_stop()?;
127 o_prot.write_struct_end()
128 }
129}
130
131#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
136pub struct TSStatus {
137 pub code: i32,
138 pub message: Option<String>,
139 pub sub_status: Option<Vec<Box<TSStatus>>>,
140 pub redirect_node: Option<EndPoint>,
141}
142
143impl TSStatus {
144 pub fn new<F2, F3, F4>(code: i32, message: F2, sub_status: F3, redirect_node: F4) -> TSStatus where F2: Into<Option<String>>, F3: Into<Option<Vec<Box<TSStatus>>>>, F4: Into<Option<EndPoint>> {
145 TSStatus {
146 code: code,
147 message: message.into(),
148 sub_status: sub_status.into(),
149 redirect_node: redirect_node.into(),
150 }
151 }
152 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSStatus> {
153 i_prot.read_struct_begin()?;
154 let mut f_1: Option<i32> = None;
155 let mut f_2: Option<String> = None;
156 let mut f_3: Option<Vec<Box<TSStatus>>> = None;
157 let mut f_4: Option<EndPoint> = None;
158 loop {
159 let field_ident = i_prot.read_field_begin()?;
160 if field_ident.field_type == TType::Stop {
161 break;
162 }
163 let field_id = field_id(&field_ident)?;
164 match field_id {
165 1 => {
166 let val = i_prot.read_i32()?;
167 f_1 = Some(val);
168 },
169 2 => {
170 let val = i_prot.read_string()?;
171 f_2 = Some(val);
172 },
173 3 => {
174 let list_ident = i_prot.read_list_begin()?;
175 let mut val: Vec<Box<TSStatus>> = Vec::with_capacity(list_ident.size as usize);
176 for _ in 0..list_ident.size {
177 let list_elem_0 = Box::new(TSStatus::read_from_in_protocol(i_prot)?);
178 val.push(list_elem_0);
179 }
180 i_prot.read_list_end()?;
181 f_3 = Some(val);
182 },
183 4 => {
184 let val = EndPoint::read_from_in_protocol(i_prot)?;
185 f_4 = Some(val);
186 },
187 _ => {
188 i_prot.skip(field_ident.field_type)?;
189 },
190 };
191 i_prot.read_field_end()?;
192 }
193 i_prot.read_struct_end()?;
194 verify_required_field_exists("TSStatus.code", &f_1)?;
195 let ret = TSStatus {
196 code: f_1.expect("auto-generated code should have checked for presence of required fields"),
197 message: f_2,
198 sub_status: f_3,
199 redirect_node: f_4,
200 };
201 Ok(ret)
202 }
203 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
204 let struct_ident = TStructIdentifier::new("TSStatus");
205 o_prot.write_struct_begin(&struct_ident)?;
206 o_prot.write_field_begin(&TFieldIdentifier::new("code", TType::I32, 1))?;
207 o_prot.write_i32(self.code)?;
208 o_prot.write_field_end()?;
209 if let Some(ref fld_var) = self.message {
210 o_prot.write_field_begin(&TFieldIdentifier::new("message", TType::String, 2))?;
211 o_prot.write_string(fld_var)?;
212 o_prot.write_field_end()?;
213 ()
214 } else {
215 ()
216 }
217 if let Some(ref fld_var) = self.sub_status {
218 o_prot.write_field_begin(&TFieldIdentifier::new("subStatus", TType::List, 3))?;
219 o_prot.write_list_begin(&TListIdentifier::new(TType::Struct, fld_var.len() as i32))?;
220 for e in fld_var {
221 e.write_to_out_protocol(o_prot)?;
222 o_prot.write_list_end()?;
223 }
224 o_prot.write_field_end()?;
225 ()
226 } else {
227 ()
228 }
229 if let Some(ref fld_var) = self.redirect_node {
230 o_prot.write_field_begin(&TFieldIdentifier::new("redirectNode", TType::Struct, 4))?;
231 fld_var.write_to_out_protocol(o_prot)?;
232 o_prot.write_field_end()?;
233 ()
234 } else {
235 ()
236 }
237 o_prot.write_field_stop()?;
238 o_prot.write_struct_end()
239 }
240}
241
242#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
247pub struct TSQueryDataSet {
248 pub time: Vec<u8>,
249 pub value_list: Vec<Vec<u8>>,
250 pub bitmap_list: Vec<Vec<u8>>,
251}
252
253impl TSQueryDataSet {
254 pub fn new(time: Vec<u8>, value_list: Vec<Vec<u8>>, bitmap_list: Vec<Vec<u8>>) -> TSQueryDataSet {
255 TSQueryDataSet {
256 time: time,
257 value_list: value_list,
258 bitmap_list: bitmap_list,
259 }
260 }
261 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSQueryDataSet> {
262 i_prot.read_struct_begin()?;
263 let mut f_1: Option<Vec<u8>> = None;
264 let mut f_2: Option<Vec<Vec<u8>>> = None;
265 let mut f_3: Option<Vec<Vec<u8>>> = None;
266 loop {
267 let field_ident = i_prot.read_field_begin()?;
268 if field_ident.field_type == TType::Stop {
269 break;
270 }
271 let field_id = field_id(&field_ident)?;
272 match field_id {
273 1 => {
274 let val = i_prot.read_bytes()?;
275 f_1 = Some(val);
276 },
277 2 => {
278 let list_ident = i_prot.read_list_begin()?;
279 let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize);
280 for _ in 0..list_ident.size {
281 let list_elem_1 = i_prot.read_bytes()?;
282 val.push(list_elem_1);
283 }
284 i_prot.read_list_end()?;
285 f_2 = Some(val);
286 },
287 3 => {
288 let list_ident = i_prot.read_list_begin()?;
289 let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize);
290 for _ in 0..list_ident.size {
291 let list_elem_2 = i_prot.read_bytes()?;
292 val.push(list_elem_2);
293 }
294 i_prot.read_list_end()?;
295 f_3 = Some(val);
296 },
297 _ => {
298 i_prot.skip(field_ident.field_type)?;
299 },
300 };
301 i_prot.read_field_end()?;
302 }
303 i_prot.read_struct_end()?;
304 verify_required_field_exists("TSQueryDataSet.time", &f_1)?;
305 verify_required_field_exists("TSQueryDataSet.value_list", &f_2)?;
306 verify_required_field_exists("TSQueryDataSet.bitmap_list", &f_3)?;
307 let ret = TSQueryDataSet {
308 time: f_1.expect("auto-generated code should have checked for presence of required fields"),
309 value_list: f_2.expect("auto-generated code should have checked for presence of required fields"),
310 bitmap_list: f_3.expect("auto-generated code should have checked for presence of required fields"),
311 };
312 Ok(ret)
313 }
314 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
315 let struct_ident = TStructIdentifier::new("TSQueryDataSet");
316 o_prot.write_struct_begin(&struct_ident)?;
317 o_prot.write_field_begin(&TFieldIdentifier::new("time", TType::String, 1))?;
318 o_prot.write_bytes(&self.time)?;
319 o_prot.write_field_end()?;
320 o_prot.write_field_begin(&TFieldIdentifier::new("valueList", TType::List, 2))?;
321 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.value_list.len() as i32))?;
322 for e in &self.value_list {
323 o_prot.write_bytes(e)?;
324 o_prot.write_list_end()?;
325 }
326 o_prot.write_field_end()?;
327 o_prot.write_field_begin(&TFieldIdentifier::new("bitmapList", TType::List, 3))?;
328 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.bitmap_list.len() as i32))?;
329 for e in &self.bitmap_list {
330 o_prot.write_bytes(e)?;
331 o_prot.write_list_end()?;
332 }
333 o_prot.write_field_end()?;
334 o_prot.write_field_stop()?;
335 o_prot.write_struct_end()
336 }
337}
338
339#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
344pub struct TSQueryNonAlignDataSet {
345 pub time_list: Vec<Vec<u8>>,
346 pub value_list: Vec<Vec<u8>>,
347}
348
349impl TSQueryNonAlignDataSet {
350 pub fn new(time_list: Vec<Vec<u8>>, value_list: Vec<Vec<u8>>) -> TSQueryNonAlignDataSet {
351 TSQueryNonAlignDataSet {
352 time_list: time_list,
353 value_list: value_list,
354 }
355 }
356 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSQueryNonAlignDataSet> {
357 i_prot.read_struct_begin()?;
358 let mut f_1: Option<Vec<Vec<u8>>> = None;
359 let mut f_2: Option<Vec<Vec<u8>>> = None;
360 loop {
361 let field_ident = i_prot.read_field_begin()?;
362 if field_ident.field_type == TType::Stop {
363 break;
364 }
365 let field_id = field_id(&field_ident)?;
366 match field_id {
367 1 => {
368 let list_ident = i_prot.read_list_begin()?;
369 let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize);
370 for _ in 0..list_ident.size {
371 let list_elem_3 = i_prot.read_bytes()?;
372 val.push(list_elem_3);
373 }
374 i_prot.read_list_end()?;
375 f_1 = Some(val);
376 },
377 2 => {
378 let list_ident = i_prot.read_list_begin()?;
379 let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize);
380 for _ in 0..list_ident.size {
381 let list_elem_4 = i_prot.read_bytes()?;
382 val.push(list_elem_4);
383 }
384 i_prot.read_list_end()?;
385 f_2 = Some(val);
386 },
387 _ => {
388 i_prot.skip(field_ident.field_type)?;
389 },
390 };
391 i_prot.read_field_end()?;
392 }
393 i_prot.read_struct_end()?;
394 verify_required_field_exists("TSQueryNonAlignDataSet.time_list", &f_1)?;
395 verify_required_field_exists("TSQueryNonAlignDataSet.value_list", &f_2)?;
396 let ret = TSQueryNonAlignDataSet {
397 time_list: f_1.expect("auto-generated code should have checked for presence of required fields"),
398 value_list: f_2.expect("auto-generated code should have checked for presence of required fields"),
399 };
400 Ok(ret)
401 }
402 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
403 let struct_ident = TStructIdentifier::new("TSQueryNonAlignDataSet");
404 o_prot.write_struct_begin(&struct_ident)?;
405 o_prot.write_field_begin(&TFieldIdentifier::new("timeList", TType::List, 1))?;
406 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.time_list.len() as i32))?;
407 for e in &self.time_list {
408 o_prot.write_bytes(e)?;
409 o_prot.write_list_end()?;
410 }
411 o_prot.write_field_end()?;
412 o_prot.write_field_begin(&TFieldIdentifier::new("valueList", TType::List, 2))?;
413 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.value_list.len() as i32))?;
414 for e in &self.value_list {
415 o_prot.write_bytes(e)?;
416 o_prot.write_list_end()?;
417 }
418 o_prot.write_field_end()?;
419 o_prot.write_field_stop()?;
420 o_prot.write_struct_end()
421 }
422}
423
424#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
429pub struct TSExecuteStatementResp {
430 pub status: TSStatus,
431 pub query_id: Option<i64>,
432 pub columns: Option<Vec<String>>,
433 pub operation_type: Option<String>,
434 pub ignore_time_stamp: Option<bool>,
435 pub data_type_list: Option<Vec<String>>,
436 pub query_data_set: Option<TSQueryDataSet>,
437 pub non_align_query_data_set: Option<TSQueryNonAlignDataSet>,
438 pub column_name_index_map: Option<BTreeMap<String, i32>>,
439}
440
441impl TSExecuteStatementResp {
442 pub fn new<F2, F3, F4, F5, F6, F7, F8, F9>(status: TSStatus, query_id: F2, columns: F3, operation_type: F4, ignore_time_stamp: F5, data_type_list: F6, query_data_set: F7, non_align_query_data_set: F8, column_name_index_map: F9) -> TSExecuteStatementResp where F2: Into<Option<i64>>, F3: Into<Option<Vec<String>>>, F4: Into<Option<String>>, F5: Into<Option<bool>>, F6: Into<Option<Vec<String>>>, F7: Into<Option<TSQueryDataSet>>, F8: Into<Option<TSQueryNonAlignDataSet>>, F9: Into<Option<BTreeMap<String, i32>>> {
443 TSExecuteStatementResp {
444 status: status,
445 query_id: query_id.into(),
446 columns: columns.into(),
447 operation_type: operation_type.into(),
448 ignore_time_stamp: ignore_time_stamp.into(),
449 data_type_list: data_type_list.into(),
450 query_data_set: query_data_set.into(),
451 non_align_query_data_set: non_align_query_data_set.into(),
452 column_name_index_map: column_name_index_map.into(),
453 }
454 }
455 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSExecuteStatementResp> {
456 i_prot.read_struct_begin()?;
457 let mut f_1: Option<TSStatus> = None;
458 let mut f_2: Option<i64> = None;
459 let mut f_3: Option<Vec<String>> = None;
460 let mut f_4: Option<String> = None;
461 let mut f_5: Option<bool> = None;
462 let mut f_6: Option<Vec<String>> = None;
463 let mut f_7: Option<TSQueryDataSet> = None;
464 let mut f_8: Option<TSQueryNonAlignDataSet> = None;
465 let mut f_9: Option<BTreeMap<String, i32>> = None;
466 loop {
467 let field_ident = i_prot.read_field_begin()?;
468 if field_ident.field_type == TType::Stop {
469 break;
470 }
471 let field_id = field_id(&field_ident)?;
472 match field_id {
473 1 => {
474 let val = TSStatus::read_from_in_protocol(i_prot)?;
475 f_1 = Some(val);
476 },
477 2 => {
478 let val = i_prot.read_i64()?;
479 f_2 = Some(val);
480 },
481 3 => {
482 let list_ident = i_prot.read_list_begin()?;
483 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
484 for _ in 0..list_ident.size {
485 let list_elem_5 = i_prot.read_string()?;
486 val.push(list_elem_5);
487 }
488 i_prot.read_list_end()?;
489 f_3 = Some(val);
490 },
491 4 => {
492 let val = i_prot.read_string()?;
493 f_4 = Some(val);
494 },
495 5 => {
496 let val = i_prot.read_bool()?;
497 f_5 = Some(val);
498 },
499 6 => {
500 let list_ident = i_prot.read_list_begin()?;
501 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
502 for _ in 0..list_ident.size {
503 let list_elem_6 = i_prot.read_string()?;
504 val.push(list_elem_6);
505 }
506 i_prot.read_list_end()?;
507 f_6 = Some(val);
508 },
509 7 => {
510 let val = TSQueryDataSet::read_from_in_protocol(i_prot)?;
511 f_7 = Some(val);
512 },
513 8 => {
514 let val = TSQueryNonAlignDataSet::read_from_in_protocol(i_prot)?;
515 f_8 = Some(val);
516 },
517 9 => {
518 let map_ident = i_prot.read_map_begin()?;
519 let mut val: BTreeMap<String, i32> = BTreeMap::new();
520 for _ in 0..map_ident.size {
521 let map_key_7 = i_prot.read_string()?;
522 let map_val_8 = i_prot.read_i32()?;
523 val.insert(map_key_7, map_val_8);
524 }
525 i_prot.read_map_end()?;
526 f_9 = Some(val);
527 },
528 _ => {
529 i_prot.skip(field_ident.field_type)?;
530 },
531 };
532 i_prot.read_field_end()?;
533 }
534 i_prot.read_struct_end()?;
535 verify_required_field_exists("TSExecuteStatementResp.status", &f_1)?;
536 let ret = TSExecuteStatementResp {
537 status: f_1.expect("auto-generated code should have checked for presence of required fields"),
538 query_id: f_2,
539 columns: f_3,
540 operation_type: f_4,
541 ignore_time_stamp: f_5,
542 data_type_list: f_6,
543 query_data_set: f_7,
544 non_align_query_data_set: f_8,
545 column_name_index_map: f_9,
546 };
547 Ok(ret)
548 }
549 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
550 let struct_ident = TStructIdentifier::new("TSExecuteStatementResp");
551 o_prot.write_struct_begin(&struct_ident)?;
552 o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
553 self.status.write_to_out_protocol(o_prot)?;
554 o_prot.write_field_end()?;
555 if let Some(fld_var) = self.query_id {
556 o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::I64, 2))?;
557 o_prot.write_i64(fld_var)?;
558 o_prot.write_field_end()?;
559 ()
560 } else {
561 ()
562 }
563 if let Some(ref fld_var) = self.columns {
564 o_prot.write_field_begin(&TFieldIdentifier::new("columns", TType::List, 3))?;
565 o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?;
566 for e in fld_var {
567 o_prot.write_string(e)?;
568 o_prot.write_list_end()?;
569 }
570 o_prot.write_field_end()?;
571 ()
572 } else {
573 ()
574 }
575 if let Some(ref fld_var) = self.operation_type {
576 o_prot.write_field_begin(&TFieldIdentifier::new("operationType", TType::String, 4))?;
577 o_prot.write_string(fld_var)?;
578 o_prot.write_field_end()?;
579 ()
580 } else {
581 ()
582 }
583 if let Some(fld_var) = self.ignore_time_stamp {
584 o_prot.write_field_begin(&TFieldIdentifier::new("ignoreTimeStamp", TType::Bool, 5))?;
585 o_prot.write_bool(fld_var)?;
586 o_prot.write_field_end()?;
587 ()
588 } else {
589 ()
590 }
591 if let Some(ref fld_var) = self.data_type_list {
592 o_prot.write_field_begin(&TFieldIdentifier::new("dataTypeList", TType::List, 6))?;
593 o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?;
594 for e in fld_var {
595 o_prot.write_string(e)?;
596 o_prot.write_list_end()?;
597 }
598 o_prot.write_field_end()?;
599 ()
600 } else {
601 ()
602 }
603 if let Some(ref fld_var) = self.query_data_set {
604 o_prot.write_field_begin(&TFieldIdentifier::new("queryDataSet", TType::Struct, 7))?;
605 fld_var.write_to_out_protocol(o_prot)?;
606 o_prot.write_field_end()?;
607 ()
608 } else {
609 ()
610 }
611 if let Some(ref fld_var) = self.non_align_query_data_set {
612 o_prot.write_field_begin(&TFieldIdentifier::new("nonAlignQueryDataSet", TType::Struct, 8))?;
613 fld_var.write_to_out_protocol(o_prot)?;
614 o_prot.write_field_end()?;
615 ()
616 } else {
617 ()
618 }
619 if let Some(ref fld_var) = self.column_name_index_map {
620 o_prot.write_field_begin(&TFieldIdentifier::new("columnNameIndexMap", TType::Map, 9))?;
621 o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::I32, fld_var.len() as i32))?;
622 for (k, v) in fld_var {
623 o_prot.write_string(k)?;
624 o_prot.write_i32(*v)?;
625 o_prot.write_map_end()?;
626 }
627 o_prot.write_field_end()?;
628 ()
629 } else {
630 ()
631 }
632 o_prot.write_field_stop()?;
633 o_prot.write_struct_end()
634 }
635}
636
637#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
642pub struct TSOpenSessionResp {
643 pub status: TSStatus,
644 pub server_protocol_version: TSProtocolVersion,
645 pub session_id: Option<i64>,
646 pub configuration: Option<BTreeMap<String, String>>,
647}
648
649impl TSOpenSessionResp {
650 pub fn new<F3, F4>(status: TSStatus, server_protocol_version: TSProtocolVersion, session_id: F3, configuration: F4) -> TSOpenSessionResp where F3: Into<Option<i64>>, F4: Into<Option<BTreeMap<String, String>>> {
651 TSOpenSessionResp {
652 status: status,
653 server_protocol_version: server_protocol_version,
654 session_id: session_id.into(),
655 configuration: configuration.into(),
656 }
657 }
658 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSOpenSessionResp> {
659 i_prot.read_struct_begin()?;
660 let mut f_1: Option<TSStatus> = None;
661 let mut f_2: Option<TSProtocolVersion> = None;
662 let mut f_3: Option<i64> = None;
663 let mut f_4: Option<BTreeMap<String, String>> = None;
664 loop {
665 let field_ident = i_prot.read_field_begin()?;
666 if field_ident.field_type == TType::Stop {
667 break;
668 }
669 let field_id = field_id(&field_ident)?;
670 match field_id {
671 1 => {
672 let val = TSStatus::read_from_in_protocol(i_prot)?;
673 f_1 = Some(val);
674 },
675 2 => {
676 let val = TSProtocolVersion::read_from_in_protocol(i_prot)?;
677 f_2 = Some(val);
678 },
679 3 => {
680 let val = i_prot.read_i64()?;
681 f_3 = Some(val);
682 },
683 4 => {
684 let map_ident = i_prot.read_map_begin()?;
685 let mut val: BTreeMap<String, String> = BTreeMap::new();
686 for _ in 0..map_ident.size {
687 let map_key_9 = i_prot.read_string()?;
688 let map_val_10 = i_prot.read_string()?;
689 val.insert(map_key_9, map_val_10);
690 }
691 i_prot.read_map_end()?;
692 f_4 = Some(val);
693 },
694 _ => {
695 i_prot.skip(field_ident.field_type)?;
696 },
697 };
698 i_prot.read_field_end()?;
699 }
700 i_prot.read_struct_end()?;
701 verify_required_field_exists("TSOpenSessionResp.status", &f_1)?;
702 verify_required_field_exists("TSOpenSessionResp.server_protocol_version", &f_2)?;
703 let ret = TSOpenSessionResp {
704 status: f_1.expect("auto-generated code should have checked for presence of required fields"),
705 server_protocol_version: f_2.expect("auto-generated code should have checked for presence of required fields"),
706 session_id: f_3,
707 configuration: f_4,
708 };
709 Ok(ret)
710 }
711 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
712 let struct_ident = TStructIdentifier::new("TSOpenSessionResp");
713 o_prot.write_struct_begin(&struct_ident)?;
714 o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
715 self.status.write_to_out_protocol(o_prot)?;
716 o_prot.write_field_end()?;
717 o_prot.write_field_begin(&TFieldIdentifier::new("serverProtocolVersion", TType::I32, 2))?;
718 self.server_protocol_version.write_to_out_protocol(o_prot)?;
719 o_prot.write_field_end()?;
720 if let Some(fld_var) = self.session_id {
721 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 3))?;
722 o_prot.write_i64(fld_var)?;
723 o_prot.write_field_end()?;
724 ()
725 } else {
726 ()
727 }
728 if let Some(ref fld_var) = self.configuration {
729 o_prot.write_field_begin(&TFieldIdentifier::new("configuration", TType::Map, 4))?;
730 o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?;
731 for (k, v) in fld_var {
732 o_prot.write_string(k)?;
733 o_prot.write_string(v)?;
734 o_prot.write_map_end()?;
735 }
736 o_prot.write_field_end()?;
737 ()
738 } else {
739 ()
740 }
741 o_prot.write_field_stop()?;
742 o_prot.write_struct_end()
743 }
744}
745
746#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
751pub struct TSOpenSessionReq {
752 pub client_protocol: TSProtocolVersion,
753 pub zone_id: String,
754 pub username: Option<String>,
755 pub password: Option<String>,
756 pub configuration: Option<BTreeMap<String, String>>,
757}
758
759impl TSOpenSessionReq {
760 pub fn new<F3, F4, F5>(client_protocol: TSProtocolVersion, zone_id: String, username: F3, password: F4, configuration: F5) -> TSOpenSessionReq where F3: Into<Option<String>>, F4: Into<Option<String>>, F5: Into<Option<BTreeMap<String, String>>> {
761 TSOpenSessionReq {
762 client_protocol: client_protocol,
763 zone_id: zone_id,
764 username: username.into(),
765 password: password.into(),
766 configuration: configuration.into(),
767 }
768 }
769 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSOpenSessionReq> {
770 i_prot.read_struct_begin()?;
771 let mut f_1: Option<TSProtocolVersion> = None;
772 let mut f_2: Option<String> = None;
773 let mut f_3: Option<String> = None;
774 let mut f_4: Option<String> = None;
775 let mut f_5: Option<BTreeMap<String, String>> = None;
776 loop {
777 let field_ident = i_prot.read_field_begin()?;
778 if field_ident.field_type == TType::Stop {
779 break;
780 }
781 let field_id = field_id(&field_ident)?;
782 match field_id {
783 1 => {
784 let val = TSProtocolVersion::read_from_in_protocol(i_prot)?;
785 f_1 = Some(val);
786 },
787 2 => {
788 let val = i_prot.read_string()?;
789 f_2 = Some(val);
790 },
791 3 => {
792 let val = i_prot.read_string()?;
793 f_3 = Some(val);
794 },
795 4 => {
796 let val = i_prot.read_string()?;
797 f_4 = Some(val);
798 },
799 5 => {
800 let map_ident = i_prot.read_map_begin()?;
801 let mut val: BTreeMap<String, String> = BTreeMap::new();
802 for _ in 0..map_ident.size {
803 let map_key_11 = i_prot.read_string()?;
804 let map_val_12 = i_prot.read_string()?;
805 val.insert(map_key_11, map_val_12);
806 }
807 i_prot.read_map_end()?;
808 f_5 = Some(val);
809 },
810 _ => {
811 i_prot.skip(field_ident.field_type)?;
812 },
813 };
814 i_prot.read_field_end()?;
815 }
816 i_prot.read_struct_end()?;
817 verify_required_field_exists("TSOpenSessionReq.client_protocol", &f_1)?;
818 verify_required_field_exists("TSOpenSessionReq.zone_id", &f_2)?;
819 let ret = TSOpenSessionReq {
820 client_protocol: f_1.expect("auto-generated code should have checked for presence of required fields"),
821 zone_id: f_2.expect("auto-generated code should have checked for presence of required fields"),
822 username: f_3,
823 password: f_4,
824 configuration: f_5,
825 };
826 Ok(ret)
827 }
828 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
829 let struct_ident = TStructIdentifier::new("TSOpenSessionReq");
830 o_prot.write_struct_begin(&struct_ident)?;
831 o_prot.write_field_begin(&TFieldIdentifier::new("client_protocol", TType::I32, 1))?;
832 self.client_protocol.write_to_out_protocol(o_prot)?;
833 o_prot.write_field_end()?;
834 o_prot.write_field_begin(&TFieldIdentifier::new("zoneId", TType::String, 2))?;
835 o_prot.write_string(&self.zone_id)?;
836 o_prot.write_field_end()?;
837 if let Some(ref fld_var) = self.username {
838 o_prot.write_field_begin(&TFieldIdentifier::new("username", TType::String, 3))?;
839 o_prot.write_string(fld_var)?;
840 o_prot.write_field_end()?;
841 ()
842 } else {
843 ()
844 }
845 if let Some(ref fld_var) = self.password {
846 o_prot.write_field_begin(&TFieldIdentifier::new("password", TType::String, 4))?;
847 o_prot.write_string(fld_var)?;
848 o_prot.write_field_end()?;
849 ()
850 } else {
851 ()
852 }
853 if let Some(ref fld_var) = self.configuration {
854 o_prot.write_field_begin(&TFieldIdentifier::new("configuration", TType::Map, 5))?;
855 o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?;
856 for (k, v) in fld_var {
857 o_prot.write_string(k)?;
858 o_prot.write_string(v)?;
859 o_prot.write_map_end()?;
860 }
861 o_prot.write_field_end()?;
862 ()
863 } else {
864 ()
865 }
866 o_prot.write_field_stop()?;
867 o_prot.write_struct_end()
868 }
869}
870
871#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
876pub struct TSCloseSessionReq {
877 pub session_id: i64,
878}
879
880impl TSCloseSessionReq {
881 pub fn new(session_id: i64) -> TSCloseSessionReq {
882 TSCloseSessionReq {
883 session_id: session_id,
884 }
885 }
886 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCloseSessionReq> {
887 i_prot.read_struct_begin()?;
888 let mut f_1: Option<i64> = None;
889 loop {
890 let field_ident = i_prot.read_field_begin()?;
891 if field_ident.field_type == TType::Stop {
892 break;
893 }
894 let field_id = field_id(&field_ident)?;
895 match field_id {
896 1 => {
897 let val = i_prot.read_i64()?;
898 f_1 = Some(val);
899 },
900 _ => {
901 i_prot.skip(field_ident.field_type)?;
902 },
903 };
904 i_prot.read_field_end()?;
905 }
906 i_prot.read_struct_end()?;
907 verify_required_field_exists("TSCloseSessionReq.session_id", &f_1)?;
908 let ret = TSCloseSessionReq {
909 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
910 };
911 Ok(ret)
912 }
913 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
914 let struct_ident = TStructIdentifier::new("TSCloseSessionReq");
915 o_prot.write_struct_begin(&struct_ident)?;
916 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
917 o_prot.write_i64(self.session_id)?;
918 o_prot.write_field_end()?;
919 o_prot.write_field_stop()?;
920 o_prot.write_struct_end()
921 }
922}
923
924#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
929pub struct TSExecuteStatementReq {
930 pub session_id: i64,
931 pub statement: String,
932 pub statement_id: i64,
933 pub fetch_size: Option<i32>,
934}
935
936impl TSExecuteStatementReq {
937 pub fn new<F4>(session_id: i64, statement: String, statement_id: i64, fetch_size: F4) -> TSExecuteStatementReq where F4: Into<Option<i32>> {
938 TSExecuteStatementReq {
939 session_id: session_id,
940 statement: statement,
941 statement_id: statement_id,
942 fetch_size: fetch_size.into(),
943 }
944 }
945 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSExecuteStatementReq> {
946 i_prot.read_struct_begin()?;
947 let mut f_1: Option<i64> = None;
948 let mut f_2: Option<String> = None;
949 let mut f_3: Option<i64> = None;
950 let mut f_4: Option<i32> = None;
951 loop {
952 let field_ident = i_prot.read_field_begin()?;
953 if field_ident.field_type == TType::Stop {
954 break;
955 }
956 let field_id = field_id(&field_ident)?;
957 match field_id {
958 1 => {
959 let val = i_prot.read_i64()?;
960 f_1 = Some(val);
961 },
962 2 => {
963 let val = i_prot.read_string()?;
964 f_2 = Some(val);
965 },
966 3 => {
967 let val = i_prot.read_i64()?;
968 f_3 = Some(val);
969 },
970 4 => {
971 let val = i_prot.read_i32()?;
972 f_4 = Some(val);
973 },
974 _ => {
975 i_prot.skip(field_ident.field_type)?;
976 },
977 };
978 i_prot.read_field_end()?;
979 }
980 i_prot.read_struct_end()?;
981 verify_required_field_exists("TSExecuteStatementReq.session_id", &f_1)?;
982 verify_required_field_exists("TSExecuteStatementReq.statement", &f_2)?;
983 verify_required_field_exists("TSExecuteStatementReq.statement_id", &f_3)?;
984 let ret = TSExecuteStatementReq {
985 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
986 statement: f_2.expect("auto-generated code should have checked for presence of required fields"),
987 statement_id: f_3.expect("auto-generated code should have checked for presence of required fields"),
988 fetch_size: f_4,
989 };
990 Ok(ret)
991 }
992 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
993 let struct_ident = TStructIdentifier::new("TSExecuteStatementReq");
994 o_prot.write_struct_begin(&struct_ident)?;
995 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
996 o_prot.write_i64(self.session_id)?;
997 o_prot.write_field_end()?;
998 o_prot.write_field_begin(&TFieldIdentifier::new("statement", TType::String, 2))?;
999 o_prot.write_string(&self.statement)?;
1000 o_prot.write_field_end()?;
1001 o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 3))?;
1002 o_prot.write_i64(self.statement_id)?;
1003 o_prot.write_field_end()?;
1004 if let Some(fld_var) = self.fetch_size {
1005 o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 4))?;
1006 o_prot.write_i32(fld_var)?;
1007 o_prot.write_field_end()?;
1008 ()
1009 } else {
1010 ()
1011 }
1012 o_prot.write_field_stop()?;
1013 o_prot.write_struct_end()
1014 }
1015}
1016
1017#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1022pub struct TSExecuteBatchStatementReq {
1023 pub session_id: i64,
1024 pub statements: Vec<String>,
1025}
1026
1027impl TSExecuteBatchStatementReq {
1028 pub fn new(session_id: i64, statements: Vec<String>) -> TSExecuteBatchStatementReq {
1029 TSExecuteBatchStatementReq {
1030 session_id: session_id,
1031 statements: statements,
1032 }
1033 }
1034 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSExecuteBatchStatementReq> {
1035 i_prot.read_struct_begin()?;
1036 let mut f_1: Option<i64> = None;
1037 let mut f_2: Option<Vec<String>> = None;
1038 loop {
1039 let field_ident = i_prot.read_field_begin()?;
1040 if field_ident.field_type == TType::Stop {
1041 break;
1042 }
1043 let field_id = field_id(&field_ident)?;
1044 match field_id {
1045 1 => {
1046 let val = i_prot.read_i64()?;
1047 f_1 = Some(val);
1048 },
1049 2 => {
1050 let list_ident = i_prot.read_list_begin()?;
1051 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
1052 for _ in 0..list_ident.size {
1053 let list_elem_13 = i_prot.read_string()?;
1054 val.push(list_elem_13);
1055 }
1056 i_prot.read_list_end()?;
1057 f_2 = Some(val);
1058 },
1059 _ => {
1060 i_prot.skip(field_ident.field_type)?;
1061 },
1062 };
1063 i_prot.read_field_end()?;
1064 }
1065 i_prot.read_struct_end()?;
1066 verify_required_field_exists("TSExecuteBatchStatementReq.session_id", &f_1)?;
1067 verify_required_field_exists("TSExecuteBatchStatementReq.statements", &f_2)?;
1068 let ret = TSExecuteBatchStatementReq {
1069 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
1070 statements: f_2.expect("auto-generated code should have checked for presence of required fields"),
1071 };
1072 Ok(ret)
1073 }
1074 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1075 let struct_ident = TStructIdentifier::new("TSExecuteBatchStatementReq");
1076 o_prot.write_struct_begin(&struct_ident)?;
1077 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
1078 o_prot.write_i64(self.session_id)?;
1079 o_prot.write_field_end()?;
1080 o_prot.write_field_begin(&TFieldIdentifier::new("statements", TType::List, 2))?;
1081 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.statements.len() as i32))?;
1082 for e in &self.statements {
1083 o_prot.write_string(e)?;
1084 o_prot.write_list_end()?;
1085 }
1086 o_prot.write_field_end()?;
1087 o_prot.write_field_stop()?;
1088 o_prot.write_struct_end()
1089 }
1090}
1091
1092#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1097pub struct TSGetOperationStatusReq {
1098 pub session_id: i64,
1099 pub query_id: i64,
1100}
1101
1102impl TSGetOperationStatusReq {
1103 pub fn new(session_id: i64, query_id: i64) -> TSGetOperationStatusReq {
1104 TSGetOperationStatusReq {
1105 session_id: session_id,
1106 query_id: query_id,
1107 }
1108 }
1109 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSGetOperationStatusReq> {
1110 i_prot.read_struct_begin()?;
1111 let mut f_1: Option<i64> = None;
1112 let mut f_2: Option<i64> = None;
1113 loop {
1114 let field_ident = i_prot.read_field_begin()?;
1115 if field_ident.field_type == TType::Stop {
1116 break;
1117 }
1118 let field_id = field_id(&field_ident)?;
1119 match field_id {
1120 1 => {
1121 let val = i_prot.read_i64()?;
1122 f_1 = Some(val);
1123 },
1124 2 => {
1125 let val = i_prot.read_i64()?;
1126 f_2 = 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("TSGetOperationStatusReq.session_id", &f_1)?;
1136 verify_required_field_exists("TSGetOperationStatusReq.query_id", &f_2)?;
1137 let ret = TSGetOperationStatusReq {
1138 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
1139 query_id: f_2.expect("auto-generated code should have checked for presence of required fields"),
1140 };
1141 Ok(ret)
1142 }
1143 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1144 let struct_ident = TStructIdentifier::new("TSGetOperationStatusReq");
1145 o_prot.write_struct_begin(&struct_ident)?;
1146 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
1147 o_prot.write_i64(self.session_id)?;
1148 o_prot.write_field_end()?;
1149 o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::I64, 2))?;
1150 o_prot.write_i64(self.query_id)?;
1151 o_prot.write_field_end()?;
1152 o_prot.write_field_stop()?;
1153 o_prot.write_struct_end()
1154 }
1155}
1156
1157#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1162pub struct TSCancelOperationReq {
1163 pub session_id: i64,
1164 pub query_id: i64,
1165}
1166
1167impl TSCancelOperationReq {
1168 pub fn new(session_id: i64, query_id: i64) -> TSCancelOperationReq {
1169 TSCancelOperationReq {
1170 session_id: session_id,
1171 query_id: query_id,
1172 }
1173 }
1174 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCancelOperationReq> {
1175 i_prot.read_struct_begin()?;
1176 let mut f_1: Option<i64> = None;
1177 let mut f_2: Option<i64> = 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 val = i_prot.read_i64()?;
1187 f_1 = Some(val);
1188 },
1189 2 => {
1190 let val = i_prot.read_i64()?;
1191 f_2 = Some(val);
1192 },
1193 _ => {
1194 i_prot.skip(field_ident.field_type)?;
1195 },
1196 };
1197 i_prot.read_field_end()?;
1198 }
1199 i_prot.read_struct_end()?;
1200 verify_required_field_exists("TSCancelOperationReq.session_id", &f_1)?;
1201 verify_required_field_exists("TSCancelOperationReq.query_id", &f_2)?;
1202 let ret = TSCancelOperationReq {
1203 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
1204 query_id: f_2.expect("auto-generated code should have checked for presence of required fields"),
1205 };
1206 Ok(ret)
1207 }
1208 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1209 let struct_ident = TStructIdentifier::new("TSCancelOperationReq");
1210 o_prot.write_struct_begin(&struct_ident)?;
1211 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
1212 o_prot.write_i64(self.session_id)?;
1213 o_prot.write_field_end()?;
1214 o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::I64, 2))?;
1215 o_prot.write_i64(self.query_id)?;
1216 o_prot.write_field_end()?;
1217 o_prot.write_field_stop()?;
1218 o_prot.write_struct_end()
1219 }
1220}
1221
1222#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1227pub struct TSCloseOperationReq {
1228 pub session_id: i64,
1229 pub query_id: Option<i64>,
1230 pub statement_id: Option<i64>,
1231}
1232
1233impl TSCloseOperationReq {
1234 pub fn new<F2, F3>(session_id: i64, query_id: F2, statement_id: F3) -> TSCloseOperationReq where F2: Into<Option<i64>>, F3: Into<Option<i64>> {
1235 TSCloseOperationReq {
1236 session_id: session_id,
1237 query_id: query_id.into(),
1238 statement_id: statement_id.into(),
1239 }
1240 }
1241 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCloseOperationReq> {
1242 i_prot.read_struct_begin()?;
1243 let mut f_1: Option<i64> = None;
1244 let mut f_2: Option<i64> = None;
1245 let mut f_3: Option<i64> = 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_i64()?;
1255 f_1 = Some(val);
1256 },
1257 2 => {
1258 let val = i_prot.read_i64()?;
1259 f_2 = Some(val);
1260 },
1261 3 => {
1262 let val = i_prot.read_i64()?;
1263 f_3 = Some(val);
1264 },
1265 _ => {
1266 i_prot.skip(field_ident.field_type)?;
1267 },
1268 };
1269 i_prot.read_field_end()?;
1270 }
1271 i_prot.read_struct_end()?;
1272 verify_required_field_exists("TSCloseOperationReq.session_id", &f_1)?;
1273 let ret = TSCloseOperationReq {
1274 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
1275 query_id: f_2,
1276 statement_id: f_3,
1277 };
1278 Ok(ret)
1279 }
1280 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1281 let struct_ident = TStructIdentifier::new("TSCloseOperationReq");
1282 o_prot.write_struct_begin(&struct_ident)?;
1283 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
1284 o_prot.write_i64(self.session_id)?;
1285 o_prot.write_field_end()?;
1286 if let Some(fld_var) = self.query_id {
1287 o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::I64, 2))?;
1288 o_prot.write_i64(fld_var)?;
1289 o_prot.write_field_end()?;
1290 ()
1291 } else {
1292 ()
1293 }
1294 if let Some(fld_var) = self.statement_id {
1295 o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 3))?;
1296 o_prot.write_i64(fld_var)?;
1297 o_prot.write_field_end()?;
1298 ()
1299 } else {
1300 ()
1301 }
1302 o_prot.write_field_stop()?;
1303 o_prot.write_struct_end()
1304 }
1305}
1306
1307#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1312pub struct TSFetchResultsReq {
1313 pub session_id: i64,
1314 pub statement: String,
1315 pub fetch_size: i32,
1316 pub query_id: i64,
1317 pub is_align: bool,
1318}
1319
1320impl TSFetchResultsReq {
1321 pub fn new(session_id: i64, statement: String, fetch_size: i32, query_id: i64, is_align: bool) -> TSFetchResultsReq {
1322 TSFetchResultsReq {
1323 session_id: session_id,
1324 statement: statement,
1325 fetch_size: fetch_size,
1326 query_id: query_id,
1327 is_align: is_align,
1328 }
1329 }
1330 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSFetchResultsReq> {
1331 i_prot.read_struct_begin()?;
1332 let mut f_1: Option<i64> = None;
1333 let mut f_2: Option<String> = None;
1334 let mut f_3: Option<i32> = None;
1335 let mut f_4: Option<i64> = None;
1336 let mut f_5: Option<bool> = None;
1337 loop {
1338 let field_ident = i_prot.read_field_begin()?;
1339 if field_ident.field_type == TType::Stop {
1340 break;
1341 }
1342 let field_id = field_id(&field_ident)?;
1343 match field_id {
1344 1 => {
1345 let val = i_prot.read_i64()?;
1346 f_1 = Some(val);
1347 },
1348 2 => {
1349 let val = i_prot.read_string()?;
1350 f_2 = Some(val);
1351 },
1352 3 => {
1353 let val = i_prot.read_i32()?;
1354 f_3 = Some(val);
1355 },
1356 4 => {
1357 let val = i_prot.read_i64()?;
1358 f_4 = Some(val);
1359 },
1360 5 => {
1361 let val = i_prot.read_bool()?;
1362 f_5 = Some(val);
1363 },
1364 _ => {
1365 i_prot.skip(field_ident.field_type)?;
1366 },
1367 };
1368 i_prot.read_field_end()?;
1369 }
1370 i_prot.read_struct_end()?;
1371 verify_required_field_exists("TSFetchResultsReq.session_id", &f_1)?;
1372 verify_required_field_exists("TSFetchResultsReq.statement", &f_2)?;
1373 verify_required_field_exists("TSFetchResultsReq.fetch_size", &f_3)?;
1374 verify_required_field_exists("TSFetchResultsReq.query_id", &f_4)?;
1375 verify_required_field_exists("TSFetchResultsReq.is_align", &f_5)?;
1376 let ret = TSFetchResultsReq {
1377 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
1378 statement: f_2.expect("auto-generated code should have checked for presence of required fields"),
1379 fetch_size: f_3.expect("auto-generated code should have checked for presence of required fields"),
1380 query_id: f_4.expect("auto-generated code should have checked for presence of required fields"),
1381 is_align: f_5.expect("auto-generated code should have checked for presence of required fields"),
1382 };
1383 Ok(ret)
1384 }
1385 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1386 let struct_ident = TStructIdentifier::new("TSFetchResultsReq");
1387 o_prot.write_struct_begin(&struct_ident)?;
1388 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
1389 o_prot.write_i64(self.session_id)?;
1390 o_prot.write_field_end()?;
1391 o_prot.write_field_begin(&TFieldIdentifier::new("statement", TType::String, 2))?;
1392 o_prot.write_string(&self.statement)?;
1393 o_prot.write_field_end()?;
1394 o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 3))?;
1395 o_prot.write_i32(self.fetch_size)?;
1396 o_prot.write_field_end()?;
1397 o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::I64, 4))?;
1398 o_prot.write_i64(self.query_id)?;
1399 o_prot.write_field_end()?;
1400 o_prot.write_field_begin(&TFieldIdentifier::new("isAlign", TType::Bool, 5))?;
1401 o_prot.write_bool(self.is_align)?;
1402 o_prot.write_field_end()?;
1403 o_prot.write_field_stop()?;
1404 o_prot.write_struct_end()
1405 }
1406}
1407
1408#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1413pub struct TSFetchResultsResp {
1414 pub status: TSStatus,
1415 pub has_result_set: bool,
1416 pub is_align: bool,
1417 pub query_data_set: Option<TSQueryDataSet>,
1418 pub non_align_query_data_set: Option<TSQueryNonAlignDataSet>,
1419}
1420
1421impl TSFetchResultsResp {
1422 pub fn new<F4, F5>(status: TSStatus, has_result_set: bool, is_align: bool, query_data_set: F4, non_align_query_data_set: F5) -> TSFetchResultsResp where F4: Into<Option<TSQueryDataSet>>, F5: Into<Option<TSQueryNonAlignDataSet>> {
1423 TSFetchResultsResp {
1424 status: status,
1425 has_result_set: has_result_set,
1426 is_align: is_align,
1427 query_data_set: query_data_set.into(),
1428 non_align_query_data_set: non_align_query_data_set.into(),
1429 }
1430 }
1431 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSFetchResultsResp> {
1432 i_prot.read_struct_begin()?;
1433 let mut f_1: Option<TSStatus> = None;
1434 let mut f_2: Option<bool> = None;
1435 let mut f_3: Option<bool> = None;
1436 let mut f_4: Option<TSQueryDataSet> = None;
1437 let mut f_5: Option<TSQueryNonAlignDataSet> = None;
1438 loop {
1439 let field_ident = i_prot.read_field_begin()?;
1440 if field_ident.field_type == TType::Stop {
1441 break;
1442 }
1443 let field_id = field_id(&field_ident)?;
1444 match field_id {
1445 1 => {
1446 let val = TSStatus::read_from_in_protocol(i_prot)?;
1447 f_1 = Some(val);
1448 },
1449 2 => {
1450 let val = i_prot.read_bool()?;
1451 f_2 = Some(val);
1452 },
1453 3 => {
1454 let val = i_prot.read_bool()?;
1455 f_3 = Some(val);
1456 },
1457 4 => {
1458 let val = TSQueryDataSet::read_from_in_protocol(i_prot)?;
1459 f_4 = Some(val);
1460 },
1461 5 => {
1462 let val = TSQueryNonAlignDataSet::read_from_in_protocol(i_prot)?;
1463 f_5 = Some(val);
1464 },
1465 _ => {
1466 i_prot.skip(field_ident.field_type)?;
1467 },
1468 };
1469 i_prot.read_field_end()?;
1470 }
1471 i_prot.read_struct_end()?;
1472 verify_required_field_exists("TSFetchResultsResp.status", &f_1)?;
1473 verify_required_field_exists("TSFetchResultsResp.has_result_set", &f_2)?;
1474 verify_required_field_exists("TSFetchResultsResp.is_align", &f_3)?;
1475 let ret = TSFetchResultsResp {
1476 status: f_1.expect("auto-generated code should have checked for presence of required fields"),
1477 has_result_set: f_2.expect("auto-generated code should have checked for presence of required fields"),
1478 is_align: f_3.expect("auto-generated code should have checked for presence of required fields"),
1479 query_data_set: f_4,
1480 non_align_query_data_set: f_5,
1481 };
1482 Ok(ret)
1483 }
1484 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1485 let struct_ident = TStructIdentifier::new("TSFetchResultsResp");
1486 o_prot.write_struct_begin(&struct_ident)?;
1487 o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
1488 self.status.write_to_out_protocol(o_prot)?;
1489 o_prot.write_field_end()?;
1490 o_prot.write_field_begin(&TFieldIdentifier::new("hasResultSet", TType::Bool, 2))?;
1491 o_prot.write_bool(self.has_result_set)?;
1492 o_prot.write_field_end()?;
1493 o_prot.write_field_begin(&TFieldIdentifier::new("isAlign", TType::Bool, 3))?;
1494 o_prot.write_bool(self.is_align)?;
1495 o_prot.write_field_end()?;
1496 if let Some(ref fld_var) = self.query_data_set {
1497 o_prot.write_field_begin(&TFieldIdentifier::new("queryDataSet", TType::Struct, 4))?;
1498 fld_var.write_to_out_protocol(o_prot)?;
1499 o_prot.write_field_end()?;
1500 ()
1501 } else {
1502 ()
1503 }
1504 if let Some(ref fld_var) = self.non_align_query_data_set {
1505 o_prot.write_field_begin(&TFieldIdentifier::new("nonAlignQueryDataSet", TType::Struct, 5))?;
1506 fld_var.write_to_out_protocol(o_prot)?;
1507 o_prot.write_field_end()?;
1508 ()
1509 } else {
1510 ()
1511 }
1512 o_prot.write_field_stop()?;
1513 o_prot.write_struct_end()
1514 }
1515}
1516
1517#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1522pub struct TSFetchMetadataResp {
1523 pub status: TSStatus,
1524 pub metadata_in_json: Option<String>,
1525 pub columns_list: Option<Vec<String>>,
1526 pub data_type: Option<String>,
1527}
1528
1529impl TSFetchMetadataResp {
1530 pub fn new<F2, F3, F4>(status: TSStatus, metadata_in_json: F2, columns_list: F3, data_type: F4) -> TSFetchMetadataResp where F2: Into<Option<String>>, F3: Into<Option<Vec<String>>>, F4: Into<Option<String>> {
1531 TSFetchMetadataResp {
1532 status: status,
1533 metadata_in_json: metadata_in_json.into(),
1534 columns_list: columns_list.into(),
1535 data_type: data_type.into(),
1536 }
1537 }
1538 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSFetchMetadataResp> {
1539 i_prot.read_struct_begin()?;
1540 let mut f_1: Option<TSStatus> = None;
1541 let mut f_2: Option<String> = None;
1542 let mut f_3: Option<Vec<String>> = None;
1543 let mut f_4: Option<String> = None;
1544 loop {
1545 let field_ident = i_prot.read_field_begin()?;
1546 if field_ident.field_type == TType::Stop {
1547 break;
1548 }
1549 let field_id = field_id(&field_ident)?;
1550 match field_id {
1551 1 => {
1552 let val = TSStatus::read_from_in_protocol(i_prot)?;
1553 f_1 = Some(val);
1554 },
1555 2 => {
1556 let val = i_prot.read_string()?;
1557 f_2 = Some(val);
1558 },
1559 3 => {
1560 let list_ident = i_prot.read_list_begin()?;
1561 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
1562 for _ in 0..list_ident.size {
1563 let list_elem_14 = i_prot.read_string()?;
1564 val.push(list_elem_14);
1565 }
1566 i_prot.read_list_end()?;
1567 f_3 = Some(val);
1568 },
1569 4 => {
1570 let val = i_prot.read_string()?;
1571 f_4 = Some(val);
1572 },
1573 _ => {
1574 i_prot.skip(field_ident.field_type)?;
1575 },
1576 };
1577 i_prot.read_field_end()?;
1578 }
1579 i_prot.read_struct_end()?;
1580 verify_required_field_exists("TSFetchMetadataResp.status", &f_1)?;
1581 let ret = TSFetchMetadataResp {
1582 status: f_1.expect("auto-generated code should have checked for presence of required fields"),
1583 metadata_in_json: f_2,
1584 columns_list: f_3,
1585 data_type: f_4,
1586 };
1587 Ok(ret)
1588 }
1589 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1590 let struct_ident = TStructIdentifier::new("TSFetchMetadataResp");
1591 o_prot.write_struct_begin(&struct_ident)?;
1592 o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
1593 self.status.write_to_out_protocol(o_prot)?;
1594 o_prot.write_field_end()?;
1595 if let Some(ref fld_var) = self.metadata_in_json {
1596 o_prot.write_field_begin(&TFieldIdentifier::new("metadataInJson", TType::String, 2))?;
1597 o_prot.write_string(fld_var)?;
1598 o_prot.write_field_end()?;
1599 ()
1600 } else {
1601 ()
1602 }
1603 if let Some(ref fld_var) = self.columns_list {
1604 o_prot.write_field_begin(&TFieldIdentifier::new("columnsList", TType::List, 3))?;
1605 o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?;
1606 for e in fld_var {
1607 o_prot.write_string(e)?;
1608 o_prot.write_list_end()?;
1609 }
1610 o_prot.write_field_end()?;
1611 ()
1612 } else {
1613 ()
1614 }
1615 if let Some(ref fld_var) = self.data_type {
1616 o_prot.write_field_begin(&TFieldIdentifier::new("dataType", TType::String, 4))?;
1617 o_prot.write_string(fld_var)?;
1618 o_prot.write_field_end()?;
1619 ()
1620 } else {
1621 ()
1622 }
1623 o_prot.write_field_stop()?;
1624 o_prot.write_struct_end()
1625 }
1626}
1627
1628#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1633pub struct TSFetchMetadataReq {
1634 pub session_id: i64,
1635 pub type_: String,
1636 pub column_path: Option<String>,
1637}
1638
1639impl TSFetchMetadataReq {
1640 pub fn new<F3>(session_id: i64, type_: String, column_path: F3) -> TSFetchMetadataReq where F3: Into<Option<String>> {
1641 TSFetchMetadataReq {
1642 session_id: session_id,
1643 type_: type_,
1644 column_path: column_path.into(),
1645 }
1646 }
1647 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSFetchMetadataReq> {
1648 i_prot.read_struct_begin()?;
1649 let mut f_1: Option<i64> = None;
1650 let mut f_2: Option<String> = None;
1651 let mut f_3: Option<String> = None;
1652 loop {
1653 let field_ident = i_prot.read_field_begin()?;
1654 if field_ident.field_type == TType::Stop {
1655 break;
1656 }
1657 let field_id = field_id(&field_ident)?;
1658 match field_id {
1659 1 => {
1660 let val = i_prot.read_i64()?;
1661 f_1 = Some(val);
1662 },
1663 2 => {
1664 let val = i_prot.read_string()?;
1665 f_2 = Some(val);
1666 },
1667 3 => {
1668 let val = i_prot.read_string()?;
1669 f_3 = Some(val);
1670 },
1671 _ => {
1672 i_prot.skip(field_ident.field_type)?;
1673 },
1674 };
1675 i_prot.read_field_end()?;
1676 }
1677 i_prot.read_struct_end()?;
1678 verify_required_field_exists("TSFetchMetadataReq.session_id", &f_1)?;
1679 verify_required_field_exists("TSFetchMetadataReq.type_", &f_2)?;
1680 let ret = TSFetchMetadataReq {
1681 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
1682 type_: f_2.expect("auto-generated code should have checked for presence of required fields"),
1683 column_path: f_3,
1684 };
1685 Ok(ret)
1686 }
1687 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1688 let struct_ident = TStructIdentifier::new("TSFetchMetadataReq");
1689 o_prot.write_struct_begin(&struct_ident)?;
1690 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
1691 o_prot.write_i64(self.session_id)?;
1692 o_prot.write_field_end()?;
1693 o_prot.write_field_begin(&TFieldIdentifier::new("type", TType::String, 2))?;
1694 o_prot.write_string(&self.type_)?;
1695 o_prot.write_field_end()?;
1696 if let Some(ref fld_var) = self.column_path {
1697 o_prot.write_field_begin(&TFieldIdentifier::new("columnPath", TType::String, 3))?;
1698 o_prot.write_string(fld_var)?;
1699 o_prot.write_field_end()?;
1700 ()
1701 } else {
1702 ()
1703 }
1704 o_prot.write_field_stop()?;
1705 o_prot.write_struct_end()
1706 }
1707}
1708
1709#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1714pub struct TSGetTimeZoneResp {
1715 pub status: TSStatus,
1716 pub time_zone: String,
1717}
1718
1719impl TSGetTimeZoneResp {
1720 pub fn new(status: TSStatus, time_zone: String) -> TSGetTimeZoneResp {
1721 TSGetTimeZoneResp {
1722 status: status,
1723 time_zone: time_zone,
1724 }
1725 }
1726 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSGetTimeZoneResp> {
1727 i_prot.read_struct_begin()?;
1728 let mut f_1: Option<TSStatus> = None;
1729 let mut f_2: Option<String> = None;
1730 loop {
1731 let field_ident = i_prot.read_field_begin()?;
1732 if field_ident.field_type == TType::Stop {
1733 break;
1734 }
1735 let field_id = field_id(&field_ident)?;
1736 match field_id {
1737 1 => {
1738 let val = TSStatus::read_from_in_protocol(i_prot)?;
1739 f_1 = Some(val);
1740 },
1741 2 => {
1742 let val = i_prot.read_string()?;
1743 f_2 = Some(val);
1744 },
1745 _ => {
1746 i_prot.skip(field_ident.field_type)?;
1747 },
1748 };
1749 i_prot.read_field_end()?;
1750 }
1751 i_prot.read_struct_end()?;
1752 verify_required_field_exists("TSGetTimeZoneResp.status", &f_1)?;
1753 verify_required_field_exists("TSGetTimeZoneResp.time_zone", &f_2)?;
1754 let ret = TSGetTimeZoneResp {
1755 status: f_1.expect("auto-generated code should have checked for presence of required fields"),
1756 time_zone: f_2.expect("auto-generated code should have checked for presence of required fields"),
1757 };
1758 Ok(ret)
1759 }
1760 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1761 let struct_ident = TStructIdentifier::new("TSGetTimeZoneResp");
1762 o_prot.write_struct_begin(&struct_ident)?;
1763 o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?;
1764 self.status.write_to_out_protocol(o_prot)?;
1765 o_prot.write_field_end()?;
1766 o_prot.write_field_begin(&TFieldIdentifier::new("timeZone", TType::String, 2))?;
1767 o_prot.write_string(&self.time_zone)?;
1768 o_prot.write_field_end()?;
1769 o_prot.write_field_stop()?;
1770 o_prot.write_struct_end()
1771 }
1772}
1773
1774#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1779pub struct TSSetTimeZoneReq {
1780 pub session_id: i64,
1781 pub time_zone: String,
1782}
1783
1784impl TSSetTimeZoneReq {
1785 pub fn new(session_id: i64, time_zone: String) -> TSSetTimeZoneReq {
1786 TSSetTimeZoneReq {
1787 session_id: session_id,
1788 time_zone: time_zone,
1789 }
1790 }
1791 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSSetTimeZoneReq> {
1792 i_prot.read_struct_begin()?;
1793 let mut f_1: Option<i64> = None;
1794 let mut f_2: Option<String> = None;
1795 loop {
1796 let field_ident = i_prot.read_field_begin()?;
1797 if field_ident.field_type == TType::Stop {
1798 break;
1799 }
1800 let field_id = field_id(&field_ident)?;
1801 match field_id {
1802 1 => {
1803 let val = i_prot.read_i64()?;
1804 f_1 = Some(val);
1805 },
1806 2 => {
1807 let val = i_prot.read_string()?;
1808 f_2 = Some(val);
1809 },
1810 _ => {
1811 i_prot.skip(field_ident.field_type)?;
1812 },
1813 };
1814 i_prot.read_field_end()?;
1815 }
1816 i_prot.read_struct_end()?;
1817 verify_required_field_exists("TSSetTimeZoneReq.session_id", &f_1)?;
1818 verify_required_field_exists("TSSetTimeZoneReq.time_zone", &f_2)?;
1819 let ret = TSSetTimeZoneReq {
1820 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
1821 time_zone: f_2.expect("auto-generated code should have checked for presence of required fields"),
1822 };
1823 Ok(ret)
1824 }
1825 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1826 let struct_ident = TStructIdentifier::new("TSSetTimeZoneReq");
1827 o_prot.write_struct_begin(&struct_ident)?;
1828 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
1829 o_prot.write_i64(self.session_id)?;
1830 o_prot.write_field_end()?;
1831 o_prot.write_field_begin(&TFieldIdentifier::new("timeZone", TType::String, 2))?;
1832 o_prot.write_string(&self.time_zone)?;
1833 o_prot.write_field_end()?;
1834 o_prot.write_field_stop()?;
1835 o_prot.write_struct_end()
1836 }
1837}
1838
1839#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1844pub struct TSInsertRecordReq {
1845 pub session_id: i64,
1846 pub device_id: String,
1847 pub measurements: Vec<String>,
1848 pub values: Vec<u8>,
1849 pub timestamp: i64,
1850}
1851
1852impl TSInsertRecordReq {
1853 pub fn new(session_id: i64, device_id: String, measurements: Vec<String>, values: Vec<u8>, timestamp: i64) -> TSInsertRecordReq {
1854 TSInsertRecordReq {
1855 session_id: session_id,
1856 device_id: device_id,
1857 measurements: measurements,
1858 values: values,
1859 timestamp: timestamp,
1860 }
1861 }
1862 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertRecordReq> {
1863 i_prot.read_struct_begin()?;
1864 let mut f_1: Option<i64> = None;
1865 let mut f_2: Option<String> = None;
1866 let mut f_3: Option<Vec<String>> = None;
1867 let mut f_4: Option<Vec<u8>> = None;
1868 let mut f_5: Option<i64> = None;
1869 loop {
1870 let field_ident = i_prot.read_field_begin()?;
1871 if field_ident.field_type == TType::Stop {
1872 break;
1873 }
1874 let field_id = field_id(&field_ident)?;
1875 match field_id {
1876 1 => {
1877 let val = i_prot.read_i64()?;
1878 f_1 = Some(val);
1879 },
1880 2 => {
1881 let val = i_prot.read_string()?;
1882 f_2 = Some(val);
1883 },
1884 3 => {
1885 let list_ident = i_prot.read_list_begin()?;
1886 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
1887 for _ in 0..list_ident.size {
1888 let list_elem_15 = i_prot.read_string()?;
1889 val.push(list_elem_15);
1890 }
1891 i_prot.read_list_end()?;
1892 f_3 = Some(val);
1893 },
1894 4 => {
1895 let val = i_prot.read_bytes()?;
1896 f_4 = Some(val);
1897 },
1898 5 => {
1899 let val = i_prot.read_i64()?;
1900 f_5 = Some(val);
1901 },
1902 _ => {
1903 i_prot.skip(field_ident.field_type)?;
1904 },
1905 };
1906 i_prot.read_field_end()?;
1907 }
1908 i_prot.read_struct_end()?;
1909 verify_required_field_exists("TSInsertRecordReq.session_id", &f_1)?;
1910 verify_required_field_exists("TSInsertRecordReq.device_id", &f_2)?;
1911 verify_required_field_exists("TSInsertRecordReq.measurements", &f_3)?;
1912 verify_required_field_exists("TSInsertRecordReq.values", &f_4)?;
1913 verify_required_field_exists("TSInsertRecordReq.timestamp", &f_5)?;
1914 let ret = TSInsertRecordReq {
1915 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
1916 device_id: f_2.expect("auto-generated code should have checked for presence of required fields"),
1917 measurements: f_3.expect("auto-generated code should have checked for presence of required fields"),
1918 values: f_4.expect("auto-generated code should have checked for presence of required fields"),
1919 timestamp: f_5.expect("auto-generated code should have checked for presence of required fields"),
1920 };
1921 Ok(ret)
1922 }
1923 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
1924 let struct_ident = TStructIdentifier::new("TSInsertRecordReq");
1925 o_prot.write_struct_begin(&struct_ident)?;
1926 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
1927 o_prot.write_i64(self.session_id)?;
1928 o_prot.write_field_end()?;
1929 o_prot.write_field_begin(&TFieldIdentifier::new("deviceId", TType::String, 2))?;
1930 o_prot.write_string(&self.device_id)?;
1931 o_prot.write_field_end()?;
1932 o_prot.write_field_begin(&TFieldIdentifier::new("measurements", TType::List, 3))?;
1933 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.measurements.len() as i32))?;
1934 for e in &self.measurements {
1935 o_prot.write_string(e)?;
1936 o_prot.write_list_end()?;
1937 }
1938 o_prot.write_field_end()?;
1939 o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::String, 4))?;
1940 o_prot.write_bytes(&self.values)?;
1941 o_prot.write_field_end()?;
1942 o_prot.write_field_begin(&TFieldIdentifier::new("timestamp", TType::I64, 5))?;
1943 o_prot.write_i64(self.timestamp)?;
1944 o_prot.write_field_end()?;
1945 o_prot.write_field_stop()?;
1946 o_prot.write_struct_end()
1947 }
1948}
1949
1950#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1955pub struct TSInsertStringRecordReq {
1956 pub session_id: i64,
1957 pub device_id: String,
1958 pub measurements: Vec<String>,
1959 pub values: Vec<String>,
1960 pub timestamp: i64,
1961}
1962
1963impl TSInsertStringRecordReq {
1964 pub fn new(session_id: i64, device_id: String, measurements: Vec<String>, values: Vec<String>, timestamp: i64) -> TSInsertStringRecordReq {
1965 TSInsertStringRecordReq {
1966 session_id: session_id,
1967 device_id: device_id,
1968 measurements: measurements,
1969 values: values,
1970 timestamp: timestamp,
1971 }
1972 }
1973 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertStringRecordReq> {
1974 i_prot.read_struct_begin()?;
1975 let mut f_1: Option<i64> = None;
1976 let mut f_2: Option<String> = None;
1977 let mut f_3: Option<Vec<String>> = None;
1978 let mut f_4: Option<Vec<String>> = None;
1979 let mut f_5: Option<i64> = None;
1980 loop {
1981 let field_ident = i_prot.read_field_begin()?;
1982 if field_ident.field_type == TType::Stop {
1983 break;
1984 }
1985 let field_id = field_id(&field_ident)?;
1986 match field_id {
1987 1 => {
1988 let val = i_prot.read_i64()?;
1989 f_1 = Some(val);
1990 },
1991 2 => {
1992 let val = i_prot.read_string()?;
1993 f_2 = Some(val);
1994 },
1995 3 => {
1996 let list_ident = i_prot.read_list_begin()?;
1997 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
1998 for _ in 0..list_ident.size {
1999 let list_elem_16 = i_prot.read_string()?;
2000 val.push(list_elem_16);
2001 }
2002 i_prot.read_list_end()?;
2003 f_3 = Some(val);
2004 },
2005 4 => {
2006 let list_ident = i_prot.read_list_begin()?;
2007 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2008 for _ in 0..list_ident.size {
2009 let list_elem_17 = i_prot.read_string()?;
2010 val.push(list_elem_17);
2011 }
2012 i_prot.read_list_end()?;
2013 f_4 = Some(val);
2014 },
2015 5 => {
2016 let val = i_prot.read_i64()?;
2017 f_5 = Some(val);
2018 },
2019 _ => {
2020 i_prot.skip(field_ident.field_type)?;
2021 },
2022 };
2023 i_prot.read_field_end()?;
2024 }
2025 i_prot.read_struct_end()?;
2026 verify_required_field_exists("TSInsertStringRecordReq.session_id", &f_1)?;
2027 verify_required_field_exists("TSInsertStringRecordReq.device_id", &f_2)?;
2028 verify_required_field_exists("TSInsertStringRecordReq.measurements", &f_3)?;
2029 verify_required_field_exists("TSInsertStringRecordReq.values", &f_4)?;
2030 verify_required_field_exists("TSInsertStringRecordReq.timestamp", &f_5)?;
2031 let ret = TSInsertStringRecordReq {
2032 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
2033 device_id: f_2.expect("auto-generated code should have checked for presence of required fields"),
2034 measurements: f_3.expect("auto-generated code should have checked for presence of required fields"),
2035 values: f_4.expect("auto-generated code should have checked for presence of required fields"),
2036 timestamp: f_5.expect("auto-generated code should have checked for presence of required fields"),
2037 };
2038 Ok(ret)
2039 }
2040 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2041 let struct_ident = TStructIdentifier::new("TSInsertStringRecordReq");
2042 o_prot.write_struct_begin(&struct_ident)?;
2043 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
2044 o_prot.write_i64(self.session_id)?;
2045 o_prot.write_field_end()?;
2046 o_prot.write_field_begin(&TFieldIdentifier::new("deviceId", TType::String, 2))?;
2047 o_prot.write_string(&self.device_id)?;
2048 o_prot.write_field_end()?;
2049 o_prot.write_field_begin(&TFieldIdentifier::new("measurements", TType::List, 3))?;
2050 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.measurements.len() as i32))?;
2051 for e in &self.measurements {
2052 o_prot.write_string(e)?;
2053 o_prot.write_list_end()?;
2054 }
2055 o_prot.write_field_end()?;
2056 o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::List, 4))?;
2057 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.values.len() as i32))?;
2058 for e in &self.values {
2059 o_prot.write_string(e)?;
2060 o_prot.write_list_end()?;
2061 }
2062 o_prot.write_field_end()?;
2063 o_prot.write_field_begin(&TFieldIdentifier::new("timestamp", TType::I64, 5))?;
2064 o_prot.write_i64(self.timestamp)?;
2065 o_prot.write_field_end()?;
2066 o_prot.write_field_stop()?;
2067 o_prot.write_struct_end()
2068 }
2069}
2070
2071#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2076pub struct TSInsertTabletReq {
2077 pub session_id: i64,
2078 pub device_id: String,
2079 pub measurements: Vec<String>,
2080 pub values: Vec<u8>,
2081 pub timestamps: Vec<u8>,
2082 pub types: Vec<i32>,
2083 pub size: i32,
2084}
2085
2086impl TSInsertTabletReq {
2087 pub fn new(session_id: i64, device_id: String, measurements: Vec<String>, values: Vec<u8>, timestamps: Vec<u8>, types: Vec<i32>, size: i32) -> TSInsertTabletReq {
2088 TSInsertTabletReq {
2089 session_id: session_id,
2090 device_id: device_id,
2091 measurements: measurements,
2092 values: values,
2093 timestamps: timestamps,
2094 types: types,
2095 size: size,
2096 }
2097 }
2098 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertTabletReq> {
2099 i_prot.read_struct_begin()?;
2100 let mut f_1: Option<i64> = None;
2101 let mut f_2: Option<String> = None;
2102 let mut f_3: Option<Vec<String>> = None;
2103 let mut f_4: Option<Vec<u8>> = None;
2104 let mut f_5: Option<Vec<u8>> = None;
2105 let mut f_6: Option<Vec<i32>> = None;
2106 let mut f_7: Option<i32> = None;
2107 loop {
2108 let field_ident = i_prot.read_field_begin()?;
2109 if field_ident.field_type == TType::Stop {
2110 break;
2111 }
2112 let field_id = field_id(&field_ident)?;
2113 match field_id {
2114 1 => {
2115 let val = i_prot.read_i64()?;
2116 f_1 = Some(val);
2117 },
2118 2 => {
2119 let val = i_prot.read_string()?;
2120 f_2 = Some(val);
2121 },
2122 3 => {
2123 let list_ident = i_prot.read_list_begin()?;
2124 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2125 for _ in 0..list_ident.size {
2126 let list_elem_18 = i_prot.read_string()?;
2127 val.push(list_elem_18);
2128 }
2129 i_prot.read_list_end()?;
2130 f_3 = Some(val);
2131 },
2132 4 => {
2133 let val = i_prot.read_bytes()?;
2134 f_4 = Some(val);
2135 },
2136 5 => {
2137 let val = i_prot.read_bytes()?;
2138 f_5 = Some(val);
2139 },
2140 6 => {
2141 let list_ident = i_prot.read_list_begin()?;
2142 let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize);
2143 for _ in 0..list_ident.size {
2144 let list_elem_19 = i_prot.read_i32()?;
2145 val.push(list_elem_19);
2146 }
2147 i_prot.read_list_end()?;
2148 f_6 = Some(val);
2149 },
2150 7 => {
2151 let val = i_prot.read_i32()?;
2152 f_7 = Some(val);
2153 },
2154 _ => {
2155 i_prot.skip(field_ident.field_type)?;
2156 },
2157 };
2158 i_prot.read_field_end()?;
2159 }
2160 i_prot.read_struct_end()?;
2161 verify_required_field_exists("TSInsertTabletReq.session_id", &f_1)?;
2162 verify_required_field_exists("TSInsertTabletReq.device_id", &f_2)?;
2163 verify_required_field_exists("TSInsertTabletReq.measurements", &f_3)?;
2164 verify_required_field_exists("TSInsertTabletReq.values", &f_4)?;
2165 verify_required_field_exists("TSInsertTabletReq.timestamps", &f_5)?;
2166 verify_required_field_exists("TSInsertTabletReq.types", &f_6)?;
2167 verify_required_field_exists("TSInsertTabletReq.size", &f_7)?;
2168 let ret = TSInsertTabletReq {
2169 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
2170 device_id: f_2.expect("auto-generated code should have checked for presence of required fields"),
2171 measurements: f_3.expect("auto-generated code should have checked for presence of required fields"),
2172 values: f_4.expect("auto-generated code should have checked for presence of required fields"),
2173 timestamps: f_5.expect("auto-generated code should have checked for presence of required fields"),
2174 types: f_6.expect("auto-generated code should have checked for presence of required fields"),
2175 size: f_7.expect("auto-generated code should have checked for presence of required fields"),
2176 };
2177 Ok(ret)
2178 }
2179 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2180 let struct_ident = TStructIdentifier::new("TSInsertTabletReq");
2181 o_prot.write_struct_begin(&struct_ident)?;
2182 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
2183 o_prot.write_i64(self.session_id)?;
2184 o_prot.write_field_end()?;
2185 o_prot.write_field_begin(&TFieldIdentifier::new("deviceId", TType::String, 2))?;
2186 o_prot.write_string(&self.device_id)?;
2187 o_prot.write_field_end()?;
2188 o_prot.write_field_begin(&TFieldIdentifier::new("measurements", TType::List, 3))?;
2189 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.measurements.len() as i32))?;
2190 for e in &self.measurements {
2191 o_prot.write_string(e)?;
2192 o_prot.write_list_end()?;
2193 }
2194 o_prot.write_field_end()?;
2195 o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::String, 4))?;
2196 o_prot.write_bytes(&self.values)?;
2197 o_prot.write_field_end()?;
2198 o_prot.write_field_begin(&TFieldIdentifier::new("timestamps", TType::String, 5))?;
2199 o_prot.write_bytes(&self.timestamps)?;
2200 o_prot.write_field_end()?;
2201 o_prot.write_field_begin(&TFieldIdentifier::new("types", TType::List, 6))?;
2202 o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.types.len() as i32))?;
2203 for e in &self.types {
2204 o_prot.write_i32(*e)?;
2205 o_prot.write_list_end()?;
2206 }
2207 o_prot.write_field_end()?;
2208 o_prot.write_field_begin(&TFieldIdentifier::new("size", TType::I32, 7))?;
2209 o_prot.write_i32(self.size)?;
2210 o_prot.write_field_end()?;
2211 o_prot.write_field_stop()?;
2212 o_prot.write_struct_end()
2213 }
2214}
2215
2216#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2221pub struct TSInsertTabletsReq {
2222 pub session_id: i64,
2223 pub device_ids: Vec<String>,
2224 pub measurements_list: Vec<Vec<String>>,
2225 pub values_list: Vec<Vec<u8>>,
2226 pub timestamps_list: Vec<Vec<u8>>,
2227 pub types_list: Vec<Vec<i32>>,
2228 pub size_list: Vec<i32>,
2229}
2230
2231impl TSInsertTabletsReq {
2232 pub fn new(session_id: i64, device_ids: Vec<String>, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<u8>>, timestamps_list: Vec<Vec<u8>>, types_list: Vec<Vec<i32>>, size_list: Vec<i32>) -> TSInsertTabletsReq {
2233 TSInsertTabletsReq {
2234 session_id: session_id,
2235 device_ids: device_ids,
2236 measurements_list: measurements_list,
2237 values_list: values_list,
2238 timestamps_list: timestamps_list,
2239 types_list: types_list,
2240 size_list: size_list,
2241 }
2242 }
2243 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertTabletsReq> {
2244 i_prot.read_struct_begin()?;
2245 let mut f_1: Option<i64> = None;
2246 let mut f_2: Option<Vec<String>> = None;
2247 let mut f_3: Option<Vec<Vec<String>>> = None;
2248 let mut f_4: Option<Vec<Vec<u8>>> = None;
2249 let mut f_5: Option<Vec<Vec<u8>>> = None;
2250 let mut f_6: Option<Vec<Vec<i32>>> = None;
2251 let mut f_7: Option<Vec<i32>> = None;
2252 loop {
2253 let field_ident = i_prot.read_field_begin()?;
2254 if field_ident.field_type == TType::Stop {
2255 break;
2256 }
2257 let field_id = field_id(&field_ident)?;
2258 match field_id {
2259 1 => {
2260 let val = i_prot.read_i64()?;
2261 f_1 = Some(val);
2262 },
2263 2 => {
2264 let list_ident = i_prot.read_list_begin()?;
2265 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2266 for _ in 0..list_ident.size {
2267 let list_elem_20 = i_prot.read_string()?;
2268 val.push(list_elem_20);
2269 }
2270 i_prot.read_list_end()?;
2271 f_2 = Some(val);
2272 },
2273 3 => {
2274 let list_ident = i_prot.read_list_begin()?;
2275 let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize);
2276 for _ in 0..list_ident.size {
2277 let list_ident = i_prot.read_list_begin()?;
2278 let mut list_elem_21: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2279 for _ in 0..list_ident.size {
2280 let list_elem_22 = i_prot.read_string()?;
2281 list_elem_21.push(list_elem_22);
2282 }
2283 i_prot.read_list_end()?;
2284 val.push(list_elem_21);
2285 }
2286 i_prot.read_list_end()?;
2287 f_3 = Some(val);
2288 },
2289 4 => {
2290 let list_ident = i_prot.read_list_begin()?;
2291 let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize);
2292 for _ in 0..list_ident.size {
2293 let list_elem_23 = i_prot.read_bytes()?;
2294 val.push(list_elem_23);
2295 }
2296 i_prot.read_list_end()?;
2297 f_4 = Some(val);
2298 },
2299 5 => {
2300 let list_ident = i_prot.read_list_begin()?;
2301 let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize);
2302 for _ in 0..list_ident.size {
2303 let list_elem_24 = i_prot.read_bytes()?;
2304 val.push(list_elem_24);
2305 }
2306 i_prot.read_list_end()?;
2307 f_5 = Some(val);
2308 },
2309 6 => {
2310 let list_ident = i_prot.read_list_begin()?;
2311 let mut val: Vec<Vec<i32>> = Vec::with_capacity(list_ident.size as usize);
2312 for _ in 0..list_ident.size {
2313 let list_ident = i_prot.read_list_begin()?;
2314 let mut list_elem_25: Vec<i32> = Vec::with_capacity(list_ident.size as usize);
2315 for _ in 0..list_ident.size {
2316 let list_elem_26 = i_prot.read_i32()?;
2317 list_elem_25.push(list_elem_26);
2318 }
2319 i_prot.read_list_end()?;
2320 val.push(list_elem_25);
2321 }
2322 i_prot.read_list_end()?;
2323 f_6 = Some(val);
2324 },
2325 7 => {
2326 let list_ident = i_prot.read_list_begin()?;
2327 let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize);
2328 for _ in 0..list_ident.size {
2329 let list_elem_27 = i_prot.read_i32()?;
2330 val.push(list_elem_27);
2331 }
2332 i_prot.read_list_end()?;
2333 f_7 = Some(val);
2334 },
2335 _ => {
2336 i_prot.skip(field_ident.field_type)?;
2337 },
2338 };
2339 i_prot.read_field_end()?;
2340 }
2341 i_prot.read_struct_end()?;
2342 verify_required_field_exists("TSInsertTabletsReq.session_id", &f_1)?;
2343 verify_required_field_exists("TSInsertTabletsReq.device_ids", &f_2)?;
2344 verify_required_field_exists("TSInsertTabletsReq.measurements_list", &f_3)?;
2345 verify_required_field_exists("TSInsertTabletsReq.values_list", &f_4)?;
2346 verify_required_field_exists("TSInsertTabletsReq.timestamps_list", &f_5)?;
2347 verify_required_field_exists("TSInsertTabletsReq.types_list", &f_6)?;
2348 verify_required_field_exists("TSInsertTabletsReq.size_list", &f_7)?;
2349 let ret = TSInsertTabletsReq {
2350 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
2351 device_ids: f_2.expect("auto-generated code should have checked for presence of required fields"),
2352 measurements_list: f_3.expect("auto-generated code should have checked for presence of required fields"),
2353 values_list: f_4.expect("auto-generated code should have checked for presence of required fields"),
2354 timestamps_list: f_5.expect("auto-generated code should have checked for presence of required fields"),
2355 types_list: f_6.expect("auto-generated code should have checked for presence of required fields"),
2356 size_list: f_7.expect("auto-generated code should have checked for presence of required fields"),
2357 };
2358 Ok(ret)
2359 }
2360 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2361 let struct_ident = TStructIdentifier::new("TSInsertTabletsReq");
2362 o_prot.write_struct_begin(&struct_ident)?;
2363 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
2364 o_prot.write_i64(self.session_id)?;
2365 o_prot.write_field_end()?;
2366 o_prot.write_field_begin(&TFieldIdentifier::new("deviceIds", TType::List, 2))?;
2367 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.device_ids.len() as i32))?;
2368 for e in &self.device_ids {
2369 o_prot.write_string(e)?;
2370 o_prot.write_list_end()?;
2371 }
2372 o_prot.write_field_end()?;
2373 o_prot.write_field_begin(&TFieldIdentifier::new("measurementsList", TType::List, 3))?;
2374 o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.measurements_list.len() as i32))?;
2375 for e in &self.measurements_list {
2376 o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?;
2377 for e in e {
2378 o_prot.write_string(e)?;
2379 o_prot.write_list_end()?;
2380 }
2381 o_prot.write_list_end()?;
2382 }
2383 o_prot.write_field_end()?;
2384 o_prot.write_field_begin(&TFieldIdentifier::new("valuesList", TType::List, 4))?;
2385 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.values_list.len() as i32))?;
2386 for e in &self.values_list {
2387 o_prot.write_bytes(e)?;
2388 o_prot.write_list_end()?;
2389 }
2390 o_prot.write_field_end()?;
2391 o_prot.write_field_begin(&TFieldIdentifier::new("timestampsList", TType::List, 5))?;
2392 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.timestamps_list.len() as i32))?;
2393 for e in &self.timestamps_list {
2394 o_prot.write_bytes(e)?;
2395 o_prot.write_list_end()?;
2396 }
2397 o_prot.write_field_end()?;
2398 o_prot.write_field_begin(&TFieldIdentifier::new("typesList", TType::List, 6))?;
2399 o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.types_list.len() as i32))?;
2400 for e in &self.types_list {
2401 o_prot.write_list_begin(&TListIdentifier::new(TType::I32, e.len() as i32))?;
2402 for e in e {
2403 o_prot.write_i32(*e)?;
2404 o_prot.write_list_end()?;
2405 }
2406 o_prot.write_list_end()?;
2407 }
2408 o_prot.write_field_end()?;
2409 o_prot.write_field_begin(&TFieldIdentifier::new("sizeList", TType::List, 7))?;
2410 o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.size_list.len() as i32))?;
2411 for e in &self.size_list {
2412 o_prot.write_i32(*e)?;
2413 o_prot.write_list_end()?;
2414 }
2415 o_prot.write_field_end()?;
2416 o_prot.write_field_stop()?;
2417 o_prot.write_struct_end()
2418 }
2419}
2420
2421#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2426pub struct TSInsertRecordsReq {
2427 pub session_id: i64,
2428 pub device_ids: Vec<String>,
2429 pub measurements_list: Vec<Vec<String>>,
2430 pub values_list: Vec<Vec<u8>>,
2431 pub timestamps: Vec<i64>,
2432}
2433
2434impl TSInsertRecordsReq {
2435 pub fn new(session_id: i64, device_ids: Vec<String>, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<u8>>, timestamps: Vec<i64>) -> TSInsertRecordsReq {
2436 TSInsertRecordsReq {
2437 session_id: session_id,
2438 device_ids: device_ids,
2439 measurements_list: measurements_list,
2440 values_list: values_list,
2441 timestamps: timestamps,
2442 }
2443 }
2444 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertRecordsReq> {
2445 i_prot.read_struct_begin()?;
2446 let mut f_1: Option<i64> = None;
2447 let mut f_2: Option<Vec<String>> = None;
2448 let mut f_3: Option<Vec<Vec<String>>> = None;
2449 let mut f_4: Option<Vec<Vec<u8>>> = None;
2450 let mut f_5: Option<Vec<i64>> = None;
2451 loop {
2452 let field_ident = i_prot.read_field_begin()?;
2453 if field_ident.field_type == TType::Stop {
2454 break;
2455 }
2456 let field_id = field_id(&field_ident)?;
2457 match field_id {
2458 1 => {
2459 let val = i_prot.read_i64()?;
2460 f_1 = Some(val);
2461 },
2462 2 => {
2463 let list_ident = i_prot.read_list_begin()?;
2464 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2465 for _ in 0..list_ident.size {
2466 let list_elem_28 = i_prot.read_string()?;
2467 val.push(list_elem_28);
2468 }
2469 i_prot.read_list_end()?;
2470 f_2 = Some(val);
2471 },
2472 3 => {
2473 let list_ident = i_prot.read_list_begin()?;
2474 let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize);
2475 for _ in 0..list_ident.size {
2476 let list_ident = i_prot.read_list_begin()?;
2477 let mut list_elem_29: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2478 for _ in 0..list_ident.size {
2479 let list_elem_30 = i_prot.read_string()?;
2480 list_elem_29.push(list_elem_30);
2481 }
2482 i_prot.read_list_end()?;
2483 val.push(list_elem_29);
2484 }
2485 i_prot.read_list_end()?;
2486 f_3 = Some(val);
2487 },
2488 4 => {
2489 let list_ident = i_prot.read_list_begin()?;
2490 let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize);
2491 for _ in 0..list_ident.size {
2492 let list_elem_31 = i_prot.read_bytes()?;
2493 val.push(list_elem_31);
2494 }
2495 i_prot.read_list_end()?;
2496 f_4 = Some(val);
2497 },
2498 5 => {
2499 let list_ident = i_prot.read_list_begin()?;
2500 let mut val: Vec<i64> = Vec::with_capacity(list_ident.size as usize);
2501 for _ in 0..list_ident.size {
2502 let list_elem_32 = i_prot.read_i64()?;
2503 val.push(list_elem_32);
2504 }
2505 i_prot.read_list_end()?;
2506 f_5 = Some(val);
2507 },
2508 _ => {
2509 i_prot.skip(field_ident.field_type)?;
2510 },
2511 };
2512 i_prot.read_field_end()?;
2513 }
2514 i_prot.read_struct_end()?;
2515 verify_required_field_exists("TSInsertRecordsReq.session_id", &f_1)?;
2516 verify_required_field_exists("TSInsertRecordsReq.device_ids", &f_2)?;
2517 verify_required_field_exists("TSInsertRecordsReq.measurements_list", &f_3)?;
2518 verify_required_field_exists("TSInsertRecordsReq.values_list", &f_4)?;
2519 verify_required_field_exists("TSInsertRecordsReq.timestamps", &f_5)?;
2520 let ret = TSInsertRecordsReq {
2521 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
2522 device_ids: f_2.expect("auto-generated code should have checked for presence of required fields"),
2523 measurements_list: f_3.expect("auto-generated code should have checked for presence of required fields"),
2524 values_list: f_4.expect("auto-generated code should have checked for presence of required fields"),
2525 timestamps: f_5.expect("auto-generated code should have checked for presence of required fields"),
2526 };
2527 Ok(ret)
2528 }
2529 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2530 let struct_ident = TStructIdentifier::new("TSInsertRecordsReq");
2531 o_prot.write_struct_begin(&struct_ident)?;
2532 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
2533 o_prot.write_i64(self.session_id)?;
2534 o_prot.write_field_end()?;
2535 o_prot.write_field_begin(&TFieldIdentifier::new("deviceIds", TType::List, 2))?;
2536 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.device_ids.len() as i32))?;
2537 for e in &self.device_ids {
2538 o_prot.write_string(e)?;
2539 o_prot.write_list_end()?;
2540 }
2541 o_prot.write_field_end()?;
2542 o_prot.write_field_begin(&TFieldIdentifier::new("measurementsList", TType::List, 3))?;
2543 o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.measurements_list.len() as i32))?;
2544 for e in &self.measurements_list {
2545 o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?;
2546 for e in e {
2547 o_prot.write_string(e)?;
2548 o_prot.write_list_end()?;
2549 }
2550 o_prot.write_list_end()?;
2551 }
2552 o_prot.write_field_end()?;
2553 o_prot.write_field_begin(&TFieldIdentifier::new("valuesList", TType::List, 4))?;
2554 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.values_list.len() as i32))?;
2555 for e in &self.values_list {
2556 o_prot.write_bytes(e)?;
2557 o_prot.write_list_end()?;
2558 }
2559 o_prot.write_field_end()?;
2560 o_prot.write_field_begin(&TFieldIdentifier::new("timestamps", TType::List, 5))?;
2561 o_prot.write_list_begin(&TListIdentifier::new(TType::I64, self.timestamps.len() as i32))?;
2562 for e in &self.timestamps {
2563 o_prot.write_i64(*e)?;
2564 o_prot.write_list_end()?;
2565 }
2566 o_prot.write_field_end()?;
2567 o_prot.write_field_stop()?;
2568 o_prot.write_struct_end()
2569 }
2570}
2571
2572#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2577pub struct TSInsertRecordsOfOneDeviceReq {
2578 pub session_id: i64,
2579 pub device_id: String,
2580 pub measurements_list: Vec<Vec<String>>,
2581 pub values_list: Vec<Vec<u8>>,
2582 pub timestamps: Vec<i64>,
2583}
2584
2585impl TSInsertRecordsOfOneDeviceReq {
2586 pub fn new(session_id: i64, device_id: String, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<u8>>, timestamps: Vec<i64>) -> TSInsertRecordsOfOneDeviceReq {
2587 TSInsertRecordsOfOneDeviceReq {
2588 session_id: session_id,
2589 device_id: device_id,
2590 measurements_list: measurements_list,
2591 values_list: values_list,
2592 timestamps: timestamps,
2593 }
2594 }
2595 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertRecordsOfOneDeviceReq> {
2596 i_prot.read_struct_begin()?;
2597 let mut f_1: Option<i64> = None;
2598 let mut f_2: Option<String> = None;
2599 let mut f_3: Option<Vec<Vec<String>>> = None;
2600 let mut f_4: Option<Vec<Vec<u8>>> = None;
2601 let mut f_5: Option<Vec<i64>> = None;
2602 loop {
2603 let field_ident = i_prot.read_field_begin()?;
2604 if field_ident.field_type == TType::Stop {
2605 break;
2606 }
2607 let field_id = field_id(&field_ident)?;
2608 match field_id {
2609 1 => {
2610 let val = i_prot.read_i64()?;
2611 f_1 = Some(val);
2612 },
2613 2 => {
2614 let val = i_prot.read_string()?;
2615 f_2 = Some(val);
2616 },
2617 3 => {
2618 let list_ident = i_prot.read_list_begin()?;
2619 let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize);
2620 for _ in 0..list_ident.size {
2621 let list_ident = i_prot.read_list_begin()?;
2622 let mut list_elem_33: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2623 for _ in 0..list_ident.size {
2624 let list_elem_34 = i_prot.read_string()?;
2625 list_elem_33.push(list_elem_34);
2626 }
2627 i_prot.read_list_end()?;
2628 val.push(list_elem_33);
2629 }
2630 i_prot.read_list_end()?;
2631 f_3 = Some(val);
2632 },
2633 4 => {
2634 let list_ident = i_prot.read_list_begin()?;
2635 let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize);
2636 for _ in 0..list_ident.size {
2637 let list_elem_35 = i_prot.read_bytes()?;
2638 val.push(list_elem_35);
2639 }
2640 i_prot.read_list_end()?;
2641 f_4 = Some(val);
2642 },
2643 5 => {
2644 let list_ident = i_prot.read_list_begin()?;
2645 let mut val: Vec<i64> = Vec::with_capacity(list_ident.size as usize);
2646 for _ in 0..list_ident.size {
2647 let list_elem_36 = i_prot.read_i64()?;
2648 val.push(list_elem_36);
2649 }
2650 i_prot.read_list_end()?;
2651 f_5 = Some(val);
2652 },
2653 _ => {
2654 i_prot.skip(field_ident.field_type)?;
2655 },
2656 };
2657 i_prot.read_field_end()?;
2658 }
2659 i_prot.read_struct_end()?;
2660 verify_required_field_exists("TSInsertRecordsOfOneDeviceReq.session_id", &f_1)?;
2661 verify_required_field_exists("TSInsertRecordsOfOneDeviceReq.device_id", &f_2)?;
2662 verify_required_field_exists("TSInsertRecordsOfOneDeviceReq.measurements_list", &f_3)?;
2663 verify_required_field_exists("TSInsertRecordsOfOneDeviceReq.values_list", &f_4)?;
2664 verify_required_field_exists("TSInsertRecordsOfOneDeviceReq.timestamps", &f_5)?;
2665 let ret = TSInsertRecordsOfOneDeviceReq {
2666 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
2667 device_id: f_2.expect("auto-generated code should have checked for presence of required fields"),
2668 measurements_list: f_3.expect("auto-generated code should have checked for presence of required fields"),
2669 values_list: f_4.expect("auto-generated code should have checked for presence of required fields"),
2670 timestamps: f_5.expect("auto-generated code should have checked for presence of required fields"),
2671 };
2672 Ok(ret)
2673 }
2674 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2675 let struct_ident = TStructIdentifier::new("TSInsertRecordsOfOneDeviceReq");
2676 o_prot.write_struct_begin(&struct_ident)?;
2677 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
2678 o_prot.write_i64(self.session_id)?;
2679 o_prot.write_field_end()?;
2680 o_prot.write_field_begin(&TFieldIdentifier::new("deviceId", TType::String, 2))?;
2681 o_prot.write_string(&self.device_id)?;
2682 o_prot.write_field_end()?;
2683 o_prot.write_field_begin(&TFieldIdentifier::new("measurementsList", TType::List, 3))?;
2684 o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.measurements_list.len() as i32))?;
2685 for e in &self.measurements_list {
2686 o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?;
2687 for e in e {
2688 o_prot.write_string(e)?;
2689 o_prot.write_list_end()?;
2690 }
2691 o_prot.write_list_end()?;
2692 }
2693 o_prot.write_field_end()?;
2694 o_prot.write_field_begin(&TFieldIdentifier::new("valuesList", TType::List, 4))?;
2695 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.values_list.len() as i32))?;
2696 for e in &self.values_list {
2697 o_prot.write_bytes(e)?;
2698 o_prot.write_list_end()?;
2699 }
2700 o_prot.write_field_end()?;
2701 o_prot.write_field_begin(&TFieldIdentifier::new("timestamps", TType::List, 5))?;
2702 o_prot.write_list_begin(&TListIdentifier::new(TType::I64, self.timestamps.len() as i32))?;
2703 for e in &self.timestamps {
2704 o_prot.write_i64(*e)?;
2705 o_prot.write_list_end()?;
2706 }
2707 o_prot.write_field_end()?;
2708 o_prot.write_field_stop()?;
2709 o_prot.write_struct_end()
2710 }
2711}
2712
2713#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2718pub struct TSInsertStringRecordsReq {
2719 pub session_id: i64,
2720 pub device_ids: Vec<String>,
2721 pub measurements_list: Vec<Vec<String>>,
2722 pub values_list: Vec<Vec<String>>,
2723 pub timestamps: Vec<i64>,
2724}
2725
2726impl TSInsertStringRecordsReq {
2727 pub fn new(session_id: i64, device_ids: Vec<String>, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<String>>, timestamps: Vec<i64>) -> TSInsertStringRecordsReq {
2728 TSInsertStringRecordsReq {
2729 session_id: session_id,
2730 device_ids: device_ids,
2731 measurements_list: measurements_list,
2732 values_list: values_list,
2733 timestamps: timestamps,
2734 }
2735 }
2736 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertStringRecordsReq> {
2737 i_prot.read_struct_begin()?;
2738 let mut f_1: Option<i64> = None;
2739 let mut f_2: Option<Vec<String>> = None;
2740 let mut f_3: Option<Vec<Vec<String>>> = None;
2741 let mut f_4: Option<Vec<Vec<String>>> = None;
2742 let mut f_5: Option<Vec<i64>> = None;
2743 loop {
2744 let field_ident = i_prot.read_field_begin()?;
2745 if field_ident.field_type == TType::Stop {
2746 break;
2747 }
2748 let field_id = field_id(&field_ident)?;
2749 match field_id {
2750 1 => {
2751 let val = i_prot.read_i64()?;
2752 f_1 = Some(val);
2753 },
2754 2 => {
2755 let list_ident = i_prot.read_list_begin()?;
2756 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2757 for _ in 0..list_ident.size {
2758 let list_elem_37 = i_prot.read_string()?;
2759 val.push(list_elem_37);
2760 }
2761 i_prot.read_list_end()?;
2762 f_2 = Some(val);
2763 },
2764 3 => {
2765 let list_ident = i_prot.read_list_begin()?;
2766 let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize);
2767 for _ in 0..list_ident.size {
2768 let list_ident = i_prot.read_list_begin()?;
2769 let mut list_elem_38: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2770 for _ in 0..list_ident.size {
2771 let list_elem_39 = i_prot.read_string()?;
2772 list_elem_38.push(list_elem_39);
2773 }
2774 i_prot.read_list_end()?;
2775 val.push(list_elem_38);
2776 }
2777 i_prot.read_list_end()?;
2778 f_3 = Some(val);
2779 },
2780 4 => {
2781 let list_ident = i_prot.read_list_begin()?;
2782 let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize);
2783 for _ in 0..list_ident.size {
2784 let list_ident = i_prot.read_list_begin()?;
2785 let mut list_elem_40: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2786 for _ in 0..list_ident.size {
2787 let list_elem_41 = i_prot.read_string()?;
2788 list_elem_40.push(list_elem_41);
2789 }
2790 i_prot.read_list_end()?;
2791 val.push(list_elem_40);
2792 }
2793 i_prot.read_list_end()?;
2794 f_4 = Some(val);
2795 },
2796 5 => {
2797 let list_ident = i_prot.read_list_begin()?;
2798 let mut val: Vec<i64> = Vec::with_capacity(list_ident.size as usize);
2799 for _ in 0..list_ident.size {
2800 let list_elem_42 = i_prot.read_i64()?;
2801 val.push(list_elem_42);
2802 }
2803 i_prot.read_list_end()?;
2804 f_5 = Some(val);
2805 },
2806 _ => {
2807 i_prot.skip(field_ident.field_type)?;
2808 },
2809 };
2810 i_prot.read_field_end()?;
2811 }
2812 i_prot.read_struct_end()?;
2813 verify_required_field_exists("TSInsertStringRecordsReq.session_id", &f_1)?;
2814 verify_required_field_exists("TSInsertStringRecordsReq.device_ids", &f_2)?;
2815 verify_required_field_exists("TSInsertStringRecordsReq.measurements_list", &f_3)?;
2816 verify_required_field_exists("TSInsertStringRecordsReq.values_list", &f_4)?;
2817 verify_required_field_exists("TSInsertStringRecordsReq.timestamps", &f_5)?;
2818 let ret = TSInsertStringRecordsReq {
2819 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
2820 device_ids: f_2.expect("auto-generated code should have checked for presence of required fields"),
2821 measurements_list: f_3.expect("auto-generated code should have checked for presence of required fields"),
2822 values_list: f_4.expect("auto-generated code should have checked for presence of required fields"),
2823 timestamps: f_5.expect("auto-generated code should have checked for presence of required fields"),
2824 };
2825 Ok(ret)
2826 }
2827 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2828 let struct_ident = TStructIdentifier::new("TSInsertStringRecordsReq");
2829 o_prot.write_struct_begin(&struct_ident)?;
2830 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
2831 o_prot.write_i64(self.session_id)?;
2832 o_prot.write_field_end()?;
2833 o_prot.write_field_begin(&TFieldIdentifier::new("deviceIds", TType::List, 2))?;
2834 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.device_ids.len() as i32))?;
2835 for e in &self.device_ids {
2836 o_prot.write_string(e)?;
2837 o_prot.write_list_end()?;
2838 }
2839 o_prot.write_field_end()?;
2840 o_prot.write_field_begin(&TFieldIdentifier::new("measurementsList", TType::List, 3))?;
2841 o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.measurements_list.len() as i32))?;
2842 for e in &self.measurements_list {
2843 o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?;
2844 for e in e {
2845 o_prot.write_string(e)?;
2846 o_prot.write_list_end()?;
2847 }
2848 o_prot.write_list_end()?;
2849 }
2850 o_prot.write_field_end()?;
2851 o_prot.write_field_begin(&TFieldIdentifier::new("valuesList", TType::List, 4))?;
2852 o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.values_list.len() as i32))?;
2853 for e in &self.values_list {
2854 o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?;
2855 for e in e {
2856 o_prot.write_string(e)?;
2857 o_prot.write_list_end()?;
2858 }
2859 o_prot.write_list_end()?;
2860 }
2861 o_prot.write_field_end()?;
2862 o_prot.write_field_begin(&TFieldIdentifier::new("timestamps", TType::List, 5))?;
2863 o_prot.write_list_begin(&TListIdentifier::new(TType::I64, self.timestamps.len() as i32))?;
2864 for e in &self.timestamps {
2865 o_prot.write_i64(*e)?;
2866 o_prot.write_list_end()?;
2867 }
2868 o_prot.write_field_end()?;
2869 o_prot.write_field_stop()?;
2870 o_prot.write_struct_end()
2871 }
2872}
2873
2874#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2879pub struct TSDeleteDataReq {
2880 pub session_id: i64,
2881 pub paths: Vec<String>,
2882 pub start_time: i64,
2883 pub end_time: i64,
2884}
2885
2886impl TSDeleteDataReq {
2887 pub fn new(session_id: i64, paths: Vec<String>, start_time: i64, end_time: i64) -> TSDeleteDataReq {
2888 TSDeleteDataReq {
2889 session_id: session_id,
2890 paths: paths,
2891 start_time: start_time,
2892 end_time: end_time,
2893 }
2894 }
2895 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSDeleteDataReq> {
2896 i_prot.read_struct_begin()?;
2897 let mut f_1: Option<i64> = None;
2898 let mut f_2: Option<Vec<String>> = None;
2899 let mut f_3: Option<i64> = None;
2900 let mut f_4: Option<i64> = None;
2901 loop {
2902 let field_ident = i_prot.read_field_begin()?;
2903 if field_ident.field_type == TType::Stop {
2904 break;
2905 }
2906 let field_id = field_id(&field_ident)?;
2907 match field_id {
2908 1 => {
2909 let val = i_prot.read_i64()?;
2910 f_1 = Some(val);
2911 },
2912 2 => {
2913 let list_ident = i_prot.read_list_begin()?;
2914 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
2915 for _ in 0..list_ident.size {
2916 let list_elem_43 = i_prot.read_string()?;
2917 val.push(list_elem_43);
2918 }
2919 i_prot.read_list_end()?;
2920 f_2 = Some(val);
2921 },
2922 3 => {
2923 let val = i_prot.read_i64()?;
2924 f_3 = Some(val);
2925 },
2926 4 => {
2927 let val = i_prot.read_i64()?;
2928 f_4 = Some(val);
2929 },
2930 _ => {
2931 i_prot.skip(field_ident.field_type)?;
2932 },
2933 };
2934 i_prot.read_field_end()?;
2935 }
2936 i_prot.read_struct_end()?;
2937 verify_required_field_exists("TSDeleteDataReq.session_id", &f_1)?;
2938 verify_required_field_exists("TSDeleteDataReq.paths", &f_2)?;
2939 verify_required_field_exists("TSDeleteDataReq.start_time", &f_3)?;
2940 verify_required_field_exists("TSDeleteDataReq.end_time", &f_4)?;
2941 let ret = TSDeleteDataReq {
2942 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
2943 paths: f_2.expect("auto-generated code should have checked for presence of required fields"),
2944 start_time: f_3.expect("auto-generated code should have checked for presence of required fields"),
2945 end_time: f_4.expect("auto-generated code should have checked for presence of required fields"),
2946 };
2947 Ok(ret)
2948 }
2949 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
2950 let struct_ident = TStructIdentifier::new("TSDeleteDataReq");
2951 o_prot.write_struct_begin(&struct_ident)?;
2952 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
2953 o_prot.write_i64(self.session_id)?;
2954 o_prot.write_field_end()?;
2955 o_prot.write_field_begin(&TFieldIdentifier::new("paths", TType::List, 2))?;
2956 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.paths.len() as i32))?;
2957 for e in &self.paths {
2958 o_prot.write_string(e)?;
2959 o_prot.write_list_end()?;
2960 }
2961 o_prot.write_field_end()?;
2962 o_prot.write_field_begin(&TFieldIdentifier::new("startTime", TType::I64, 3))?;
2963 o_prot.write_i64(self.start_time)?;
2964 o_prot.write_field_end()?;
2965 o_prot.write_field_begin(&TFieldIdentifier::new("endTime", TType::I64, 4))?;
2966 o_prot.write_i64(self.end_time)?;
2967 o_prot.write_field_end()?;
2968 o_prot.write_field_stop()?;
2969 o_prot.write_struct_end()
2970 }
2971}
2972
2973#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2978pub struct TSCreateTimeseriesReq {
2979 pub session_id: i64,
2980 pub path: String,
2981 pub data_type: i32,
2982 pub encoding: i32,
2983 pub compressor: i32,
2984 pub props: Option<BTreeMap<String, String>>,
2985 pub tags: Option<BTreeMap<String, String>>,
2986 pub attributes: Option<BTreeMap<String, String>>,
2987 pub measurement_alias: Option<String>,
2988}
2989
2990impl TSCreateTimeseriesReq {
2991 pub fn new<F6, F7, F8, F9>(session_id: i64, path: String, data_type: i32, encoding: i32, compressor: i32, props: F6, tags: F7, attributes: F8, measurement_alias: F9) -> TSCreateTimeseriesReq where F6: Into<Option<BTreeMap<String, String>>>, F7: Into<Option<BTreeMap<String, String>>>, F8: Into<Option<BTreeMap<String, String>>>, F9: Into<Option<String>> {
2992 TSCreateTimeseriesReq {
2993 session_id: session_id,
2994 path: path,
2995 data_type: data_type,
2996 encoding: encoding,
2997 compressor: compressor,
2998 props: props.into(),
2999 tags: tags.into(),
3000 attributes: attributes.into(),
3001 measurement_alias: measurement_alias.into(),
3002 }
3003 }
3004 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCreateTimeseriesReq> {
3005 i_prot.read_struct_begin()?;
3006 let mut f_1: Option<i64> = None;
3007 let mut f_2: Option<String> = None;
3008 let mut f_3: Option<i32> = None;
3009 let mut f_4: Option<i32> = None;
3010 let mut f_5: Option<i32> = None;
3011 let mut f_6: Option<BTreeMap<String, String>> = None;
3012 let mut f_7: Option<BTreeMap<String, String>> = None;
3013 let mut f_8: Option<BTreeMap<String, String>> = None;
3014 let mut f_9: Option<String> = None;
3015 loop {
3016 let field_ident = i_prot.read_field_begin()?;
3017 if field_ident.field_type == TType::Stop {
3018 break;
3019 }
3020 let field_id = field_id(&field_ident)?;
3021 match field_id {
3022 1 => {
3023 let val = i_prot.read_i64()?;
3024 f_1 = Some(val);
3025 },
3026 2 => {
3027 let val = i_prot.read_string()?;
3028 f_2 = Some(val);
3029 },
3030 3 => {
3031 let val = i_prot.read_i32()?;
3032 f_3 = Some(val);
3033 },
3034 4 => {
3035 let val = i_prot.read_i32()?;
3036 f_4 = Some(val);
3037 },
3038 5 => {
3039 let val = i_prot.read_i32()?;
3040 f_5 = Some(val);
3041 },
3042 6 => {
3043 let map_ident = i_prot.read_map_begin()?;
3044 let mut val: BTreeMap<String, String> = BTreeMap::new();
3045 for _ in 0..map_ident.size {
3046 let map_key_44 = i_prot.read_string()?;
3047 let map_val_45 = i_prot.read_string()?;
3048 val.insert(map_key_44, map_val_45);
3049 }
3050 i_prot.read_map_end()?;
3051 f_6 = Some(val);
3052 },
3053 7 => {
3054 let map_ident = i_prot.read_map_begin()?;
3055 let mut val: BTreeMap<String, String> = BTreeMap::new();
3056 for _ in 0..map_ident.size {
3057 let map_key_46 = i_prot.read_string()?;
3058 let map_val_47 = i_prot.read_string()?;
3059 val.insert(map_key_46, map_val_47);
3060 }
3061 i_prot.read_map_end()?;
3062 f_7 = Some(val);
3063 },
3064 8 => {
3065 let map_ident = i_prot.read_map_begin()?;
3066 let mut val: BTreeMap<String, String> = BTreeMap::new();
3067 for _ in 0..map_ident.size {
3068 let map_key_48 = i_prot.read_string()?;
3069 let map_val_49 = i_prot.read_string()?;
3070 val.insert(map_key_48, map_val_49);
3071 }
3072 i_prot.read_map_end()?;
3073 f_8 = Some(val);
3074 },
3075 9 => {
3076 let val = i_prot.read_string()?;
3077 f_9 = Some(val);
3078 },
3079 _ => {
3080 i_prot.skip(field_ident.field_type)?;
3081 },
3082 };
3083 i_prot.read_field_end()?;
3084 }
3085 i_prot.read_struct_end()?;
3086 verify_required_field_exists("TSCreateTimeseriesReq.session_id", &f_1)?;
3087 verify_required_field_exists("TSCreateTimeseriesReq.path", &f_2)?;
3088 verify_required_field_exists("TSCreateTimeseriesReq.data_type", &f_3)?;
3089 verify_required_field_exists("TSCreateTimeseriesReq.encoding", &f_4)?;
3090 verify_required_field_exists("TSCreateTimeseriesReq.compressor", &f_5)?;
3091 let ret = TSCreateTimeseriesReq {
3092 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
3093 path: f_2.expect("auto-generated code should have checked for presence of required fields"),
3094 data_type: f_3.expect("auto-generated code should have checked for presence of required fields"),
3095 encoding: f_4.expect("auto-generated code should have checked for presence of required fields"),
3096 compressor: f_5.expect("auto-generated code should have checked for presence of required fields"),
3097 props: f_6,
3098 tags: f_7,
3099 attributes: f_8,
3100 measurement_alias: f_9,
3101 };
3102 Ok(ret)
3103 }
3104 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3105 let struct_ident = TStructIdentifier::new("TSCreateTimeseriesReq");
3106 o_prot.write_struct_begin(&struct_ident)?;
3107 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
3108 o_prot.write_i64(self.session_id)?;
3109 o_prot.write_field_end()?;
3110 o_prot.write_field_begin(&TFieldIdentifier::new("path", TType::String, 2))?;
3111 o_prot.write_string(&self.path)?;
3112 o_prot.write_field_end()?;
3113 o_prot.write_field_begin(&TFieldIdentifier::new("dataType", TType::I32, 3))?;
3114 o_prot.write_i32(self.data_type)?;
3115 o_prot.write_field_end()?;
3116 o_prot.write_field_begin(&TFieldIdentifier::new("encoding", TType::I32, 4))?;
3117 o_prot.write_i32(self.encoding)?;
3118 o_prot.write_field_end()?;
3119 o_prot.write_field_begin(&TFieldIdentifier::new("compressor", TType::I32, 5))?;
3120 o_prot.write_i32(self.compressor)?;
3121 o_prot.write_field_end()?;
3122 if let Some(ref fld_var) = self.props {
3123 o_prot.write_field_begin(&TFieldIdentifier::new("props", TType::Map, 6))?;
3124 o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?;
3125 for (k, v) in fld_var {
3126 o_prot.write_string(k)?;
3127 o_prot.write_string(v)?;
3128 o_prot.write_map_end()?;
3129 }
3130 o_prot.write_field_end()?;
3131 ()
3132 } else {
3133 ()
3134 }
3135 if let Some(ref fld_var) = self.tags {
3136 o_prot.write_field_begin(&TFieldIdentifier::new("tags", TType::Map, 7))?;
3137 o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?;
3138 for (k, v) in fld_var {
3139 o_prot.write_string(k)?;
3140 o_prot.write_string(v)?;
3141 o_prot.write_map_end()?;
3142 }
3143 o_prot.write_field_end()?;
3144 ()
3145 } else {
3146 ()
3147 }
3148 if let Some(ref fld_var) = self.attributes {
3149 o_prot.write_field_begin(&TFieldIdentifier::new("attributes", TType::Map, 8))?;
3150 o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?;
3151 for (k, v) in fld_var {
3152 o_prot.write_string(k)?;
3153 o_prot.write_string(v)?;
3154 o_prot.write_map_end()?;
3155 }
3156 o_prot.write_field_end()?;
3157 ()
3158 } else {
3159 ()
3160 }
3161 if let Some(ref fld_var) = self.measurement_alias {
3162 o_prot.write_field_begin(&TFieldIdentifier::new("measurementAlias", TType::String, 9))?;
3163 o_prot.write_string(fld_var)?;
3164 o_prot.write_field_end()?;
3165 ()
3166 } else {
3167 ()
3168 }
3169 o_prot.write_field_stop()?;
3170 o_prot.write_struct_end()
3171 }
3172}
3173
3174#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3179pub struct TSRawDataQueryReq {
3180 pub session_id: i64,
3181 pub paths: Vec<String>,
3182 pub fetch_size: Option<i32>,
3183 pub start_time: i64,
3184 pub end_time: i64,
3185 pub statement_id: i64,
3186}
3187
3188impl TSRawDataQueryReq {
3189 pub fn new<F3>(session_id: i64, paths: Vec<String>, fetch_size: F3, start_time: i64, end_time: i64, statement_id: i64) -> TSRawDataQueryReq where F3: Into<Option<i32>> {
3190 TSRawDataQueryReq {
3191 session_id: session_id,
3192 paths: paths,
3193 fetch_size: fetch_size.into(),
3194 start_time: start_time,
3195 end_time: end_time,
3196 statement_id: statement_id,
3197 }
3198 }
3199 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSRawDataQueryReq> {
3200 i_prot.read_struct_begin()?;
3201 let mut f_1: Option<i64> = None;
3202 let mut f_2: Option<Vec<String>> = None;
3203 let mut f_3: Option<i32> = None;
3204 let mut f_4: Option<i64> = None;
3205 let mut f_5: Option<i64> = None;
3206 let mut f_6: Option<i64> = None;
3207 loop {
3208 let field_ident = i_prot.read_field_begin()?;
3209 if field_ident.field_type == TType::Stop {
3210 break;
3211 }
3212 let field_id = field_id(&field_ident)?;
3213 match field_id {
3214 1 => {
3215 let val = i_prot.read_i64()?;
3216 f_1 = Some(val);
3217 },
3218 2 => {
3219 let list_ident = i_prot.read_list_begin()?;
3220 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
3221 for _ in 0..list_ident.size {
3222 let list_elem_50 = i_prot.read_string()?;
3223 val.push(list_elem_50);
3224 }
3225 i_prot.read_list_end()?;
3226 f_2 = Some(val);
3227 },
3228 3 => {
3229 let val = i_prot.read_i32()?;
3230 f_3 = Some(val);
3231 },
3232 4 => {
3233 let val = i_prot.read_i64()?;
3234 f_4 = Some(val);
3235 },
3236 5 => {
3237 let val = i_prot.read_i64()?;
3238 f_5 = Some(val);
3239 },
3240 6 => {
3241 let val = i_prot.read_i64()?;
3242 f_6 = Some(val);
3243 },
3244 _ => {
3245 i_prot.skip(field_ident.field_type)?;
3246 },
3247 };
3248 i_prot.read_field_end()?;
3249 }
3250 i_prot.read_struct_end()?;
3251 verify_required_field_exists("TSRawDataQueryReq.session_id", &f_1)?;
3252 verify_required_field_exists("TSRawDataQueryReq.paths", &f_2)?;
3253 verify_required_field_exists("TSRawDataQueryReq.start_time", &f_4)?;
3254 verify_required_field_exists("TSRawDataQueryReq.end_time", &f_5)?;
3255 verify_required_field_exists("TSRawDataQueryReq.statement_id", &f_6)?;
3256 let ret = TSRawDataQueryReq {
3257 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
3258 paths: f_2.expect("auto-generated code should have checked for presence of required fields"),
3259 fetch_size: f_3,
3260 start_time: f_4.expect("auto-generated code should have checked for presence of required fields"),
3261 end_time: f_5.expect("auto-generated code should have checked for presence of required fields"),
3262 statement_id: f_6.expect("auto-generated code should have checked for presence of required fields"),
3263 };
3264 Ok(ret)
3265 }
3266 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3267 let struct_ident = TStructIdentifier::new("TSRawDataQueryReq");
3268 o_prot.write_struct_begin(&struct_ident)?;
3269 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
3270 o_prot.write_i64(self.session_id)?;
3271 o_prot.write_field_end()?;
3272 o_prot.write_field_begin(&TFieldIdentifier::new("paths", TType::List, 2))?;
3273 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.paths.len() as i32))?;
3274 for e in &self.paths {
3275 o_prot.write_string(e)?;
3276 o_prot.write_list_end()?;
3277 }
3278 o_prot.write_field_end()?;
3279 if let Some(fld_var) = self.fetch_size {
3280 o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 3))?;
3281 o_prot.write_i32(fld_var)?;
3282 o_prot.write_field_end()?;
3283 ()
3284 } else {
3285 ()
3286 }
3287 o_prot.write_field_begin(&TFieldIdentifier::new("startTime", TType::I64, 4))?;
3288 o_prot.write_i64(self.start_time)?;
3289 o_prot.write_field_end()?;
3290 o_prot.write_field_begin(&TFieldIdentifier::new("endTime", TType::I64, 5))?;
3291 o_prot.write_i64(self.end_time)?;
3292 o_prot.write_field_end()?;
3293 o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 6))?;
3294 o_prot.write_i64(self.statement_id)?;
3295 o_prot.write_field_end()?;
3296 o_prot.write_field_stop()?;
3297 o_prot.write_struct_end()
3298 }
3299}
3300
3301#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3306pub struct TSCreateMultiTimeseriesReq {
3307 pub session_id: i64,
3308 pub paths: Vec<String>,
3309 pub data_types: Vec<i32>,
3310 pub encodings: Vec<i32>,
3311 pub compressors: Vec<i32>,
3312 pub props_list: Option<Vec<BTreeMap<String, String>>>,
3313 pub tags_list: Option<Vec<BTreeMap<String, String>>>,
3314 pub attributes_list: Option<Vec<BTreeMap<String, String>>>,
3315 pub measurement_alias_list: Option<Vec<String>>,
3316}
3317
3318impl TSCreateMultiTimeseriesReq {
3319 pub fn new<F6, F7, F8, F9>(session_id: i64, paths: Vec<String>, data_types: Vec<i32>, encodings: Vec<i32>, compressors: Vec<i32>, props_list: F6, tags_list: F7, attributes_list: F8, measurement_alias_list: F9) -> TSCreateMultiTimeseriesReq where F6: Into<Option<Vec<BTreeMap<String, String>>>>, F7: Into<Option<Vec<BTreeMap<String, String>>>>, F8: Into<Option<Vec<BTreeMap<String, String>>>>, F9: Into<Option<Vec<String>>> {
3320 TSCreateMultiTimeseriesReq {
3321 session_id: session_id,
3322 paths: paths,
3323 data_types: data_types,
3324 encodings: encodings,
3325 compressors: compressors,
3326 props_list: props_list.into(),
3327 tags_list: tags_list.into(),
3328 attributes_list: attributes_list.into(),
3329 measurement_alias_list: measurement_alias_list.into(),
3330 }
3331 }
3332 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCreateMultiTimeseriesReq> {
3333 i_prot.read_struct_begin()?;
3334 let mut f_1: Option<i64> = None;
3335 let mut f_2: Option<Vec<String>> = None;
3336 let mut f_3: Option<Vec<i32>> = None;
3337 let mut f_4: Option<Vec<i32>> = None;
3338 let mut f_5: Option<Vec<i32>> = None;
3339 let mut f_6: Option<Vec<BTreeMap<String, String>>> = None;
3340 let mut f_7: Option<Vec<BTreeMap<String, String>>> = None;
3341 let mut f_8: Option<Vec<BTreeMap<String, String>>> = None;
3342 let mut f_9: Option<Vec<String>> = None;
3343 loop {
3344 let field_ident = i_prot.read_field_begin()?;
3345 if field_ident.field_type == TType::Stop {
3346 break;
3347 }
3348 let field_id = field_id(&field_ident)?;
3349 match field_id {
3350 1 => {
3351 let val = i_prot.read_i64()?;
3352 f_1 = Some(val);
3353 },
3354 2 => {
3355 let list_ident = i_prot.read_list_begin()?;
3356 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
3357 for _ in 0..list_ident.size {
3358 let list_elem_51 = i_prot.read_string()?;
3359 val.push(list_elem_51);
3360 }
3361 i_prot.read_list_end()?;
3362 f_2 = Some(val);
3363 },
3364 3 => {
3365 let list_ident = i_prot.read_list_begin()?;
3366 let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize);
3367 for _ in 0..list_ident.size {
3368 let list_elem_52 = i_prot.read_i32()?;
3369 val.push(list_elem_52);
3370 }
3371 i_prot.read_list_end()?;
3372 f_3 = Some(val);
3373 },
3374 4 => {
3375 let list_ident = i_prot.read_list_begin()?;
3376 let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize);
3377 for _ in 0..list_ident.size {
3378 let list_elem_53 = i_prot.read_i32()?;
3379 val.push(list_elem_53);
3380 }
3381 i_prot.read_list_end()?;
3382 f_4 = Some(val);
3383 },
3384 5 => {
3385 let list_ident = i_prot.read_list_begin()?;
3386 let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize);
3387 for _ in 0..list_ident.size {
3388 let list_elem_54 = i_prot.read_i32()?;
3389 val.push(list_elem_54);
3390 }
3391 i_prot.read_list_end()?;
3392 f_5 = Some(val);
3393 },
3394 6 => {
3395 let list_ident = i_prot.read_list_begin()?;
3396 let mut val: Vec<BTreeMap<String, String>> = Vec::with_capacity(list_ident.size as usize);
3397 for _ in 0..list_ident.size {
3398 let map_ident = i_prot.read_map_begin()?;
3399 let mut list_elem_55: BTreeMap<String, String> = BTreeMap::new();
3400 for _ in 0..map_ident.size {
3401 let map_key_56 = i_prot.read_string()?;
3402 let map_val_57 = i_prot.read_string()?;
3403 list_elem_55.insert(map_key_56, map_val_57);
3404 }
3405 i_prot.read_map_end()?;
3406 val.push(list_elem_55);
3407 }
3408 i_prot.read_list_end()?;
3409 f_6 = Some(val);
3410 },
3411 7 => {
3412 let list_ident = i_prot.read_list_begin()?;
3413 let mut val: Vec<BTreeMap<String, String>> = Vec::with_capacity(list_ident.size as usize);
3414 for _ in 0..list_ident.size {
3415 let map_ident = i_prot.read_map_begin()?;
3416 let mut list_elem_58: BTreeMap<String, String> = BTreeMap::new();
3417 for _ in 0..map_ident.size {
3418 let map_key_59 = i_prot.read_string()?;
3419 let map_val_60 = i_prot.read_string()?;
3420 list_elem_58.insert(map_key_59, map_val_60);
3421 }
3422 i_prot.read_map_end()?;
3423 val.push(list_elem_58);
3424 }
3425 i_prot.read_list_end()?;
3426 f_7 = Some(val);
3427 },
3428 8 => {
3429 let list_ident = i_prot.read_list_begin()?;
3430 let mut val: Vec<BTreeMap<String, String>> = Vec::with_capacity(list_ident.size as usize);
3431 for _ in 0..list_ident.size {
3432 let map_ident = i_prot.read_map_begin()?;
3433 let mut list_elem_61: BTreeMap<String, String> = BTreeMap::new();
3434 for _ in 0..map_ident.size {
3435 let map_key_62 = i_prot.read_string()?;
3436 let map_val_63 = i_prot.read_string()?;
3437 list_elem_61.insert(map_key_62, map_val_63);
3438 }
3439 i_prot.read_map_end()?;
3440 val.push(list_elem_61);
3441 }
3442 i_prot.read_list_end()?;
3443 f_8 = Some(val);
3444 },
3445 9 => {
3446 let list_ident = i_prot.read_list_begin()?;
3447 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
3448 for _ in 0..list_ident.size {
3449 let list_elem_64 = i_prot.read_string()?;
3450 val.push(list_elem_64);
3451 }
3452 i_prot.read_list_end()?;
3453 f_9 = Some(val);
3454 },
3455 _ => {
3456 i_prot.skip(field_ident.field_type)?;
3457 },
3458 };
3459 i_prot.read_field_end()?;
3460 }
3461 i_prot.read_struct_end()?;
3462 verify_required_field_exists("TSCreateMultiTimeseriesReq.session_id", &f_1)?;
3463 verify_required_field_exists("TSCreateMultiTimeseriesReq.paths", &f_2)?;
3464 verify_required_field_exists("TSCreateMultiTimeseriesReq.data_types", &f_3)?;
3465 verify_required_field_exists("TSCreateMultiTimeseriesReq.encodings", &f_4)?;
3466 verify_required_field_exists("TSCreateMultiTimeseriesReq.compressors", &f_5)?;
3467 let ret = TSCreateMultiTimeseriesReq {
3468 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
3469 paths: f_2.expect("auto-generated code should have checked for presence of required fields"),
3470 data_types: f_3.expect("auto-generated code should have checked for presence of required fields"),
3471 encodings: f_4.expect("auto-generated code should have checked for presence of required fields"),
3472 compressors: f_5.expect("auto-generated code should have checked for presence of required fields"),
3473 props_list: f_6,
3474 tags_list: f_7,
3475 attributes_list: f_8,
3476 measurement_alias_list: f_9,
3477 };
3478 Ok(ret)
3479 }
3480 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3481 let struct_ident = TStructIdentifier::new("TSCreateMultiTimeseriesReq");
3482 o_prot.write_struct_begin(&struct_ident)?;
3483 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
3484 o_prot.write_i64(self.session_id)?;
3485 o_prot.write_field_end()?;
3486 o_prot.write_field_begin(&TFieldIdentifier::new("paths", TType::List, 2))?;
3487 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.paths.len() as i32))?;
3488 for e in &self.paths {
3489 o_prot.write_string(e)?;
3490 o_prot.write_list_end()?;
3491 }
3492 o_prot.write_field_end()?;
3493 o_prot.write_field_begin(&TFieldIdentifier::new("dataTypes", TType::List, 3))?;
3494 o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.data_types.len() as i32))?;
3495 for e in &self.data_types {
3496 o_prot.write_i32(*e)?;
3497 o_prot.write_list_end()?;
3498 }
3499 o_prot.write_field_end()?;
3500 o_prot.write_field_begin(&TFieldIdentifier::new("encodings", TType::List, 4))?;
3501 o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.encodings.len() as i32))?;
3502 for e in &self.encodings {
3503 o_prot.write_i32(*e)?;
3504 o_prot.write_list_end()?;
3505 }
3506 o_prot.write_field_end()?;
3507 o_prot.write_field_begin(&TFieldIdentifier::new("compressors", TType::List, 5))?;
3508 o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.compressors.len() as i32))?;
3509 for e in &self.compressors {
3510 o_prot.write_i32(*e)?;
3511 o_prot.write_list_end()?;
3512 }
3513 o_prot.write_field_end()?;
3514 if let Some(ref fld_var) = self.props_list {
3515 o_prot.write_field_begin(&TFieldIdentifier::new("propsList", TType::List, 6))?;
3516 o_prot.write_list_begin(&TListIdentifier::new(TType::Map, fld_var.len() as i32))?;
3517 for e in fld_var {
3518 o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, e.len() as i32))?;
3519 for (k, v) in e {
3520 o_prot.write_string(k)?;
3521 o_prot.write_string(v)?;
3522 o_prot.write_map_end()?;
3523 }
3524 o_prot.write_list_end()?;
3525 }
3526 o_prot.write_field_end()?;
3527 ()
3528 } else {
3529 ()
3530 }
3531 if let Some(ref fld_var) = self.tags_list {
3532 o_prot.write_field_begin(&TFieldIdentifier::new("tagsList", TType::List, 7))?;
3533 o_prot.write_list_begin(&TListIdentifier::new(TType::Map, fld_var.len() as i32))?;
3534 for e in fld_var {
3535 o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, e.len() as i32))?;
3536 for (k, v) in e {
3537 o_prot.write_string(k)?;
3538 o_prot.write_string(v)?;
3539 o_prot.write_map_end()?;
3540 }
3541 o_prot.write_list_end()?;
3542 }
3543 o_prot.write_field_end()?;
3544 ()
3545 } else {
3546 ()
3547 }
3548 if let Some(ref fld_var) = self.attributes_list {
3549 o_prot.write_field_begin(&TFieldIdentifier::new("attributesList", TType::List, 8))?;
3550 o_prot.write_list_begin(&TListIdentifier::new(TType::Map, fld_var.len() as i32))?;
3551 for e in fld_var {
3552 o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, e.len() as i32))?;
3553 for (k, v) in e {
3554 o_prot.write_string(k)?;
3555 o_prot.write_string(v)?;
3556 o_prot.write_map_end()?;
3557 }
3558 o_prot.write_list_end()?;
3559 }
3560 o_prot.write_field_end()?;
3561 ()
3562 } else {
3563 ()
3564 }
3565 if let Some(ref fld_var) = self.measurement_alias_list {
3566 o_prot.write_field_begin(&TFieldIdentifier::new("measurementAliasList", TType::List, 9))?;
3567 o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?;
3568 for e in fld_var {
3569 o_prot.write_string(e)?;
3570 o_prot.write_list_end()?;
3571 }
3572 o_prot.write_field_end()?;
3573 ()
3574 } else {
3575 ()
3576 }
3577 o_prot.write_field_stop()?;
3578 o_prot.write_struct_end()
3579 }
3580}
3581
3582#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3587pub struct ServerProperties {
3588 pub version: String,
3589 pub supported_time_aggregation_operations: Vec<String>,
3590 pub timestamp_precision: String,
3591}
3592
3593impl ServerProperties {
3594 pub fn new(version: String, supported_time_aggregation_operations: Vec<String>, timestamp_precision: String) -> ServerProperties {
3595 ServerProperties {
3596 version: version,
3597 supported_time_aggregation_operations: supported_time_aggregation_operations,
3598 timestamp_precision: timestamp_precision,
3599 }
3600 }
3601 pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<ServerProperties> {
3602 i_prot.read_struct_begin()?;
3603 let mut f_1: Option<String> = None;
3604 let mut f_2: Option<Vec<String>> = None;
3605 let mut f_3: Option<String> = None;
3606 loop {
3607 let field_ident = i_prot.read_field_begin()?;
3608 if field_ident.field_type == TType::Stop {
3609 break;
3610 }
3611 let field_id = field_id(&field_ident)?;
3612 match field_id {
3613 1 => {
3614 let val = i_prot.read_string()?;
3615 f_1 = Some(val);
3616 },
3617 2 => {
3618 let list_ident = i_prot.read_list_begin()?;
3619 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
3620 for _ in 0..list_ident.size {
3621 let list_elem_65 = i_prot.read_string()?;
3622 val.push(list_elem_65);
3623 }
3624 i_prot.read_list_end()?;
3625 f_2 = Some(val);
3626 },
3627 3 => {
3628 let val = i_prot.read_string()?;
3629 f_3 = Some(val);
3630 },
3631 _ => {
3632 i_prot.skip(field_ident.field_type)?;
3633 },
3634 };
3635 i_prot.read_field_end()?;
3636 }
3637 i_prot.read_struct_end()?;
3638 verify_required_field_exists("ServerProperties.version", &f_1)?;
3639 verify_required_field_exists("ServerProperties.supported_time_aggregation_operations", &f_2)?;
3640 verify_required_field_exists("ServerProperties.timestamp_precision", &f_3)?;
3641 let ret = ServerProperties {
3642 version: f_1.expect("auto-generated code should have checked for presence of required fields"),
3643 supported_time_aggregation_operations: f_2.expect("auto-generated code should have checked for presence of required fields"),
3644 timestamp_precision: f_3.expect("auto-generated code should have checked for presence of required fields"),
3645 };
3646 Ok(ret)
3647 }
3648 pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
3649 let struct_ident = TStructIdentifier::new("ServerProperties");
3650 o_prot.write_struct_begin(&struct_ident)?;
3651 o_prot.write_field_begin(&TFieldIdentifier::new("version", TType::String, 1))?;
3652 o_prot.write_string(&self.version)?;
3653 o_prot.write_field_end()?;
3654 o_prot.write_field_begin(&TFieldIdentifier::new("supportedTimeAggregationOperations", TType::List, 2))?;
3655 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.supported_time_aggregation_operations.len() as i32))?;
3656 for e in &self.supported_time_aggregation_operations {
3657 o_prot.write_string(e)?;
3658 o_prot.write_list_end()?;
3659 }
3660 o_prot.write_field_end()?;
3661 o_prot.write_field_begin(&TFieldIdentifier::new("timestampPrecision", TType::String, 3))?;
3662 o_prot.write_string(&self.timestamp_precision)?;
3663 o_prot.write_field_end()?;
3664 o_prot.write_field_stop()?;
3665 o_prot.write_struct_end()
3666 }
3667}
3668
3669pub trait TTSIServiceSyncClient {
3674 fn open_session(&mut self, req: TSOpenSessionReq) -> thrift::Result<TSOpenSessionResp>;
3675 fn close_session(&mut self, req: TSCloseSessionReq) -> thrift::Result<TSStatus>;
3676 fn execute_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>;
3677 fn execute_batch_statement(&mut self, req: TSExecuteBatchStatementReq) -> thrift::Result<TSStatus>;
3678 fn execute_query_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>;
3679 fn execute_update_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>;
3680 fn fetch_results(&mut self, req: TSFetchResultsReq) -> thrift::Result<TSFetchResultsResp>;
3681 fn fetch_metadata(&mut self, req: TSFetchMetadataReq) -> thrift::Result<TSFetchMetadataResp>;
3682 fn cancel_operation(&mut self, req: TSCancelOperationReq) -> thrift::Result<TSStatus>;
3683 fn close_operation(&mut self, req: TSCloseOperationReq) -> thrift::Result<TSStatus>;
3684 fn get_time_zone(&mut self, session_id: i64) -> thrift::Result<TSGetTimeZoneResp>;
3685 fn set_time_zone(&mut self, req: TSSetTimeZoneReq) -> thrift::Result<TSStatus>;
3686 fn get_properties(&mut self) -> thrift::Result<ServerProperties>;
3687 fn set_storage_group(&mut self, session_id: i64, storage_group: String) -> thrift::Result<TSStatus>;
3688 fn create_timeseries(&mut self, req: TSCreateTimeseriesReq) -> thrift::Result<TSStatus>;
3689 fn create_multi_timeseries(&mut self, req: TSCreateMultiTimeseriesReq) -> thrift::Result<TSStatus>;
3690 fn delete_timeseries(&mut self, session_id: i64, path: Vec<String>) -> thrift::Result<TSStatus>;
3691 fn delete_storage_groups(&mut self, session_id: i64, storage_group: Vec<String>) -> thrift::Result<TSStatus>;
3692 fn insert_record(&mut self, req: TSInsertRecordReq) -> thrift::Result<TSStatus>;
3693 fn insert_string_record(&mut self, req: TSInsertStringRecordReq) -> thrift::Result<TSStatus>;
3694 fn insert_tablet(&mut self, req: TSInsertTabletReq) -> thrift::Result<TSStatus>;
3695 fn insert_tablets(&mut self, req: TSInsertTabletsReq) -> thrift::Result<TSStatus>;
3696 fn insert_records(&mut self, req: TSInsertRecordsReq) -> thrift::Result<TSStatus>;
3697 fn insert_records_of_one_device(&mut self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<TSStatus>;
3698 fn insert_string_records(&mut self, req: TSInsertStringRecordsReq) -> thrift::Result<TSStatus>;
3699 fn test_insert_tablet(&mut self, req: TSInsertTabletReq) -> thrift::Result<TSStatus>;
3700 fn test_insert_tablets(&mut self, req: TSInsertTabletsReq) -> thrift::Result<TSStatus>;
3701 fn test_insert_record(&mut self, req: TSInsertRecordReq) -> thrift::Result<TSStatus>;
3702 fn test_insert_string_record(&mut self, req: TSInsertStringRecordReq) -> thrift::Result<TSStatus>;
3703 fn test_insert_records(&mut self, req: TSInsertRecordsReq) -> thrift::Result<TSStatus>;
3704 fn test_insert_records_of_one_device(&mut self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<TSStatus>;
3705 fn test_insert_string_records(&mut self, req: TSInsertStringRecordsReq) -> thrift::Result<TSStatus>;
3706 fn delete_data(&mut self, req: TSDeleteDataReq) -> thrift::Result<TSStatus>;
3707 fn execute_raw_data_query(&mut self, req: TSRawDataQueryReq) -> thrift::Result<TSExecuteStatementResp>;
3708 fn request_statement_id(&mut self, session_id: i64) -> thrift::Result<i64>;
3709}
3710
3711pub trait TTSIServiceSyncClientMarker {}
3712
3713pub struct TSIServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {
3714 _i_prot: IP,
3715 _o_prot: OP,
3716 _sequence_number: i32,
3717}
3718
3719impl <IP, OP> TSIServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {
3720 pub fn new(input_protocol: IP, output_protocol: OP) -> TSIServiceSyncClient<IP, OP> {
3721 TSIServiceSyncClient { _i_prot: input_protocol, _o_prot: output_protocol, _sequence_number: 0 }
3722 }
3723}
3724
3725impl <IP, OP> TThriftClient for TSIServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {
3726 fn i_prot_mut(&mut self) -> &mut dyn TInputProtocol { &mut self._i_prot }
3727 fn o_prot_mut(&mut self) -> &mut dyn TOutputProtocol { &mut self._o_prot }
3728 fn sequence_number(&self) -> i32 { self._sequence_number }
3729 fn increment_sequence_number(&mut self) -> i32 { self._sequence_number += 1; self._sequence_number }
3730}
3731
3732impl <IP, OP> TTSIServiceSyncClientMarker for TSIServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {}
3733
3734impl <C: TThriftClient + TTSIServiceSyncClientMarker> TTSIServiceSyncClient for C {
3735 fn open_session(&mut self, req: TSOpenSessionReq) -> thrift::Result<TSOpenSessionResp> {
3736 (
3737 {
3738 self.increment_sequence_number();
3739 let message_ident = TMessageIdentifier::new("openSession", TMessageType::Call, self.sequence_number());
3740 let call_args = TSIServiceOpenSessionArgs { req: req };
3741 self.o_prot_mut().write_message_begin(&message_ident)?;
3742 call_args.write_to_out_protocol(self.o_prot_mut())?;
3743 self.o_prot_mut().write_message_end()?;
3744 self.o_prot_mut().flush()
3745 }
3746 )?;
3747 {
3748 let message_ident = self.i_prot_mut().read_message_begin()?;
3749 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
3750 verify_expected_service_call("openSession", &message_ident.name)?;
3751 if message_ident.message_type == TMessageType::Exception {
3752 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
3753 self.i_prot_mut().read_message_end()?;
3754 return Err(thrift::Error::Application(remote_error))
3755 }
3756 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
3757 let result = TSIServiceOpenSessionResult::read_from_in_protocol(self.i_prot_mut())?;
3758 self.i_prot_mut().read_message_end()?;
3759 result.ok_or()
3760 }
3761 }
3762 fn close_session(&mut self, req: TSCloseSessionReq) -> thrift::Result<TSStatus> {
3763 (
3764 {
3765 self.increment_sequence_number();
3766 let message_ident = TMessageIdentifier::new("closeSession", TMessageType::Call, self.sequence_number());
3767 let call_args = TSIServiceCloseSessionArgs { req: req };
3768 self.o_prot_mut().write_message_begin(&message_ident)?;
3769 call_args.write_to_out_protocol(self.o_prot_mut())?;
3770 self.o_prot_mut().write_message_end()?;
3771 self.o_prot_mut().flush()
3772 }
3773 )?;
3774 {
3775 let message_ident = self.i_prot_mut().read_message_begin()?;
3776 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
3777 verify_expected_service_call("closeSession", &message_ident.name)?;
3778 if message_ident.message_type == TMessageType::Exception {
3779 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
3780 self.i_prot_mut().read_message_end()?;
3781 return Err(thrift::Error::Application(remote_error))
3782 }
3783 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
3784 let result = TSIServiceCloseSessionResult::read_from_in_protocol(self.i_prot_mut())?;
3785 self.i_prot_mut().read_message_end()?;
3786 result.ok_or()
3787 }
3788 }
3789 fn execute_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp> {
3790 (
3791 {
3792 self.increment_sequence_number();
3793 let message_ident = TMessageIdentifier::new("executeStatement", TMessageType::Call, self.sequence_number());
3794 let call_args = TSIServiceExecuteStatementArgs { req: req };
3795 self.o_prot_mut().write_message_begin(&message_ident)?;
3796 call_args.write_to_out_protocol(self.o_prot_mut())?;
3797 self.o_prot_mut().write_message_end()?;
3798 self.o_prot_mut().flush()
3799 }
3800 )?;
3801 {
3802 let message_ident = self.i_prot_mut().read_message_begin()?;
3803 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
3804 verify_expected_service_call("executeStatement", &message_ident.name)?;
3805 if message_ident.message_type == TMessageType::Exception {
3806 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
3807 self.i_prot_mut().read_message_end()?;
3808 return Err(thrift::Error::Application(remote_error))
3809 }
3810 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
3811 let result = TSIServiceExecuteStatementResult::read_from_in_protocol(self.i_prot_mut())?;
3812 self.i_prot_mut().read_message_end()?;
3813 result.ok_or()
3814 }
3815 }
3816 fn execute_batch_statement(&mut self, req: TSExecuteBatchStatementReq) -> thrift::Result<TSStatus> {
3817 (
3818 {
3819 self.increment_sequence_number();
3820 let message_ident = TMessageIdentifier::new("executeBatchStatement", TMessageType::Call, self.sequence_number());
3821 let call_args = TSIServiceExecuteBatchStatementArgs { req: req };
3822 self.o_prot_mut().write_message_begin(&message_ident)?;
3823 call_args.write_to_out_protocol(self.o_prot_mut())?;
3824 self.o_prot_mut().write_message_end()?;
3825 self.o_prot_mut().flush()
3826 }
3827 )?;
3828 {
3829 let message_ident = self.i_prot_mut().read_message_begin()?;
3830 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
3831 verify_expected_service_call("executeBatchStatement", &message_ident.name)?;
3832 if message_ident.message_type == TMessageType::Exception {
3833 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
3834 self.i_prot_mut().read_message_end()?;
3835 return Err(thrift::Error::Application(remote_error))
3836 }
3837 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
3838 let result = TSIServiceExecuteBatchStatementResult::read_from_in_protocol(self.i_prot_mut())?;
3839 self.i_prot_mut().read_message_end()?;
3840 result.ok_or()
3841 }
3842 }
3843 fn execute_query_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp> {
3844 (
3845 {
3846 self.increment_sequence_number();
3847 let message_ident = TMessageIdentifier::new("executeQueryStatement", TMessageType::Call, self.sequence_number());
3848 let call_args = TSIServiceExecuteQueryStatementArgs { req: req };
3849 self.o_prot_mut().write_message_begin(&message_ident)?;
3850 call_args.write_to_out_protocol(self.o_prot_mut())?;
3851 self.o_prot_mut().write_message_end()?;
3852 self.o_prot_mut().flush()
3853 }
3854 )?;
3855 {
3856 let message_ident = self.i_prot_mut().read_message_begin()?;
3857 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
3858 verify_expected_service_call("executeQueryStatement", &message_ident.name)?;
3859 if message_ident.message_type == TMessageType::Exception {
3860 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
3861 self.i_prot_mut().read_message_end()?;
3862 return Err(thrift::Error::Application(remote_error))
3863 }
3864 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
3865 let result = TSIServiceExecuteQueryStatementResult::read_from_in_protocol(self.i_prot_mut())?;
3866 self.i_prot_mut().read_message_end()?;
3867 result.ok_or()
3868 }
3869 }
3870 fn execute_update_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp> {
3871 (
3872 {
3873 self.increment_sequence_number();
3874 let message_ident = TMessageIdentifier::new("executeUpdateStatement", TMessageType::Call, self.sequence_number());
3875 let call_args = TSIServiceExecuteUpdateStatementArgs { req: req };
3876 self.o_prot_mut().write_message_begin(&message_ident)?;
3877 call_args.write_to_out_protocol(self.o_prot_mut())?;
3878 self.o_prot_mut().write_message_end()?;
3879 self.o_prot_mut().flush()
3880 }
3881 )?;
3882 {
3883 let message_ident = self.i_prot_mut().read_message_begin()?;
3884 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
3885 verify_expected_service_call("executeUpdateStatement", &message_ident.name)?;
3886 if message_ident.message_type == TMessageType::Exception {
3887 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
3888 self.i_prot_mut().read_message_end()?;
3889 return Err(thrift::Error::Application(remote_error))
3890 }
3891 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
3892 let result = TSIServiceExecuteUpdateStatementResult::read_from_in_protocol(self.i_prot_mut())?;
3893 self.i_prot_mut().read_message_end()?;
3894 result.ok_or()
3895 }
3896 }
3897 fn fetch_results(&mut self, req: TSFetchResultsReq) -> thrift::Result<TSFetchResultsResp> {
3898 (
3899 {
3900 self.increment_sequence_number();
3901 let message_ident = TMessageIdentifier::new("fetchResults", TMessageType::Call, self.sequence_number());
3902 let call_args = TSIServiceFetchResultsArgs { req: req };
3903 self.o_prot_mut().write_message_begin(&message_ident)?;
3904 call_args.write_to_out_protocol(self.o_prot_mut())?;
3905 self.o_prot_mut().write_message_end()?;
3906 self.o_prot_mut().flush()
3907 }
3908 )?;
3909 {
3910 let message_ident = self.i_prot_mut().read_message_begin()?;
3911 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
3912 verify_expected_service_call("fetchResults", &message_ident.name)?;
3913 if message_ident.message_type == TMessageType::Exception {
3914 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
3915 self.i_prot_mut().read_message_end()?;
3916 return Err(thrift::Error::Application(remote_error))
3917 }
3918 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
3919 let result = TSIServiceFetchResultsResult::read_from_in_protocol(self.i_prot_mut())?;
3920 self.i_prot_mut().read_message_end()?;
3921 result.ok_or()
3922 }
3923 }
3924 fn fetch_metadata(&mut self, req: TSFetchMetadataReq) -> thrift::Result<TSFetchMetadataResp> {
3925 (
3926 {
3927 self.increment_sequence_number();
3928 let message_ident = TMessageIdentifier::new("fetchMetadata", TMessageType::Call, self.sequence_number());
3929 let call_args = TSIServiceFetchMetadataArgs { req: req };
3930 self.o_prot_mut().write_message_begin(&message_ident)?;
3931 call_args.write_to_out_protocol(self.o_prot_mut())?;
3932 self.o_prot_mut().write_message_end()?;
3933 self.o_prot_mut().flush()
3934 }
3935 )?;
3936 {
3937 let message_ident = self.i_prot_mut().read_message_begin()?;
3938 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
3939 verify_expected_service_call("fetchMetadata", &message_ident.name)?;
3940 if message_ident.message_type == TMessageType::Exception {
3941 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
3942 self.i_prot_mut().read_message_end()?;
3943 return Err(thrift::Error::Application(remote_error))
3944 }
3945 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
3946 let result = TSIServiceFetchMetadataResult::read_from_in_protocol(self.i_prot_mut())?;
3947 self.i_prot_mut().read_message_end()?;
3948 result.ok_or()
3949 }
3950 }
3951 fn cancel_operation(&mut self, req: TSCancelOperationReq) -> thrift::Result<TSStatus> {
3952 (
3953 {
3954 self.increment_sequence_number();
3955 let message_ident = TMessageIdentifier::new("cancelOperation", TMessageType::Call, self.sequence_number());
3956 let call_args = TSIServiceCancelOperationArgs { req: req };
3957 self.o_prot_mut().write_message_begin(&message_ident)?;
3958 call_args.write_to_out_protocol(self.o_prot_mut())?;
3959 self.o_prot_mut().write_message_end()?;
3960 self.o_prot_mut().flush()
3961 }
3962 )?;
3963 {
3964 let message_ident = self.i_prot_mut().read_message_begin()?;
3965 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
3966 verify_expected_service_call("cancelOperation", &message_ident.name)?;
3967 if message_ident.message_type == TMessageType::Exception {
3968 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
3969 self.i_prot_mut().read_message_end()?;
3970 return Err(thrift::Error::Application(remote_error))
3971 }
3972 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
3973 let result = TSIServiceCancelOperationResult::read_from_in_protocol(self.i_prot_mut())?;
3974 self.i_prot_mut().read_message_end()?;
3975 result.ok_or()
3976 }
3977 }
3978 fn close_operation(&mut self, req: TSCloseOperationReq) -> thrift::Result<TSStatus> {
3979 (
3980 {
3981 self.increment_sequence_number();
3982 let message_ident = TMessageIdentifier::new("closeOperation", TMessageType::Call, self.sequence_number());
3983 let call_args = TSIServiceCloseOperationArgs { req: req };
3984 self.o_prot_mut().write_message_begin(&message_ident)?;
3985 call_args.write_to_out_protocol(self.o_prot_mut())?;
3986 self.o_prot_mut().write_message_end()?;
3987 self.o_prot_mut().flush()
3988 }
3989 )?;
3990 {
3991 let message_ident = self.i_prot_mut().read_message_begin()?;
3992 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
3993 verify_expected_service_call("closeOperation", &message_ident.name)?;
3994 if message_ident.message_type == TMessageType::Exception {
3995 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
3996 self.i_prot_mut().read_message_end()?;
3997 return Err(thrift::Error::Application(remote_error))
3998 }
3999 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4000 let result = TSIServiceCloseOperationResult::read_from_in_protocol(self.i_prot_mut())?;
4001 self.i_prot_mut().read_message_end()?;
4002 result.ok_or()
4003 }
4004 }
4005 fn get_time_zone(&mut self, session_id: i64) -> thrift::Result<TSGetTimeZoneResp> {
4006 (
4007 {
4008 self.increment_sequence_number();
4009 let message_ident = TMessageIdentifier::new("getTimeZone", TMessageType::Call, self.sequence_number());
4010 let call_args = TSIServiceGetTimeZoneArgs { session_id: session_id };
4011 self.o_prot_mut().write_message_begin(&message_ident)?;
4012 call_args.write_to_out_protocol(self.o_prot_mut())?;
4013 self.o_prot_mut().write_message_end()?;
4014 self.o_prot_mut().flush()
4015 }
4016 )?;
4017 {
4018 let message_ident = self.i_prot_mut().read_message_begin()?;
4019 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4020 verify_expected_service_call("getTimeZone", &message_ident.name)?;
4021 if message_ident.message_type == TMessageType::Exception {
4022 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4023 self.i_prot_mut().read_message_end()?;
4024 return Err(thrift::Error::Application(remote_error))
4025 }
4026 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4027 let result = TSIServiceGetTimeZoneResult::read_from_in_protocol(self.i_prot_mut())?;
4028 self.i_prot_mut().read_message_end()?;
4029 result.ok_or()
4030 }
4031 }
4032 fn set_time_zone(&mut self, req: TSSetTimeZoneReq) -> thrift::Result<TSStatus> {
4033 (
4034 {
4035 self.increment_sequence_number();
4036 let message_ident = TMessageIdentifier::new("setTimeZone", TMessageType::Call, self.sequence_number());
4037 let call_args = TSIServiceSetTimeZoneArgs { req: req };
4038 self.o_prot_mut().write_message_begin(&message_ident)?;
4039 call_args.write_to_out_protocol(self.o_prot_mut())?;
4040 self.o_prot_mut().write_message_end()?;
4041 self.o_prot_mut().flush()
4042 }
4043 )?;
4044 {
4045 let message_ident = self.i_prot_mut().read_message_begin()?;
4046 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4047 verify_expected_service_call("setTimeZone", &message_ident.name)?;
4048 if message_ident.message_type == TMessageType::Exception {
4049 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4050 self.i_prot_mut().read_message_end()?;
4051 return Err(thrift::Error::Application(remote_error))
4052 }
4053 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4054 let result = TSIServiceSetTimeZoneResult::read_from_in_protocol(self.i_prot_mut())?;
4055 self.i_prot_mut().read_message_end()?;
4056 result.ok_or()
4057 }
4058 }
4059 fn get_properties(&mut self) -> thrift::Result<ServerProperties> {
4060 (
4061 {
4062 self.increment_sequence_number();
4063 let message_ident = TMessageIdentifier::new("getProperties", TMessageType::Call, self.sequence_number());
4064 let call_args = TSIServiceGetPropertiesArgs { };
4065 self.o_prot_mut().write_message_begin(&message_ident)?;
4066 call_args.write_to_out_protocol(self.o_prot_mut())?;
4067 self.o_prot_mut().write_message_end()?;
4068 self.o_prot_mut().flush()
4069 }
4070 )?;
4071 {
4072 let message_ident = self.i_prot_mut().read_message_begin()?;
4073 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4074 verify_expected_service_call("getProperties", &message_ident.name)?;
4075 if message_ident.message_type == TMessageType::Exception {
4076 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4077 self.i_prot_mut().read_message_end()?;
4078 return Err(thrift::Error::Application(remote_error))
4079 }
4080 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4081 let result = TSIServiceGetPropertiesResult::read_from_in_protocol(self.i_prot_mut())?;
4082 self.i_prot_mut().read_message_end()?;
4083 result.ok_or()
4084 }
4085 }
4086 fn set_storage_group(&mut self, session_id: i64, storage_group: String) -> thrift::Result<TSStatus> {
4087 (
4088 {
4089 self.increment_sequence_number();
4090 let message_ident = TMessageIdentifier::new("setStorageGroup", TMessageType::Call, self.sequence_number());
4091 let call_args = TSIServiceSetStorageGroupArgs { session_id: session_id, storage_group: storage_group };
4092 self.o_prot_mut().write_message_begin(&message_ident)?;
4093 call_args.write_to_out_protocol(self.o_prot_mut())?;
4094 self.o_prot_mut().write_message_end()?;
4095 self.o_prot_mut().flush()
4096 }
4097 )?;
4098 {
4099 let message_ident = self.i_prot_mut().read_message_begin()?;
4100 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4101 verify_expected_service_call("setStorageGroup", &message_ident.name)?;
4102 if message_ident.message_type == TMessageType::Exception {
4103 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4104 self.i_prot_mut().read_message_end()?;
4105 return Err(thrift::Error::Application(remote_error))
4106 }
4107 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4108 let result = TSIServiceSetStorageGroupResult::read_from_in_protocol(self.i_prot_mut())?;
4109 self.i_prot_mut().read_message_end()?;
4110 result.ok_or()
4111 }
4112 }
4113 fn create_timeseries(&mut self, req: TSCreateTimeseriesReq) -> thrift::Result<TSStatus> {
4114 (
4115 {
4116 self.increment_sequence_number();
4117 let message_ident = TMessageIdentifier::new("createTimeseries", TMessageType::Call, self.sequence_number());
4118 let call_args = TSIServiceCreateTimeseriesArgs { req: req };
4119 self.o_prot_mut().write_message_begin(&message_ident)?;
4120 call_args.write_to_out_protocol(self.o_prot_mut())?;
4121 self.o_prot_mut().write_message_end()?;
4122 self.o_prot_mut().flush()
4123 }
4124 )?;
4125 {
4126 let message_ident = self.i_prot_mut().read_message_begin()?;
4127 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4128 verify_expected_service_call("createTimeseries", &message_ident.name)?;
4129 if message_ident.message_type == TMessageType::Exception {
4130 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4131 self.i_prot_mut().read_message_end()?;
4132 return Err(thrift::Error::Application(remote_error))
4133 }
4134 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4135 let result = TSIServiceCreateTimeseriesResult::read_from_in_protocol(self.i_prot_mut())?;
4136 self.i_prot_mut().read_message_end()?;
4137 result.ok_or()
4138 }
4139 }
4140 fn create_multi_timeseries(&mut self, req: TSCreateMultiTimeseriesReq) -> thrift::Result<TSStatus> {
4141 (
4142 {
4143 self.increment_sequence_number();
4144 let message_ident = TMessageIdentifier::new("createMultiTimeseries", TMessageType::Call, self.sequence_number());
4145 let call_args = TSIServiceCreateMultiTimeseriesArgs { req: req };
4146 self.o_prot_mut().write_message_begin(&message_ident)?;
4147 call_args.write_to_out_protocol(self.o_prot_mut())?;
4148 self.o_prot_mut().write_message_end()?;
4149 self.o_prot_mut().flush()
4150 }
4151 )?;
4152 {
4153 let message_ident = self.i_prot_mut().read_message_begin()?;
4154 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4155 verify_expected_service_call("createMultiTimeseries", &message_ident.name)?;
4156 if message_ident.message_type == TMessageType::Exception {
4157 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4158 self.i_prot_mut().read_message_end()?;
4159 return Err(thrift::Error::Application(remote_error))
4160 }
4161 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4162 let result = TSIServiceCreateMultiTimeseriesResult::read_from_in_protocol(self.i_prot_mut())?;
4163 self.i_prot_mut().read_message_end()?;
4164 result.ok_or()
4165 }
4166 }
4167 fn delete_timeseries(&mut self, session_id: i64, path: Vec<String>) -> thrift::Result<TSStatus> {
4168 (
4169 {
4170 self.increment_sequence_number();
4171 let message_ident = TMessageIdentifier::new("deleteTimeseries", TMessageType::Call, self.sequence_number());
4172 let call_args = TSIServiceDeleteTimeseriesArgs { session_id: session_id, path: path };
4173 self.o_prot_mut().write_message_begin(&message_ident)?;
4174 call_args.write_to_out_protocol(self.o_prot_mut())?;
4175 self.o_prot_mut().write_message_end()?;
4176 self.o_prot_mut().flush()
4177 }
4178 )?;
4179 {
4180 let message_ident = self.i_prot_mut().read_message_begin()?;
4181 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4182 verify_expected_service_call("deleteTimeseries", &message_ident.name)?;
4183 if message_ident.message_type == TMessageType::Exception {
4184 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4185 self.i_prot_mut().read_message_end()?;
4186 return Err(thrift::Error::Application(remote_error))
4187 }
4188 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4189 let result = TSIServiceDeleteTimeseriesResult::read_from_in_protocol(self.i_prot_mut())?;
4190 self.i_prot_mut().read_message_end()?;
4191 result.ok_or()
4192 }
4193 }
4194 fn delete_storage_groups(&mut self, session_id: i64, storage_group: Vec<String>) -> thrift::Result<TSStatus> {
4195 (
4196 {
4197 self.increment_sequence_number();
4198 let message_ident = TMessageIdentifier::new("deleteStorageGroups", TMessageType::Call, self.sequence_number());
4199 let call_args = TSIServiceDeleteStorageGroupsArgs { session_id: session_id, storage_group: storage_group };
4200 self.o_prot_mut().write_message_begin(&message_ident)?;
4201 call_args.write_to_out_protocol(self.o_prot_mut())?;
4202 self.o_prot_mut().write_message_end()?;
4203 self.o_prot_mut().flush()
4204 }
4205 )?;
4206 {
4207 let message_ident = self.i_prot_mut().read_message_begin()?;
4208 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4209 verify_expected_service_call("deleteStorageGroups", &message_ident.name)?;
4210 if message_ident.message_type == TMessageType::Exception {
4211 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4212 self.i_prot_mut().read_message_end()?;
4213 return Err(thrift::Error::Application(remote_error))
4214 }
4215 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4216 let result = TSIServiceDeleteStorageGroupsResult::read_from_in_protocol(self.i_prot_mut())?;
4217 self.i_prot_mut().read_message_end()?;
4218 result.ok_or()
4219 }
4220 }
4221 fn insert_record(&mut self, req: TSInsertRecordReq) -> thrift::Result<TSStatus> {
4222 (
4223 {
4224 self.increment_sequence_number();
4225 let message_ident = TMessageIdentifier::new("insertRecord", TMessageType::Call, self.sequence_number());
4226 let call_args = TSIServiceInsertRecordArgs { req: req };
4227 self.o_prot_mut().write_message_begin(&message_ident)?;
4228 call_args.write_to_out_protocol(self.o_prot_mut())?;
4229 self.o_prot_mut().write_message_end()?;
4230 self.o_prot_mut().flush()
4231 }
4232 )?;
4233 {
4234 let message_ident = self.i_prot_mut().read_message_begin()?;
4235 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4236 verify_expected_service_call("insertRecord", &message_ident.name)?;
4237 if message_ident.message_type == TMessageType::Exception {
4238 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4239 self.i_prot_mut().read_message_end()?;
4240 return Err(thrift::Error::Application(remote_error))
4241 }
4242 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4243 let result = TSIServiceInsertRecordResult::read_from_in_protocol(self.i_prot_mut())?;
4244 self.i_prot_mut().read_message_end()?;
4245 result.ok_or()
4246 }
4247 }
4248 fn insert_string_record(&mut self, req: TSInsertStringRecordReq) -> thrift::Result<TSStatus> {
4249 (
4250 {
4251 self.increment_sequence_number();
4252 let message_ident = TMessageIdentifier::new("insertStringRecord", TMessageType::Call, self.sequence_number());
4253 let call_args = TSIServiceInsertStringRecordArgs { req: req };
4254 self.o_prot_mut().write_message_begin(&message_ident)?;
4255 call_args.write_to_out_protocol(self.o_prot_mut())?;
4256 self.o_prot_mut().write_message_end()?;
4257 self.o_prot_mut().flush()
4258 }
4259 )?;
4260 {
4261 let message_ident = self.i_prot_mut().read_message_begin()?;
4262 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4263 verify_expected_service_call("insertStringRecord", &message_ident.name)?;
4264 if message_ident.message_type == TMessageType::Exception {
4265 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4266 self.i_prot_mut().read_message_end()?;
4267 return Err(thrift::Error::Application(remote_error))
4268 }
4269 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4270 let result = TSIServiceInsertStringRecordResult::read_from_in_protocol(self.i_prot_mut())?;
4271 self.i_prot_mut().read_message_end()?;
4272 result.ok_or()
4273 }
4274 }
4275 fn insert_tablet(&mut self, req: TSInsertTabletReq) -> thrift::Result<TSStatus> {
4276 (
4277 {
4278 self.increment_sequence_number();
4279 let message_ident = TMessageIdentifier::new("insertTablet", TMessageType::Call, self.sequence_number());
4280 let call_args = TSIServiceInsertTabletArgs { req: req };
4281 self.o_prot_mut().write_message_begin(&message_ident)?;
4282 call_args.write_to_out_protocol(self.o_prot_mut())?;
4283 self.o_prot_mut().write_message_end()?;
4284 self.o_prot_mut().flush()
4285 }
4286 )?;
4287 {
4288 let message_ident = self.i_prot_mut().read_message_begin()?;
4289 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4290 verify_expected_service_call("insertTablet", &message_ident.name)?;
4291 if message_ident.message_type == TMessageType::Exception {
4292 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4293 self.i_prot_mut().read_message_end()?;
4294 return Err(thrift::Error::Application(remote_error))
4295 }
4296 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4297 let result = TSIServiceInsertTabletResult::read_from_in_protocol(self.i_prot_mut())?;
4298 self.i_prot_mut().read_message_end()?;
4299 result.ok_or()
4300 }
4301 }
4302 fn insert_tablets(&mut self, req: TSInsertTabletsReq) -> thrift::Result<TSStatus> {
4303 (
4304 {
4305 self.increment_sequence_number();
4306 let message_ident = TMessageIdentifier::new("insertTablets", TMessageType::Call, self.sequence_number());
4307 let call_args = TSIServiceInsertTabletsArgs { req: req };
4308 self.o_prot_mut().write_message_begin(&message_ident)?;
4309 call_args.write_to_out_protocol(self.o_prot_mut())?;
4310 self.o_prot_mut().write_message_end()?;
4311 self.o_prot_mut().flush()
4312 }
4313 )?;
4314 {
4315 let message_ident = self.i_prot_mut().read_message_begin()?;
4316 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4317 verify_expected_service_call("insertTablets", &message_ident.name)?;
4318 if message_ident.message_type == TMessageType::Exception {
4319 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4320 self.i_prot_mut().read_message_end()?;
4321 return Err(thrift::Error::Application(remote_error))
4322 }
4323 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4324 let result = TSIServiceInsertTabletsResult::read_from_in_protocol(self.i_prot_mut())?;
4325 self.i_prot_mut().read_message_end()?;
4326 result.ok_or()
4327 }
4328 }
4329 fn insert_records(&mut self, req: TSInsertRecordsReq) -> thrift::Result<TSStatus> {
4330 (
4331 {
4332 self.increment_sequence_number();
4333 let message_ident = TMessageIdentifier::new("insertRecords", TMessageType::Call, self.sequence_number());
4334 let call_args = TSIServiceInsertRecordsArgs { req: req };
4335 self.o_prot_mut().write_message_begin(&message_ident)?;
4336 call_args.write_to_out_protocol(self.o_prot_mut())?;
4337 self.o_prot_mut().write_message_end()?;
4338 self.o_prot_mut().flush()
4339 }
4340 )?;
4341 {
4342 let message_ident = self.i_prot_mut().read_message_begin()?;
4343 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4344 verify_expected_service_call("insertRecords", &message_ident.name)?;
4345 if message_ident.message_type == TMessageType::Exception {
4346 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4347 self.i_prot_mut().read_message_end()?;
4348 return Err(thrift::Error::Application(remote_error))
4349 }
4350 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4351 let result = TSIServiceInsertRecordsResult::read_from_in_protocol(self.i_prot_mut())?;
4352 self.i_prot_mut().read_message_end()?;
4353 result.ok_or()
4354 }
4355 }
4356 fn insert_records_of_one_device(&mut self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<TSStatus> {
4357 (
4358 {
4359 self.increment_sequence_number();
4360 let message_ident = TMessageIdentifier::new("insertRecordsOfOneDevice", TMessageType::Call, self.sequence_number());
4361 let call_args = TSIServiceInsertRecordsOfOneDeviceArgs { req: req };
4362 self.o_prot_mut().write_message_begin(&message_ident)?;
4363 call_args.write_to_out_protocol(self.o_prot_mut())?;
4364 self.o_prot_mut().write_message_end()?;
4365 self.o_prot_mut().flush()
4366 }
4367 )?;
4368 {
4369 let message_ident = self.i_prot_mut().read_message_begin()?;
4370 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4371 verify_expected_service_call("insertRecordsOfOneDevice", &message_ident.name)?;
4372 if message_ident.message_type == TMessageType::Exception {
4373 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4374 self.i_prot_mut().read_message_end()?;
4375 return Err(thrift::Error::Application(remote_error))
4376 }
4377 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4378 let result = TSIServiceInsertRecordsOfOneDeviceResult::read_from_in_protocol(self.i_prot_mut())?;
4379 self.i_prot_mut().read_message_end()?;
4380 result.ok_or()
4381 }
4382 }
4383 fn insert_string_records(&mut self, req: TSInsertStringRecordsReq) -> thrift::Result<TSStatus> {
4384 (
4385 {
4386 self.increment_sequence_number();
4387 let message_ident = TMessageIdentifier::new("insertStringRecords", TMessageType::Call, self.sequence_number());
4388 let call_args = TSIServiceInsertStringRecordsArgs { req: req };
4389 self.o_prot_mut().write_message_begin(&message_ident)?;
4390 call_args.write_to_out_protocol(self.o_prot_mut())?;
4391 self.o_prot_mut().write_message_end()?;
4392 self.o_prot_mut().flush()
4393 }
4394 )?;
4395 {
4396 let message_ident = self.i_prot_mut().read_message_begin()?;
4397 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4398 verify_expected_service_call("insertStringRecords", &message_ident.name)?;
4399 if message_ident.message_type == TMessageType::Exception {
4400 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4401 self.i_prot_mut().read_message_end()?;
4402 return Err(thrift::Error::Application(remote_error))
4403 }
4404 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4405 let result = TSIServiceInsertStringRecordsResult::read_from_in_protocol(self.i_prot_mut())?;
4406 self.i_prot_mut().read_message_end()?;
4407 result.ok_or()
4408 }
4409 }
4410 fn test_insert_tablet(&mut self, req: TSInsertTabletReq) -> thrift::Result<TSStatus> {
4411 (
4412 {
4413 self.increment_sequence_number();
4414 let message_ident = TMessageIdentifier::new("testInsertTablet", TMessageType::Call, self.sequence_number());
4415 let call_args = TSIServiceTestInsertTabletArgs { req: req };
4416 self.o_prot_mut().write_message_begin(&message_ident)?;
4417 call_args.write_to_out_protocol(self.o_prot_mut())?;
4418 self.o_prot_mut().write_message_end()?;
4419 self.o_prot_mut().flush()
4420 }
4421 )?;
4422 {
4423 let message_ident = self.i_prot_mut().read_message_begin()?;
4424 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4425 verify_expected_service_call("testInsertTablet", &message_ident.name)?;
4426 if message_ident.message_type == TMessageType::Exception {
4427 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4428 self.i_prot_mut().read_message_end()?;
4429 return Err(thrift::Error::Application(remote_error))
4430 }
4431 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4432 let result = TSIServiceTestInsertTabletResult::read_from_in_protocol(self.i_prot_mut())?;
4433 self.i_prot_mut().read_message_end()?;
4434 result.ok_or()
4435 }
4436 }
4437 fn test_insert_tablets(&mut self, req: TSInsertTabletsReq) -> thrift::Result<TSStatus> {
4438 (
4439 {
4440 self.increment_sequence_number();
4441 let message_ident = TMessageIdentifier::new("testInsertTablets", TMessageType::Call, self.sequence_number());
4442 let call_args = TSIServiceTestInsertTabletsArgs { req: req };
4443 self.o_prot_mut().write_message_begin(&message_ident)?;
4444 call_args.write_to_out_protocol(self.o_prot_mut())?;
4445 self.o_prot_mut().write_message_end()?;
4446 self.o_prot_mut().flush()
4447 }
4448 )?;
4449 {
4450 let message_ident = self.i_prot_mut().read_message_begin()?;
4451 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4452 verify_expected_service_call("testInsertTablets", &message_ident.name)?;
4453 if message_ident.message_type == TMessageType::Exception {
4454 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4455 self.i_prot_mut().read_message_end()?;
4456 return Err(thrift::Error::Application(remote_error))
4457 }
4458 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4459 let result = TSIServiceTestInsertTabletsResult::read_from_in_protocol(self.i_prot_mut())?;
4460 self.i_prot_mut().read_message_end()?;
4461 result.ok_or()
4462 }
4463 }
4464 fn test_insert_record(&mut self, req: TSInsertRecordReq) -> thrift::Result<TSStatus> {
4465 (
4466 {
4467 self.increment_sequence_number();
4468 let message_ident = TMessageIdentifier::new("testInsertRecord", TMessageType::Call, self.sequence_number());
4469 let call_args = TSIServiceTestInsertRecordArgs { req: req };
4470 self.o_prot_mut().write_message_begin(&message_ident)?;
4471 call_args.write_to_out_protocol(self.o_prot_mut())?;
4472 self.o_prot_mut().write_message_end()?;
4473 self.o_prot_mut().flush()
4474 }
4475 )?;
4476 {
4477 let message_ident = self.i_prot_mut().read_message_begin()?;
4478 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4479 verify_expected_service_call("testInsertRecord", &message_ident.name)?;
4480 if message_ident.message_type == TMessageType::Exception {
4481 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4482 self.i_prot_mut().read_message_end()?;
4483 return Err(thrift::Error::Application(remote_error))
4484 }
4485 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4486 let result = TSIServiceTestInsertRecordResult::read_from_in_protocol(self.i_prot_mut())?;
4487 self.i_prot_mut().read_message_end()?;
4488 result.ok_or()
4489 }
4490 }
4491 fn test_insert_string_record(&mut self, req: TSInsertStringRecordReq) -> thrift::Result<TSStatus> {
4492 (
4493 {
4494 self.increment_sequence_number();
4495 let message_ident = TMessageIdentifier::new("testInsertStringRecord", TMessageType::Call, self.sequence_number());
4496 let call_args = TSIServiceTestInsertStringRecordArgs { req: req };
4497 self.o_prot_mut().write_message_begin(&message_ident)?;
4498 call_args.write_to_out_protocol(self.o_prot_mut())?;
4499 self.o_prot_mut().write_message_end()?;
4500 self.o_prot_mut().flush()
4501 }
4502 )?;
4503 {
4504 let message_ident = self.i_prot_mut().read_message_begin()?;
4505 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4506 verify_expected_service_call("testInsertStringRecord", &message_ident.name)?;
4507 if message_ident.message_type == TMessageType::Exception {
4508 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4509 self.i_prot_mut().read_message_end()?;
4510 return Err(thrift::Error::Application(remote_error))
4511 }
4512 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4513 let result = TSIServiceTestInsertStringRecordResult::read_from_in_protocol(self.i_prot_mut())?;
4514 self.i_prot_mut().read_message_end()?;
4515 result.ok_or()
4516 }
4517 }
4518 fn test_insert_records(&mut self, req: TSInsertRecordsReq) -> thrift::Result<TSStatus> {
4519 (
4520 {
4521 self.increment_sequence_number();
4522 let message_ident = TMessageIdentifier::new("testInsertRecords", TMessageType::Call, self.sequence_number());
4523 let call_args = TSIServiceTestInsertRecordsArgs { req: req };
4524 self.o_prot_mut().write_message_begin(&message_ident)?;
4525 call_args.write_to_out_protocol(self.o_prot_mut())?;
4526 self.o_prot_mut().write_message_end()?;
4527 self.o_prot_mut().flush()
4528 }
4529 )?;
4530 {
4531 let message_ident = self.i_prot_mut().read_message_begin()?;
4532 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4533 verify_expected_service_call("testInsertRecords", &message_ident.name)?;
4534 if message_ident.message_type == TMessageType::Exception {
4535 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4536 self.i_prot_mut().read_message_end()?;
4537 return Err(thrift::Error::Application(remote_error))
4538 }
4539 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4540 let result = TSIServiceTestInsertRecordsResult::read_from_in_protocol(self.i_prot_mut())?;
4541 self.i_prot_mut().read_message_end()?;
4542 result.ok_or()
4543 }
4544 }
4545 fn test_insert_records_of_one_device(&mut self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<TSStatus> {
4546 (
4547 {
4548 self.increment_sequence_number();
4549 let message_ident = TMessageIdentifier::new("testInsertRecordsOfOneDevice", TMessageType::Call, self.sequence_number());
4550 let call_args = TSIServiceTestInsertRecordsOfOneDeviceArgs { req: req };
4551 self.o_prot_mut().write_message_begin(&message_ident)?;
4552 call_args.write_to_out_protocol(self.o_prot_mut())?;
4553 self.o_prot_mut().write_message_end()?;
4554 self.o_prot_mut().flush()
4555 }
4556 )?;
4557 {
4558 let message_ident = self.i_prot_mut().read_message_begin()?;
4559 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4560 verify_expected_service_call("testInsertRecordsOfOneDevice", &message_ident.name)?;
4561 if message_ident.message_type == TMessageType::Exception {
4562 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4563 self.i_prot_mut().read_message_end()?;
4564 return Err(thrift::Error::Application(remote_error))
4565 }
4566 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4567 let result = TSIServiceTestInsertRecordsOfOneDeviceResult::read_from_in_protocol(self.i_prot_mut())?;
4568 self.i_prot_mut().read_message_end()?;
4569 result.ok_or()
4570 }
4571 }
4572 fn test_insert_string_records(&mut self, req: TSInsertStringRecordsReq) -> thrift::Result<TSStatus> {
4573 (
4574 {
4575 self.increment_sequence_number();
4576 let message_ident = TMessageIdentifier::new("testInsertStringRecords", TMessageType::Call, self.sequence_number());
4577 let call_args = TSIServiceTestInsertStringRecordsArgs { req: req };
4578 self.o_prot_mut().write_message_begin(&message_ident)?;
4579 call_args.write_to_out_protocol(self.o_prot_mut())?;
4580 self.o_prot_mut().write_message_end()?;
4581 self.o_prot_mut().flush()
4582 }
4583 )?;
4584 {
4585 let message_ident = self.i_prot_mut().read_message_begin()?;
4586 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4587 verify_expected_service_call("testInsertStringRecords", &message_ident.name)?;
4588 if message_ident.message_type == TMessageType::Exception {
4589 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4590 self.i_prot_mut().read_message_end()?;
4591 return Err(thrift::Error::Application(remote_error))
4592 }
4593 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4594 let result = TSIServiceTestInsertStringRecordsResult::read_from_in_protocol(self.i_prot_mut())?;
4595 self.i_prot_mut().read_message_end()?;
4596 result.ok_or()
4597 }
4598 }
4599 fn delete_data(&mut self, req: TSDeleteDataReq) -> thrift::Result<TSStatus> {
4600 (
4601 {
4602 self.increment_sequence_number();
4603 let message_ident = TMessageIdentifier::new("deleteData", TMessageType::Call, self.sequence_number());
4604 let call_args = TSIServiceDeleteDataArgs { req: req };
4605 self.o_prot_mut().write_message_begin(&message_ident)?;
4606 call_args.write_to_out_protocol(self.o_prot_mut())?;
4607 self.o_prot_mut().write_message_end()?;
4608 self.o_prot_mut().flush()
4609 }
4610 )?;
4611 {
4612 let message_ident = self.i_prot_mut().read_message_begin()?;
4613 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4614 verify_expected_service_call("deleteData", &message_ident.name)?;
4615 if message_ident.message_type == TMessageType::Exception {
4616 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4617 self.i_prot_mut().read_message_end()?;
4618 return Err(thrift::Error::Application(remote_error))
4619 }
4620 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4621 let result = TSIServiceDeleteDataResult::read_from_in_protocol(self.i_prot_mut())?;
4622 self.i_prot_mut().read_message_end()?;
4623 result.ok_or()
4624 }
4625 }
4626 fn execute_raw_data_query(&mut self, req: TSRawDataQueryReq) -> thrift::Result<TSExecuteStatementResp> {
4627 (
4628 {
4629 self.increment_sequence_number();
4630 let message_ident = TMessageIdentifier::new("executeRawDataQuery", TMessageType::Call, self.sequence_number());
4631 let call_args = TSIServiceExecuteRawDataQueryArgs { req: req };
4632 self.o_prot_mut().write_message_begin(&message_ident)?;
4633 call_args.write_to_out_protocol(self.o_prot_mut())?;
4634 self.o_prot_mut().write_message_end()?;
4635 self.o_prot_mut().flush()
4636 }
4637 )?;
4638 {
4639 let message_ident = self.i_prot_mut().read_message_begin()?;
4640 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4641 verify_expected_service_call("executeRawDataQuery", &message_ident.name)?;
4642 if message_ident.message_type == TMessageType::Exception {
4643 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4644 self.i_prot_mut().read_message_end()?;
4645 return Err(thrift::Error::Application(remote_error))
4646 }
4647 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4648 let result = TSIServiceExecuteRawDataQueryResult::read_from_in_protocol(self.i_prot_mut())?;
4649 self.i_prot_mut().read_message_end()?;
4650 result.ok_or()
4651 }
4652 }
4653 fn request_statement_id(&mut self, session_id: i64) -> thrift::Result<i64> {
4654 (
4655 {
4656 self.increment_sequence_number();
4657 let message_ident = TMessageIdentifier::new("requestStatementId", TMessageType::Call, self.sequence_number());
4658 let call_args = TSIServiceRequestStatementIdArgs { session_id: session_id };
4659 self.o_prot_mut().write_message_begin(&message_ident)?;
4660 call_args.write_to_out_protocol(self.o_prot_mut())?;
4661 self.o_prot_mut().write_message_end()?;
4662 self.o_prot_mut().flush()
4663 }
4664 )?;
4665 {
4666 let message_ident = self.i_prot_mut().read_message_begin()?;
4667 verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
4668 verify_expected_service_call("requestStatementId", &message_ident.name)?;
4669 if message_ident.message_type == TMessageType::Exception {
4670 let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
4671 self.i_prot_mut().read_message_end()?;
4672 return Err(thrift::Error::Application(remote_error))
4673 }
4674 verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
4675 let result = TSIServiceRequestStatementIdResult::read_from_in_protocol(self.i_prot_mut())?;
4676 self.i_prot_mut().read_message_end()?;
4677 result.ok_or()
4678 }
4679 }
4680}
4681
4682pub trait TSIServiceSyncHandler {
4687 fn handle_open_session(&self, req: TSOpenSessionReq) -> thrift::Result<TSOpenSessionResp>;
4688 fn handle_close_session(&self, req: TSCloseSessionReq) -> thrift::Result<TSStatus>;
4689 fn handle_execute_statement(&self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>;
4690 fn handle_execute_batch_statement(&self, req: TSExecuteBatchStatementReq) -> thrift::Result<TSStatus>;
4691 fn handle_execute_query_statement(&self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>;
4692 fn handle_execute_update_statement(&self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>;
4693 fn handle_fetch_results(&self, req: TSFetchResultsReq) -> thrift::Result<TSFetchResultsResp>;
4694 fn handle_fetch_metadata(&self, req: TSFetchMetadataReq) -> thrift::Result<TSFetchMetadataResp>;
4695 fn handle_cancel_operation(&self, req: TSCancelOperationReq) -> thrift::Result<TSStatus>;
4696 fn handle_close_operation(&self, req: TSCloseOperationReq) -> thrift::Result<TSStatus>;
4697 fn handle_get_time_zone(&self, session_id: i64) -> thrift::Result<TSGetTimeZoneResp>;
4698 fn handle_set_time_zone(&self, req: TSSetTimeZoneReq) -> thrift::Result<TSStatus>;
4699 fn handle_get_properties(&self) -> thrift::Result<ServerProperties>;
4700 fn handle_set_storage_group(&self, session_id: i64, storage_group: String) -> thrift::Result<TSStatus>;
4701 fn handle_create_timeseries(&self, req: TSCreateTimeseriesReq) -> thrift::Result<TSStatus>;
4702 fn handle_create_multi_timeseries(&self, req: TSCreateMultiTimeseriesReq) -> thrift::Result<TSStatus>;
4703 fn handle_delete_timeseries(&self, session_id: i64, path: Vec<String>) -> thrift::Result<TSStatus>;
4704 fn handle_delete_storage_groups(&self, session_id: i64, storage_group: Vec<String>) -> thrift::Result<TSStatus>;
4705 fn handle_insert_record(&self, req: TSInsertRecordReq) -> thrift::Result<TSStatus>;
4706 fn handle_insert_string_record(&self, req: TSInsertStringRecordReq) -> thrift::Result<TSStatus>;
4707 fn handle_insert_tablet(&self, req: TSInsertTabletReq) -> thrift::Result<TSStatus>;
4708 fn handle_insert_tablets(&self, req: TSInsertTabletsReq) -> thrift::Result<TSStatus>;
4709 fn handle_insert_records(&self, req: TSInsertRecordsReq) -> thrift::Result<TSStatus>;
4710 fn handle_insert_records_of_one_device(&self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<TSStatus>;
4711 fn handle_insert_string_records(&self, req: TSInsertStringRecordsReq) -> thrift::Result<TSStatus>;
4712 fn handle_test_insert_tablet(&self, req: TSInsertTabletReq) -> thrift::Result<TSStatus>;
4713 fn handle_test_insert_tablets(&self, req: TSInsertTabletsReq) -> thrift::Result<TSStatus>;
4714 fn handle_test_insert_record(&self, req: TSInsertRecordReq) -> thrift::Result<TSStatus>;
4715 fn handle_test_insert_string_record(&self, req: TSInsertStringRecordReq) -> thrift::Result<TSStatus>;
4716 fn handle_test_insert_records(&self, req: TSInsertRecordsReq) -> thrift::Result<TSStatus>;
4717 fn handle_test_insert_records_of_one_device(&self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<TSStatus>;
4718 fn handle_test_insert_string_records(&self, req: TSInsertStringRecordsReq) -> thrift::Result<TSStatus>;
4719 fn handle_delete_data(&self, req: TSDeleteDataReq) -> thrift::Result<TSStatus>;
4720 fn handle_execute_raw_data_query(&self, req: TSRawDataQueryReq) -> thrift::Result<TSExecuteStatementResp>;
4721 fn handle_request_statement_id(&self, session_id: i64) -> thrift::Result<i64>;
4722}
4723
4724pub struct TSIServiceSyncProcessor<H: TSIServiceSyncHandler> {
4725 handler: H,
4726}
4727
4728impl <H: TSIServiceSyncHandler> TSIServiceSyncProcessor<H> {
4729 pub fn new(handler: H) -> TSIServiceSyncProcessor<H> {
4730 TSIServiceSyncProcessor {
4731 handler,
4732 }
4733 }
4734 fn process_open_session(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4735 TTSIServiceProcessFunctions::process_open_session(&self.handler, incoming_sequence_number, i_prot, o_prot)
4736 }
4737 fn process_close_session(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4738 TTSIServiceProcessFunctions::process_close_session(&self.handler, incoming_sequence_number, i_prot, o_prot)
4739 }
4740 fn process_execute_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4741 TTSIServiceProcessFunctions::process_execute_statement(&self.handler, incoming_sequence_number, i_prot, o_prot)
4742 }
4743 fn process_execute_batch_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4744 TTSIServiceProcessFunctions::process_execute_batch_statement(&self.handler, incoming_sequence_number, i_prot, o_prot)
4745 }
4746 fn process_execute_query_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4747 TTSIServiceProcessFunctions::process_execute_query_statement(&self.handler, incoming_sequence_number, i_prot, o_prot)
4748 }
4749 fn process_execute_update_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4750 TTSIServiceProcessFunctions::process_execute_update_statement(&self.handler, incoming_sequence_number, i_prot, o_prot)
4751 }
4752 fn process_fetch_results(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4753 TTSIServiceProcessFunctions::process_fetch_results(&self.handler, incoming_sequence_number, i_prot, o_prot)
4754 }
4755 fn process_fetch_metadata(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4756 TTSIServiceProcessFunctions::process_fetch_metadata(&self.handler, incoming_sequence_number, i_prot, o_prot)
4757 }
4758 fn process_cancel_operation(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4759 TTSIServiceProcessFunctions::process_cancel_operation(&self.handler, incoming_sequence_number, i_prot, o_prot)
4760 }
4761 fn process_close_operation(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4762 TTSIServiceProcessFunctions::process_close_operation(&self.handler, incoming_sequence_number, i_prot, o_prot)
4763 }
4764 fn process_get_time_zone(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4765 TTSIServiceProcessFunctions::process_get_time_zone(&self.handler, incoming_sequence_number, i_prot, o_prot)
4766 }
4767 fn process_set_time_zone(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4768 TTSIServiceProcessFunctions::process_set_time_zone(&self.handler, incoming_sequence_number, i_prot, o_prot)
4769 }
4770 fn process_get_properties(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4771 TTSIServiceProcessFunctions::process_get_properties(&self.handler, incoming_sequence_number, i_prot, o_prot)
4772 }
4773 fn process_set_storage_group(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4774 TTSIServiceProcessFunctions::process_set_storage_group(&self.handler, incoming_sequence_number, i_prot, o_prot)
4775 }
4776 fn process_create_timeseries(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4777 TTSIServiceProcessFunctions::process_create_timeseries(&self.handler, incoming_sequence_number, i_prot, o_prot)
4778 }
4779 fn process_create_multi_timeseries(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4780 TTSIServiceProcessFunctions::process_create_multi_timeseries(&self.handler, incoming_sequence_number, i_prot, o_prot)
4781 }
4782 fn process_delete_timeseries(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4783 TTSIServiceProcessFunctions::process_delete_timeseries(&self.handler, incoming_sequence_number, i_prot, o_prot)
4784 }
4785 fn process_delete_storage_groups(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4786 TTSIServiceProcessFunctions::process_delete_storage_groups(&self.handler, incoming_sequence_number, i_prot, o_prot)
4787 }
4788 fn process_insert_record(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4789 TTSIServiceProcessFunctions::process_insert_record(&self.handler, incoming_sequence_number, i_prot, o_prot)
4790 }
4791 fn process_insert_string_record(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4792 TTSIServiceProcessFunctions::process_insert_string_record(&self.handler, incoming_sequence_number, i_prot, o_prot)
4793 }
4794 fn process_insert_tablet(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4795 TTSIServiceProcessFunctions::process_insert_tablet(&self.handler, incoming_sequence_number, i_prot, o_prot)
4796 }
4797 fn process_insert_tablets(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4798 TTSIServiceProcessFunctions::process_insert_tablets(&self.handler, incoming_sequence_number, i_prot, o_prot)
4799 }
4800 fn process_insert_records(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4801 TTSIServiceProcessFunctions::process_insert_records(&self.handler, incoming_sequence_number, i_prot, o_prot)
4802 }
4803 fn process_insert_records_of_one_device(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4804 TTSIServiceProcessFunctions::process_insert_records_of_one_device(&self.handler, incoming_sequence_number, i_prot, o_prot)
4805 }
4806 fn process_insert_string_records(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4807 TTSIServiceProcessFunctions::process_insert_string_records(&self.handler, incoming_sequence_number, i_prot, o_prot)
4808 }
4809 fn process_test_insert_tablet(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4810 TTSIServiceProcessFunctions::process_test_insert_tablet(&self.handler, incoming_sequence_number, i_prot, o_prot)
4811 }
4812 fn process_test_insert_tablets(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4813 TTSIServiceProcessFunctions::process_test_insert_tablets(&self.handler, incoming_sequence_number, i_prot, o_prot)
4814 }
4815 fn process_test_insert_record(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4816 TTSIServiceProcessFunctions::process_test_insert_record(&self.handler, incoming_sequence_number, i_prot, o_prot)
4817 }
4818 fn process_test_insert_string_record(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4819 TTSIServiceProcessFunctions::process_test_insert_string_record(&self.handler, incoming_sequence_number, i_prot, o_prot)
4820 }
4821 fn process_test_insert_records(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4822 TTSIServiceProcessFunctions::process_test_insert_records(&self.handler, incoming_sequence_number, i_prot, o_prot)
4823 }
4824 fn process_test_insert_records_of_one_device(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4825 TTSIServiceProcessFunctions::process_test_insert_records_of_one_device(&self.handler, incoming_sequence_number, i_prot, o_prot)
4826 }
4827 fn process_test_insert_string_records(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4828 TTSIServiceProcessFunctions::process_test_insert_string_records(&self.handler, incoming_sequence_number, i_prot, o_prot)
4829 }
4830 fn process_delete_data(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4831 TTSIServiceProcessFunctions::process_delete_data(&self.handler, incoming_sequence_number, i_prot, o_prot)
4832 }
4833 fn process_execute_raw_data_query(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4834 TTSIServiceProcessFunctions::process_execute_raw_data_query(&self.handler, incoming_sequence_number, i_prot, o_prot)
4835 }
4836 fn process_request_statement_id(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4837 TTSIServiceProcessFunctions::process_request_statement_id(&self.handler, incoming_sequence_number, i_prot, o_prot)
4838 }
4839}
4840
4841pub struct TTSIServiceProcessFunctions;
4842
4843impl TTSIServiceProcessFunctions {
4844 pub fn process_open_session<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4845 let args = TSIServiceOpenSessionArgs::read_from_in_protocol(i_prot)?;
4846 match handler.handle_open_session(args.req) {
4847 Ok(handler_return) => {
4848 let message_ident = TMessageIdentifier::new("openSession", TMessageType::Reply, incoming_sequence_number);
4849 o_prot.write_message_begin(&message_ident)?;
4850 let ret = TSIServiceOpenSessionResult { result_value: Some(handler_return) };
4851 ret.write_to_out_protocol(o_prot)?;
4852 o_prot.write_message_end()?;
4853 o_prot.flush()
4854 },
4855 Err(e) => {
4856 match e {
4857 thrift::Error::Application(app_err) => {
4858 let message_ident = TMessageIdentifier::new("openSession", TMessageType::Exception, incoming_sequence_number);
4859 o_prot.write_message_begin(&message_ident)?;
4860 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
4861 o_prot.write_message_end()?;
4862 o_prot.flush()
4863 },
4864 _ => {
4865 let ret_err = {
4866 ApplicationError::new(
4867 ApplicationErrorKind::Unknown,
4868 e.description()
4869 )
4870 };
4871 let message_ident = TMessageIdentifier::new("openSession", TMessageType::Exception, incoming_sequence_number);
4872 o_prot.write_message_begin(&message_ident)?;
4873 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
4874 o_prot.write_message_end()?;
4875 o_prot.flush()
4876 },
4877 }
4878 },
4879 }
4880 }
4881 pub fn process_close_session<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4882 let args = TSIServiceCloseSessionArgs::read_from_in_protocol(i_prot)?;
4883 match handler.handle_close_session(args.req) {
4884 Ok(handler_return) => {
4885 let message_ident = TMessageIdentifier::new("closeSession", TMessageType::Reply, incoming_sequence_number);
4886 o_prot.write_message_begin(&message_ident)?;
4887 let ret = TSIServiceCloseSessionResult { result_value: Some(handler_return) };
4888 ret.write_to_out_protocol(o_prot)?;
4889 o_prot.write_message_end()?;
4890 o_prot.flush()
4891 },
4892 Err(e) => {
4893 match e {
4894 thrift::Error::Application(app_err) => {
4895 let message_ident = TMessageIdentifier::new("closeSession", TMessageType::Exception, incoming_sequence_number);
4896 o_prot.write_message_begin(&message_ident)?;
4897 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
4898 o_prot.write_message_end()?;
4899 o_prot.flush()
4900 },
4901 _ => {
4902 let ret_err = {
4903 ApplicationError::new(
4904 ApplicationErrorKind::Unknown,
4905 e.description()
4906 )
4907 };
4908 let message_ident = TMessageIdentifier::new("closeSession", TMessageType::Exception, incoming_sequence_number);
4909 o_prot.write_message_begin(&message_ident)?;
4910 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
4911 o_prot.write_message_end()?;
4912 o_prot.flush()
4913 },
4914 }
4915 },
4916 }
4917 }
4918 pub fn process_execute_statement<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4919 let args = TSIServiceExecuteStatementArgs::read_from_in_protocol(i_prot)?;
4920 match handler.handle_execute_statement(args.req) {
4921 Ok(handler_return) => {
4922 let message_ident = TMessageIdentifier::new("executeStatement", TMessageType::Reply, incoming_sequence_number);
4923 o_prot.write_message_begin(&message_ident)?;
4924 let ret = TSIServiceExecuteStatementResult { result_value: Some(handler_return) };
4925 ret.write_to_out_protocol(o_prot)?;
4926 o_prot.write_message_end()?;
4927 o_prot.flush()
4928 },
4929 Err(e) => {
4930 match e {
4931 thrift::Error::Application(app_err) => {
4932 let message_ident = TMessageIdentifier::new("executeStatement", TMessageType::Exception, incoming_sequence_number);
4933 o_prot.write_message_begin(&message_ident)?;
4934 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
4935 o_prot.write_message_end()?;
4936 o_prot.flush()
4937 },
4938 _ => {
4939 let ret_err = {
4940 ApplicationError::new(
4941 ApplicationErrorKind::Unknown,
4942 e.description()
4943 )
4944 };
4945 let message_ident = TMessageIdentifier::new("executeStatement", TMessageType::Exception, incoming_sequence_number);
4946 o_prot.write_message_begin(&message_ident)?;
4947 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
4948 o_prot.write_message_end()?;
4949 o_prot.flush()
4950 },
4951 }
4952 },
4953 }
4954 }
4955 pub fn process_execute_batch_statement<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4956 let args = TSIServiceExecuteBatchStatementArgs::read_from_in_protocol(i_prot)?;
4957 match handler.handle_execute_batch_statement(args.req) {
4958 Ok(handler_return) => {
4959 let message_ident = TMessageIdentifier::new("executeBatchStatement", TMessageType::Reply, incoming_sequence_number);
4960 o_prot.write_message_begin(&message_ident)?;
4961 let ret = TSIServiceExecuteBatchStatementResult { result_value: Some(handler_return) };
4962 ret.write_to_out_protocol(o_prot)?;
4963 o_prot.write_message_end()?;
4964 o_prot.flush()
4965 },
4966 Err(e) => {
4967 match e {
4968 thrift::Error::Application(app_err) => {
4969 let message_ident = TMessageIdentifier::new("executeBatchStatement", TMessageType::Exception, incoming_sequence_number);
4970 o_prot.write_message_begin(&message_ident)?;
4971 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
4972 o_prot.write_message_end()?;
4973 o_prot.flush()
4974 },
4975 _ => {
4976 let ret_err = {
4977 ApplicationError::new(
4978 ApplicationErrorKind::Unknown,
4979 e.description()
4980 )
4981 };
4982 let message_ident = TMessageIdentifier::new("executeBatchStatement", TMessageType::Exception, incoming_sequence_number);
4983 o_prot.write_message_begin(&message_ident)?;
4984 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
4985 o_prot.write_message_end()?;
4986 o_prot.flush()
4987 },
4988 }
4989 },
4990 }
4991 }
4992 pub fn process_execute_query_statement<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
4993 let args = TSIServiceExecuteQueryStatementArgs::read_from_in_protocol(i_prot)?;
4994 match handler.handle_execute_query_statement(args.req) {
4995 Ok(handler_return) => {
4996 let message_ident = TMessageIdentifier::new("executeQueryStatement", TMessageType::Reply, incoming_sequence_number);
4997 o_prot.write_message_begin(&message_ident)?;
4998 let ret = TSIServiceExecuteQueryStatementResult { result_value: Some(handler_return) };
4999 ret.write_to_out_protocol(o_prot)?;
5000 o_prot.write_message_end()?;
5001 o_prot.flush()
5002 },
5003 Err(e) => {
5004 match e {
5005 thrift::Error::Application(app_err) => {
5006 let message_ident = TMessageIdentifier::new("executeQueryStatement", TMessageType::Exception, incoming_sequence_number);
5007 o_prot.write_message_begin(&message_ident)?;
5008 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5009 o_prot.write_message_end()?;
5010 o_prot.flush()
5011 },
5012 _ => {
5013 let ret_err = {
5014 ApplicationError::new(
5015 ApplicationErrorKind::Unknown,
5016 e.description()
5017 )
5018 };
5019 let message_ident = TMessageIdentifier::new("executeQueryStatement", TMessageType::Exception, incoming_sequence_number);
5020 o_prot.write_message_begin(&message_ident)?;
5021 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5022 o_prot.write_message_end()?;
5023 o_prot.flush()
5024 },
5025 }
5026 },
5027 }
5028 }
5029 pub fn process_execute_update_statement<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5030 let args = TSIServiceExecuteUpdateStatementArgs::read_from_in_protocol(i_prot)?;
5031 match handler.handle_execute_update_statement(args.req) {
5032 Ok(handler_return) => {
5033 let message_ident = TMessageIdentifier::new("executeUpdateStatement", TMessageType::Reply, incoming_sequence_number);
5034 o_prot.write_message_begin(&message_ident)?;
5035 let ret = TSIServiceExecuteUpdateStatementResult { result_value: Some(handler_return) };
5036 ret.write_to_out_protocol(o_prot)?;
5037 o_prot.write_message_end()?;
5038 o_prot.flush()
5039 },
5040 Err(e) => {
5041 match e {
5042 thrift::Error::Application(app_err) => {
5043 let message_ident = TMessageIdentifier::new("executeUpdateStatement", TMessageType::Exception, incoming_sequence_number);
5044 o_prot.write_message_begin(&message_ident)?;
5045 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5046 o_prot.write_message_end()?;
5047 o_prot.flush()
5048 },
5049 _ => {
5050 let ret_err = {
5051 ApplicationError::new(
5052 ApplicationErrorKind::Unknown,
5053 e.description()
5054 )
5055 };
5056 let message_ident = TMessageIdentifier::new("executeUpdateStatement", TMessageType::Exception, incoming_sequence_number);
5057 o_prot.write_message_begin(&message_ident)?;
5058 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5059 o_prot.write_message_end()?;
5060 o_prot.flush()
5061 },
5062 }
5063 },
5064 }
5065 }
5066 pub fn process_fetch_results<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5067 let args = TSIServiceFetchResultsArgs::read_from_in_protocol(i_prot)?;
5068 match handler.handle_fetch_results(args.req) {
5069 Ok(handler_return) => {
5070 let message_ident = TMessageIdentifier::new("fetchResults", TMessageType::Reply, incoming_sequence_number);
5071 o_prot.write_message_begin(&message_ident)?;
5072 let ret = TSIServiceFetchResultsResult { result_value: Some(handler_return) };
5073 ret.write_to_out_protocol(o_prot)?;
5074 o_prot.write_message_end()?;
5075 o_prot.flush()
5076 },
5077 Err(e) => {
5078 match e {
5079 thrift::Error::Application(app_err) => {
5080 let message_ident = TMessageIdentifier::new("fetchResults", TMessageType::Exception, incoming_sequence_number);
5081 o_prot.write_message_begin(&message_ident)?;
5082 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5083 o_prot.write_message_end()?;
5084 o_prot.flush()
5085 },
5086 _ => {
5087 let ret_err = {
5088 ApplicationError::new(
5089 ApplicationErrorKind::Unknown,
5090 e.description()
5091 )
5092 };
5093 let message_ident = TMessageIdentifier::new("fetchResults", TMessageType::Exception, incoming_sequence_number);
5094 o_prot.write_message_begin(&message_ident)?;
5095 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5096 o_prot.write_message_end()?;
5097 o_prot.flush()
5098 },
5099 }
5100 },
5101 }
5102 }
5103 pub fn process_fetch_metadata<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5104 let args = TSIServiceFetchMetadataArgs::read_from_in_protocol(i_prot)?;
5105 match handler.handle_fetch_metadata(args.req) {
5106 Ok(handler_return) => {
5107 let message_ident = TMessageIdentifier::new("fetchMetadata", TMessageType::Reply, incoming_sequence_number);
5108 o_prot.write_message_begin(&message_ident)?;
5109 let ret = TSIServiceFetchMetadataResult { result_value: Some(handler_return) };
5110 ret.write_to_out_protocol(o_prot)?;
5111 o_prot.write_message_end()?;
5112 o_prot.flush()
5113 },
5114 Err(e) => {
5115 match e {
5116 thrift::Error::Application(app_err) => {
5117 let message_ident = TMessageIdentifier::new("fetchMetadata", TMessageType::Exception, incoming_sequence_number);
5118 o_prot.write_message_begin(&message_ident)?;
5119 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5120 o_prot.write_message_end()?;
5121 o_prot.flush()
5122 },
5123 _ => {
5124 let ret_err = {
5125 ApplicationError::new(
5126 ApplicationErrorKind::Unknown,
5127 e.description()
5128 )
5129 };
5130 let message_ident = TMessageIdentifier::new("fetchMetadata", TMessageType::Exception, incoming_sequence_number);
5131 o_prot.write_message_begin(&message_ident)?;
5132 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5133 o_prot.write_message_end()?;
5134 o_prot.flush()
5135 },
5136 }
5137 },
5138 }
5139 }
5140 pub fn process_cancel_operation<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5141 let args = TSIServiceCancelOperationArgs::read_from_in_protocol(i_prot)?;
5142 match handler.handle_cancel_operation(args.req) {
5143 Ok(handler_return) => {
5144 let message_ident = TMessageIdentifier::new("cancelOperation", TMessageType::Reply, incoming_sequence_number);
5145 o_prot.write_message_begin(&message_ident)?;
5146 let ret = TSIServiceCancelOperationResult { result_value: Some(handler_return) };
5147 ret.write_to_out_protocol(o_prot)?;
5148 o_prot.write_message_end()?;
5149 o_prot.flush()
5150 },
5151 Err(e) => {
5152 match e {
5153 thrift::Error::Application(app_err) => {
5154 let message_ident = TMessageIdentifier::new("cancelOperation", TMessageType::Exception, incoming_sequence_number);
5155 o_prot.write_message_begin(&message_ident)?;
5156 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5157 o_prot.write_message_end()?;
5158 o_prot.flush()
5159 },
5160 _ => {
5161 let ret_err = {
5162 ApplicationError::new(
5163 ApplicationErrorKind::Unknown,
5164 e.description()
5165 )
5166 };
5167 let message_ident = TMessageIdentifier::new("cancelOperation", TMessageType::Exception, incoming_sequence_number);
5168 o_prot.write_message_begin(&message_ident)?;
5169 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5170 o_prot.write_message_end()?;
5171 o_prot.flush()
5172 },
5173 }
5174 },
5175 }
5176 }
5177 pub fn process_close_operation<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5178 let args = TSIServiceCloseOperationArgs::read_from_in_protocol(i_prot)?;
5179 match handler.handle_close_operation(args.req) {
5180 Ok(handler_return) => {
5181 let message_ident = TMessageIdentifier::new("closeOperation", TMessageType::Reply, incoming_sequence_number);
5182 o_prot.write_message_begin(&message_ident)?;
5183 let ret = TSIServiceCloseOperationResult { result_value: Some(handler_return) };
5184 ret.write_to_out_protocol(o_prot)?;
5185 o_prot.write_message_end()?;
5186 o_prot.flush()
5187 },
5188 Err(e) => {
5189 match e {
5190 thrift::Error::Application(app_err) => {
5191 let message_ident = TMessageIdentifier::new("closeOperation", TMessageType::Exception, incoming_sequence_number);
5192 o_prot.write_message_begin(&message_ident)?;
5193 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5194 o_prot.write_message_end()?;
5195 o_prot.flush()
5196 },
5197 _ => {
5198 let ret_err = {
5199 ApplicationError::new(
5200 ApplicationErrorKind::Unknown,
5201 e.description()
5202 )
5203 };
5204 let message_ident = TMessageIdentifier::new("closeOperation", TMessageType::Exception, incoming_sequence_number);
5205 o_prot.write_message_begin(&message_ident)?;
5206 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5207 o_prot.write_message_end()?;
5208 o_prot.flush()
5209 },
5210 }
5211 },
5212 }
5213 }
5214 pub fn process_get_time_zone<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5215 let args = TSIServiceGetTimeZoneArgs::read_from_in_protocol(i_prot)?;
5216 match handler.handle_get_time_zone(args.session_id) {
5217 Ok(handler_return) => {
5218 let message_ident = TMessageIdentifier::new("getTimeZone", TMessageType::Reply, incoming_sequence_number);
5219 o_prot.write_message_begin(&message_ident)?;
5220 let ret = TSIServiceGetTimeZoneResult { result_value: Some(handler_return) };
5221 ret.write_to_out_protocol(o_prot)?;
5222 o_prot.write_message_end()?;
5223 o_prot.flush()
5224 },
5225 Err(e) => {
5226 match e {
5227 thrift::Error::Application(app_err) => {
5228 let message_ident = TMessageIdentifier::new("getTimeZone", TMessageType::Exception, incoming_sequence_number);
5229 o_prot.write_message_begin(&message_ident)?;
5230 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5231 o_prot.write_message_end()?;
5232 o_prot.flush()
5233 },
5234 _ => {
5235 let ret_err = {
5236 ApplicationError::new(
5237 ApplicationErrorKind::Unknown,
5238 e.description()
5239 )
5240 };
5241 let message_ident = TMessageIdentifier::new("getTimeZone", TMessageType::Exception, incoming_sequence_number);
5242 o_prot.write_message_begin(&message_ident)?;
5243 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5244 o_prot.write_message_end()?;
5245 o_prot.flush()
5246 },
5247 }
5248 },
5249 }
5250 }
5251 pub fn process_set_time_zone<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5252 let args = TSIServiceSetTimeZoneArgs::read_from_in_protocol(i_prot)?;
5253 match handler.handle_set_time_zone(args.req) {
5254 Ok(handler_return) => {
5255 let message_ident = TMessageIdentifier::new("setTimeZone", TMessageType::Reply, incoming_sequence_number);
5256 o_prot.write_message_begin(&message_ident)?;
5257 let ret = TSIServiceSetTimeZoneResult { result_value: Some(handler_return) };
5258 ret.write_to_out_protocol(o_prot)?;
5259 o_prot.write_message_end()?;
5260 o_prot.flush()
5261 },
5262 Err(e) => {
5263 match e {
5264 thrift::Error::Application(app_err) => {
5265 let message_ident = TMessageIdentifier::new("setTimeZone", TMessageType::Exception, incoming_sequence_number);
5266 o_prot.write_message_begin(&message_ident)?;
5267 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5268 o_prot.write_message_end()?;
5269 o_prot.flush()
5270 },
5271 _ => {
5272 let ret_err = {
5273 ApplicationError::new(
5274 ApplicationErrorKind::Unknown,
5275 e.description()
5276 )
5277 };
5278 let message_ident = TMessageIdentifier::new("setTimeZone", TMessageType::Exception, incoming_sequence_number);
5279 o_prot.write_message_begin(&message_ident)?;
5280 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5281 o_prot.write_message_end()?;
5282 o_prot.flush()
5283 },
5284 }
5285 },
5286 }
5287 }
5288 pub fn process_get_properties<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5289 let _ = TSIServiceGetPropertiesArgs::read_from_in_protocol(i_prot)?;
5290 match handler.handle_get_properties() {
5291 Ok(handler_return) => {
5292 let message_ident = TMessageIdentifier::new("getProperties", TMessageType::Reply, incoming_sequence_number);
5293 o_prot.write_message_begin(&message_ident)?;
5294 let ret = TSIServiceGetPropertiesResult { result_value: Some(handler_return) };
5295 ret.write_to_out_protocol(o_prot)?;
5296 o_prot.write_message_end()?;
5297 o_prot.flush()
5298 },
5299 Err(e) => {
5300 match e {
5301 thrift::Error::Application(app_err) => {
5302 let message_ident = TMessageIdentifier::new("getProperties", TMessageType::Exception, incoming_sequence_number);
5303 o_prot.write_message_begin(&message_ident)?;
5304 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5305 o_prot.write_message_end()?;
5306 o_prot.flush()
5307 },
5308 _ => {
5309 let ret_err = {
5310 ApplicationError::new(
5311 ApplicationErrorKind::Unknown,
5312 e.description()
5313 )
5314 };
5315 let message_ident = TMessageIdentifier::new("getProperties", TMessageType::Exception, incoming_sequence_number);
5316 o_prot.write_message_begin(&message_ident)?;
5317 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5318 o_prot.write_message_end()?;
5319 o_prot.flush()
5320 },
5321 }
5322 },
5323 }
5324 }
5325 pub fn process_set_storage_group<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5326 let args = TSIServiceSetStorageGroupArgs::read_from_in_protocol(i_prot)?;
5327 match handler.handle_set_storage_group(args.session_id, args.storage_group) {
5328 Ok(handler_return) => {
5329 let message_ident = TMessageIdentifier::new("setStorageGroup", TMessageType::Reply, incoming_sequence_number);
5330 o_prot.write_message_begin(&message_ident)?;
5331 let ret = TSIServiceSetStorageGroupResult { result_value: Some(handler_return) };
5332 ret.write_to_out_protocol(o_prot)?;
5333 o_prot.write_message_end()?;
5334 o_prot.flush()
5335 },
5336 Err(e) => {
5337 match e {
5338 thrift::Error::Application(app_err) => {
5339 let message_ident = TMessageIdentifier::new("setStorageGroup", TMessageType::Exception, incoming_sequence_number);
5340 o_prot.write_message_begin(&message_ident)?;
5341 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5342 o_prot.write_message_end()?;
5343 o_prot.flush()
5344 },
5345 _ => {
5346 let ret_err = {
5347 ApplicationError::new(
5348 ApplicationErrorKind::Unknown,
5349 e.description()
5350 )
5351 };
5352 let message_ident = TMessageIdentifier::new("setStorageGroup", TMessageType::Exception, incoming_sequence_number);
5353 o_prot.write_message_begin(&message_ident)?;
5354 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5355 o_prot.write_message_end()?;
5356 o_prot.flush()
5357 },
5358 }
5359 },
5360 }
5361 }
5362 pub fn process_create_timeseries<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5363 let args = TSIServiceCreateTimeseriesArgs::read_from_in_protocol(i_prot)?;
5364 match handler.handle_create_timeseries(args.req) {
5365 Ok(handler_return) => {
5366 let message_ident = TMessageIdentifier::new("createTimeseries", TMessageType::Reply, incoming_sequence_number);
5367 o_prot.write_message_begin(&message_ident)?;
5368 let ret = TSIServiceCreateTimeseriesResult { result_value: Some(handler_return) };
5369 ret.write_to_out_protocol(o_prot)?;
5370 o_prot.write_message_end()?;
5371 o_prot.flush()
5372 },
5373 Err(e) => {
5374 match e {
5375 thrift::Error::Application(app_err) => {
5376 let message_ident = TMessageIdentifier::new("createTimeseries", TMessageType::Exception, incoming_sequence_number);
5377 o_prot.write_message_begin(&message_ident)?;
5378 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5379 o_prot.write_message_end()?;
5380 o_prot.flush()
5381 },
5382 _ => {
5383 let ret_err = {
5384 ApplicationError::new(
5385 ApplicationErrorKind::Unknown,
5386 e.description()
5387 )
5388 };
5389 let message_ident = TMessageIdentifier::new("createTimeseries", TMessageType::Exception, incoming_sequence_number);
5390 o_prot.write_message_begin(&message_ident)?;
5391 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5392 o_prot.write_message_end()?;
5393 o_prot.flush()
5394 },
5395 }
5396 },
5397 }
5398 }
5399 pub fn process_create_multi_timeseries<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5400 let args = TSIServiceCreateMultiTimeseriesArgs::read_from_in_protocol(i_prot)?;
5401 match handler.handle_create_multi_timeseries(args.req) {
5402 Ok(handler_return) => {
5403 let message_ident = TMessageIdentifier::new("createMultiTimeseries", TMessageType::Reply, incoming_sequence_number);
5404 o_prot.write_message_begin(&message_ident)?;
5405 let ret = TSIServiceCreateMultiTimeseriesResult { result_value: Some(handler_return) };
5406 ret.write_to_out_protocol(o_prot)?;
5407 o_prot.write_message_end()?;
5408 o_prot.flush()
5409 },
5410 Err(e) => {
5411 match e {
5412 thrift::Error::Application(app_err) => {
5413 let message_ident = TMessageIdentifier::new("createMultiTimeseries", TMessageType::Exception, incoming_sequence_number);
5414 o_prot.write_message_begin(&message_ident)?;
5415 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5416 o_prot.write_message_end()?;
5417 o_prot.flush()
5418 },
5419 _ => {
5420 let ret_err = {
5421 ApplicationError::new(
5422 ApplicationErrorKind::Unknown,
5423 e.description()
5424 )
5425 };
5426 let message_ident = TMessageIdentifier::new("createMultiTimeseries", TMessageType::Exception, incoming_sequence_number);
5427 o_prot.write_message_begin(&message_ident)?;
5428 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5429 o_prot.write_message_end()?;
5430 o_prot.flush()
5431 },
5432 }
5433 },
5434 }
5435 }
5436 pub fn process_delete_timeseries<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5437 let args = TSIServiceDeleteTimeseriesArgs::read_from_in_protocol(i_prot)?;
5438 match handler.handle_delete_timeseries(args.session_id, args.path) {
5439 Ok(handler_return) => {
5440 let message_ident = TMessageIdentifier::new("deleteTimeseries", TMessageType::Reply, incoming_sequence_number);
5441 o_prot.write_message_begin(&message_ident)?;
5442 let ret = TSIServiceDeleteTimeseriesResult { result_value: Some(handler_return) };
5443 ret.write_to_out_protocol(o_prot)?;
5444 o_prot.write_message_end()?;
5445 o_prot.flush()
5446 },
5447 Err(e) => {
5448 match e {
5449 thrift::Error::Application(app_err) => {
5450 let message_ident = TMessageIdentifier::new("deleteTimeseries", TMessageType::Exception, incoming_sequence_number);
5451 o_prot.write_message_begin(&message_ident)?;
5452 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5453 o_prot.write_message_end()?;
5454 o_prot.flush()
5455 },
5456 _ => {
5457 let ret_err = {
5458 ApplicationError::new(
5459 ApplicationErrorKind::Unknown,
5460 e.description()
5461 )
5462 };
5463 let message_ident = TMessageIdentifier::new("deleteTimeseries", TMessageType::Exception, incoming_sequence_number);
5464 o_prot.write_message_begin(&message_ident)?;
5465 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5466 o_prot.write_message_end()?;
5467 o_prot.flush()
5468 },
5469 }
5470 },
5471 }
5472 }
5473 pub fn process_delete_storage_groups<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5474 let args = TSIServiceDeleteStorageGroupsArgs::read_from_in_protocol(i_prot)?;
5475 match handler.handle_delete_storage_groups(args.session_id, args.storage_group) {
5476 Ok(handler_return) => {
5477 let message_ident = TMessageIdentifier::new("deleteStorageGroups", TMessageType::Reply, incoming_sequence_number);
5478 o_prot.write_message_begin(&message_ident)?;
5479 let ret = TSIServiceDeleteStorageGroupsResult { result_value: Some(handler_return) };
5480 ret.write_to_out_protocol(o_prot)?;
5481 o_prot.write_message_end()?;
5482 o_prot.flush()
5483 },
5484 Err(e) => {
5485 match e {
5486 thrift::Error::Application(app_err) => {
5487 let message_ident = TMessageIdentifier::new("deleteStorageGroups", TMessageType::Exception, incoming_sequence_number);
5488 o_prot.write_message_begin(&message_ident)?;
5489 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5490 o_prot.write_message_end()?;
5491 o_prot.flush()
5492 },
5493 _ => {
5494 let ret_err = {
5495 ApplicationError::new(
5496 ApplicationErrorKind::Unknown,
5497 e.description()
5498 )
5499 };
5500 let message_ident = TMessageIdentifier::new("deleteStorageGroups", TMessageType::Exception, incoming_sequence_number);
5501 o_prot.write_message_begin(&message_ident)?;
5502 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5503 o_prot.write_message_end()?;
5504 o_prot.flush()
5505 },
5506 }
5507 },
5508 }
5509 }
5510 pub fn process_insert_record<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5511 let args = TSIServiceInsertRecordArgs::read_from_in_protocol(i_prot)?;
5512 match handler.handle_insert_record(args.req) {
5513 Ok(handler_return) => {
5514 let message_ident = TMessageIdentifier::new("insertRecord", TMessageType::Reply, incoming_sequence_number);
5515 o_prot.write_message_begin(&message_ident)?;
5516 let ret = TSIServiceInsertRecordResult { result_value: Some(handler_return) };
5517 ret.write_to_out_protocol(o_prot)?;
5518 o_prot.write_message_end()?;
5519 o_prot.flush()
5520 },
5521 Err(e) => {
5522 match e {
5523 thrift::Error::Application(app_err) => {
5524 let message_ident = TMessageIdentifier::new("insertRecord", TMessageType::Exception, incoming_sequence_number);
5525 o_prot.write_message_begin(&message_ident)?;
5526 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5527 o_prot.write_message_end()?;
5528 o_prot.flush()
5529 },
5530 _ => {
5531 let ret_err = {
5532 ApplicationError::new(
5533 ApplicationErrorKind::Unknown,
5534 e.description()
5535 )
5536 };
5537 let message_ident = TMessageIdentifier::new("insertRecord", TMessageType::Exception, incoming_sequence_number);
5538 o_prot.write_message_begin(&message_ident)?;
5539 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5540 o_prot.write_message_end()?;
5541 o_prot.flush()
5542 },
5543 }
5544 },
5545 }
5546 }
5547 pub fn process_insert_string_record<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5548 let args = TSIServiceInsertStringRecordArgs::read_from_in_protocol(i_prot)?;
5549 match handler.handle_insert_string_record(args.req) {
5550 Ok(handler_return) => {
5551 let message_ident = TMessageIdentifier::new("insertStringRecord", TMessageType::Reply, incoming_sequence_number);
5552 o_prot.write_message_begin(&message_ident)?;
5553 let ret = TSIServiceInsertStringRecordResult { result_value: Some(handler_return) };
5554 ret.write_to_out_protocol(o_prot)?;
5555 o_prot.write_message_end()?;
5556 o_prot.flush()
5557 },
5558 Err(e) => {
5559 match e {
5560 thrift::Error::Application(app_err) => {
5561 let message_ident = TMessageIdentifier::new("insertStringRecord", TMessageType::Exception, incoming_sequence_number);
5562 o_prot.write_message_begin(&message_ident)?;
5563 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5564 o_prot.write_message_end()?;
5565 o_prot.flush()
5566 },
5567 _ => {
5568 let ret_err = {
5569 ApplicationError::new(
5570 ApplicationErrorKind::Unknown,
5571 e.description()
5572 )
5573 };
5574 let message_ident = TMessageIdentifier::new("insertStringRecord", TMessageType::Exception, incoming_sequence_number);
5575 o_prot.write_message_begin(&message_ident)?;
5576 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5577 o_prot.write_message_end()?;
5578 o_prot.flush()
5579 },
5580 }
5581 },
5582 }
5583 }
5584 pub fn process_insert_tablet<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5585 let args = TSIServiceInsertTabletArgs::read_from_in_protocol(i_prot)?;
5586 match handler.handle_insert_tablet(args.req) {
5587 Ok(handler_return) => {
5588 let message_ident = TMessageIdentifier::new("insertTablet", TMessageType::Reply, incoming_sequence_number);
5589 o_prot.write_message_begin(&message_ident)?;
5590 let ret = TSIServiceInsertTabletResult { result_value: Some(handler_return) };
5591 ret.write_to_out_protocol(o_prot)?;
5592 o_prot.write_message_end()?;
5593 o_prot.flush()
5594 },
5595 Err(e) => {
5596 match e {
5597 thrift::Error::Application(app_err) => {
5598 let message_ident = TMessageIdentifier::new("insertTablet", TMessageType::Exception, incoming_sequence_number);
5599 o_prot.write_message_begin(&message_ident)?;
5600 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5601 o_prot.write_message_end()?;
5602 o_prot.flush()
5603 },
5604 _ => {
5605 let ret_err = {
5606 ApplicationError::new(
5607 ApplicationErrorKind::Unknown,
5608 e.description()
5609 )
5610 };
5611 let message_ident = TMessageIdentifier::new("insertTablet", TMessageType::Exception, incoming_sequence_number);
5612 o_prot.write_message_begin(&message_ident)?;
5613 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5614 o_prot.write_message_end()?;
5615 o_prot.flush()
5616 },
5617 }
5618 },
5619 }
5620 }
5621 pub fn process_insert_tablets<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5622 let args = TSIServiceInsertTabletsArgs::read_from_in_protocol(i_prot)?;
5623 match handler.handle_insert_tablets(args.req) {
5624 Ok(handler_return) => {
5625 let message_ident = TMessageIdentifier::new("insertTablets", TMessageType::Reply, incoming_sequence_number);
5626 o_prot.write_message_begin(&message_ident)?;
5627 let ret = TSIServiceInsertTabletsResult { result_value: Some(handler_return) };
5628 ret.write_to_out_protocol(o_prot)?;
5629 o_prot.write_message_end()?;
5630 o_prot.flush()
5631 },
5632 Err(e) => {
5633 match e {
5634 thrift::Error::Application(app_err) => {
5635 let message_ident = TMessageIdentifier::new("insertTablets", TMessageType::Exception, incoming_sequence_number);
5636 o_prot.write_message_begin(&message_ident)?;
5637 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5638 o_prot.write_message_end()?;
5639 o_prot.flush()
5640 },
5641 _ => {
5642 let ret_err = {
5643 ApplicationError::new(
5644 ApplicationErrorKind::Unknown,
5645 e.description()
5646 )
5647 };
5648 let message_ident = TMessageIdentifier::new("insertTablets", TMessageType::Exception, incoming_sequence_number);
5649 o_prot.write_message_begin(&message_ident)?;
5650 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5651 o_prot.write_message_end()?;
5652 o_prot.flush()
5653 },
5654 }
5655 },
5656 }
5657 }
5658 pub fn process_insert_records<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5659 let args = TSIServiceInsertRecordsArgs::read_from_in_protocol(i_prot)?;
5660 match handler.handle_insert_records(args.req) {
5661 Ok(handler_return) => {
5662 let message_ident = TMessageIdentifier::new("insertRecords", TMessageType::Reply, incoming_sequence_number);
5663 o_prot.write_message_begin(&message_ident)?;
5664 let ret = TSIServiceInsertRecordsResult { result_value: Some(handler_return) };
5665 ret.write_to_out_protocol(o_prot)?;
5666 o_prot.write_message_end()?;
5667 o_prot.flush()
5668 },
5669 Err(e) => {
5670 match e {
5671 thrift::Error::Application(app_err) => {
5672 let message_ident = TMessageIdentifier::new("insertRecords", TMessageType::Exception, incoming_sequence_number);
5673 o_prot.write_message_begin(&message_ident)?;
5674 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5675 o_prot.write_message_end()?;
5676 o_prot.flush()
5677 },
5678 _ => {
5679 let ret_err = {
5680 ApplicationError::new(
5681 ApplicationErrorKind::Unknown,
5682 e.description()
5683 )
5684 };
5685 let message_ident = TMessageIdentifier::new("insertRecords", TMessageType::Exception, incoming_sequence_number);
5686 o_prot.write_message_begin(&message_ident)?;
5687 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5688 o_prot.write_message_end()?;
5689 o_prot.flush()
5690 },
5691 }
5692 },
5693 }
5694 }
5695 pub fn process_insert_records_of_one_device<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5696 let args = TSIServiceInsertRecordsOfOneDeviceArgs::read_from_in_protocol(i_prot)?;
5697 match handler.handle_insert_records_of_one_device(args.req) {
5698 Ok(handler_return) => {
5699 let message_ident = TMessageIdentifier::new("insertRecordsOfOneDevice", TMessageType::Reply, incoming_sequence_number);
5700 o_prot.write_message_begin(&message_ident)?;
5701 let ret = TSIServiceInsertRecordsOfOneDeviceResult { result_value: Some(handler_return) };
5702 ret.write_to_out_protocol(o_prot)?;
5703 o_prot.write_message_end()?;
5704 o_prot.flush()
5705 },
5706 Err(e) => {
5707 match e {
5708 thrift::Error::Application(app_err) => {
5709 let message_ident = TMessageIdentifier::new("insertRecordsOfOneDevice", TMessageType::Exception, incoming_sequence_number);
5710 o_prot.write_message_begin(&message_ident)?;
5711 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5712 o_prot.write_message_end()?;
5713 o_prot.flush()
5714 },
5715 _ => {
5716 let ret_err = {
5717 ApplicationError::new(
5718 ApplicationErrorKind::Unknown,
5719 e.description()
5720 )
5721 };
5722 let message_ident = TMessageIdentifier::new("insertRecordsOfOneDevice", TMessageType::Exception, incoming_sequence_number);
5723 o_prot.write_message_begin(&message_ident)?;
5724 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5725 o_prot.write_message_end()?;
5726 o_prot.flush()
5727 },
5728 }
5729 },
5730 }
5731 }
5732 pub fn process_insert_string_records<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5733 let args = TSIServiceInsertStringRecordsArgs::read_from_in_protocol(i_prot)?;
5734 match handler.handle_insert_string_records(args.req) {
5735 Ok(handler_return) => {
5736 let message_ident = TMessageIdentifier::new("insertStringRecords", TMessageType::Reply, incoming_sequence_number);
5737 o_prot.write_message_begin(&message_ident)?;
5738 let ret = TSIServiceInsertStringRecordsResult { result_value: Some(handler_return) };
5739 ret.write_to_out_protocol(o_prot)?;
5740 o_prot.write_message_end()?;
5741 o_prot.flush()
5742 },
5743 Err(e) => {
5744 match e {
5745 thrift::Error::Application(app_err) => {
5746 let message_ident = TMessageIdentifier::new("insertStringRecords", TMessageType::Exception, incoming_sequence_number);
5747 o_prot.write_message_begin(&message_ident)?;
5748 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5749 o_prot.write_message_end()?;
5750 o_prot.flush()
5751 },
5752 _ => {
5753 let ret_err = {
5754 ApplicationError::new(
5755 ApplicationErrorKind::Unknown,
5756 e.description()
5757 )
5758 };
5759 let message_ident = TMessageIdentifier::new("insertStringRecords", TMessageType::Exception, incoming_sequence_number);
5760 o_prot.write_message_begin(&message_ident)?;
5761 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5762 o_prot.write_message_end()?;
5763 o_prot.flush()
5764 },
5765 }
5766 },
5767 }
5768 }
5769 pub fn process_test_insert_tablet<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5770 let args = TSIServiceTestInsertTabletArgs::read_from_in_protocol(i_prot)?;
5771 match handler.handle_test_insert_tablet(args.req) {
5772 Ok(handler_return) => {
5773 let message_ident = TMessageIdentifier::new("testInsertTablet", TMessageType::Reply, incoming_sequence_number);
5774 o_prot.write_message_begin(&message_ident)?;
5775 let ret = TSIServiceTestInsertTabletResult { result_value: Some(handler_return) };
5776 ret.write_to_out_protocol(o_prot)?;
5777 o_prot.write_message_end()?;
5778 o_prot.flush()
5779 },
5780 Err(e) => {
5781 match e {
5782 thrift::Error::Application(app_err) => {
5783 let message_ident = TMessageIdentifier::new("testInsertTablet", TMessageType::Exception, incoming_sequence_number);
5784 o_prot.write_message_begin(&message_ident)?;
5785 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5786 o_prot.write_message_end()?;
5787 o_prot.flush()
5788 },
5789 _ => {
5790 let ret_err = {
5791 ApplicationError::new(
5792 ApplicationErrorKind::Unknown,
5793 e.description()
5794 )
5795 };
5796 let message_ident = TMessageIdentifier::new("testInsertTablet", TMessageType::Exception, incoming_sequence_number);
5797 o_prot.write_message_begin(&message_ident)?;
5798 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5799 o_prot.write_message_end()?;
5800 o_prot.flush()
5801 },
5802 }
5803 },
5804 }
5805 }
5806 pub fn process_test_insert_tablets<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5807 let args = TSIServiceTestInsertTabletsArgs::read_from_in_protocol(i_prot)?;
5808 match handler.handle_test_insert_tablets(args.req) {
5809 Ok(handler_return) => {
5810 let message_ident = TMessageIdentifier::new("testInsertTablets", TMessageType::Reply, incoming_sequence_number);
5811 o_prot.write_message_begin(&message_ident)?;
5812 let ret = TSIServiceTestInsertTabletsResult { result_value: Some(handler_return) };
5813 ret.write_to_out_protocol(o_prot)?;
5814 o_prot.write_message_end()?;
5815 o_prot.flush()
5816 },
5817 Err(e) => {
5818 match e {
5819 thrift::Error::Application(app_err) => {
5820 let message_ident = TMessageIdentifier::new("testInsertTablets", TMessageType::Exception, incoming_sequence_number);
5821 o_prot.write_message_begin(&message_ident)?;
5822 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5823 o_prot.write_message_end()?;
5824 o_prot.flush()
5825 },
5826 _ => {
5827 let ret_err = {
5828 ApplicationError::new(
5829 ApplicationErrorKind::Unknown,
5830 e.description()
5831 )
5832 };
5833 let message_ident = TMessageIdentifier::new("testInsertTablets", TMessageType::Exception, incoming_sequence_number);
5834 o_prot.write_message_begin(&message_ident)?;
5835 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5836 o_prot.write_message_end()?;
5837 o_prot.flush()
5838 },
5839 }
5840 },
5841 }
5842 }
5843 pub fn process_test_insert_record<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5844 let args = TSIServiceTestInsertRecordArgs::read_from_in_protocol(i_prot)?;
5845 match handler.handle_test_insert_record(args.req) {
5846 Ok(handler_return) => {
5847 let message_ident = TMessageIdentifier::new("testInsertRecord", TMessageType::Reply, incoming_sequence_number);
5848 o_prot.write_message_begin(&message_ident)?;
5849 let ret = TSIServiceTestInsertRecordResult { result_value: Some(handler_return) };
5850 ret.write_to_out_protocol(o_prot)?;
5851 o_prot.write_message_end()?;
5852 o_prot.flush()
5853 },
5854 Err(e) => {
5855 match e {
5856 thrift::Error::Application(app_err) => {
5857 let message_ident = TMessageIdentifier::new("testInsertRecord", TMessageType::Exception, incoming_sequence_number);
5858 o_prot.write_message_begin(&message_ident)?;
5859 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5860 o_prot.write_message_end()?;
5861 o_prot.flush()
5862 },
5863 _ => {
5864 let ret_err = {
5865 ApplicationError::new(
5866 ApplicationErrorKind::Unknown,
5867 e.description()
5868 )
5869 };
5870 let message_ident = TMessageIdentifier::new("testInsertRecord", TMessageType::Exception, incoming_sequence_number);
5871 o_prot.write_message_begin(&message_ident)?;
5872 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5873 o_prot.write_message_end()?;
5874 o_prot.flush()
5875 },
5876 }
5877 },
5878 }
5879 }
5880 pub fn process_test_insert_string_record<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5881 let args = TSIServiceTestInsertStringRecordArgs::read_from_in_protocol(i_prot)?;
5882 match handler.handle_test_insert_string_record(args.req) {
5883 Ok(handler_return) => {
5884 let message_ident = TMessageIdentifier::new("testInsertStringRecord", TMessageType::Reply, incoming_sequence_number);
5885 o_prot.write_message_begin(&message_ident)?;
5886 let ret = TSIServiceTestInsertStringRecordResult { result_value: Some(handler_return) };
5887 ret.write_to_out_protocol(o_prot)?;
5888 o_prot.write_message_end()?;
5889 o_prot.flush()
5890 },
5891 Err(e) => {
5892 match e {
5893 thrift::Error::Application(app_err) => {
5894 let message_ident = TMessageIdentifier::new("testInsertStringRecord", TMessageType::Exception, incoming_sequence_number);
5895 o_prot.write_message_begin(&message_ident)?;
5896 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5897 o_prot.write_message_end()?;
5898 o_prot.flush()
5899 },
5900 _ => {
5901 let ret_err = {
5902 ApplicationError::new(
5903 ApplicationErrorKind::Unknown,
5904 e.description()
5905 )
5906 };
5907 let message_ident = TMessageIdentifier::new("testInsertStringRecord", TMessageType::Exception, incoming_sequence_number);
5908 o_prot.write_message_begin(&message_ident)?;
5909 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5910 o_prot.write_message_end()?;
5911 o_prot.flush()
5912 },
5913 }
5914 },
5915 }
5916 }
5917 pub fn process_test_insert_records<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5918 let args = TSIServiceTestInsertRecordsArgs::read_from_in_protocol(i_prot)?;
5919 match handler.handle_test_insert_records(args.req) {
5920 Ok(handler_return) => {
5921 let message_ident = TMessageIdentifier::new("testInsertRecords", TMessageType::Reply, incoming_sequence_number);
5922 o_prot.write_message_begin(&message_ident)?;
5923 let ret = TSIServiceTestInsertRecordsResult { result_value: Some(handler_return) };
5924 ret.write_to_out_protocol(o_prot)?;
5925 o_prot.write_message_end()?;
5926 o_prot.flush()
5927 },
5928 Err(e) => {
5929 match e {
5930 thrift::Error::Application(app_err) => {
5931 let message_ident = TMessageIdentifier::new("testInsertRecords", TMessageType::Exception, incoming_sequence_number);
5932 o_prot.write_message_begin(&message_ident)?;
5933 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5934 o_prot.write_message_end()?;
5935 o_prot.flush()
5936 },
5937 _ => {
5938 let ret_err = {
5939 ApplicationError::new(
5940 ApplicationErrorKind::Unknown,
5941 e.description()
5942 )
5943 };
5944 let message_ident = TMessageIdentifier::new("testInsertRecords", TMessageType::Exception, incoming_sequence_number);
5945 o_prot.write_message_begin(&message_ident)?;
5946 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5947 o_prot.write_message_end()?;
5948 o_prot.flush()
5949 },
5950 }
5951 },
5952 }
5953 }
5954 pub fn process_test_insert_records_of_one_device<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5955 let args = TSIServiceTestInsertRecordsOfOneDeviceArgs::read_from_in_protocol(i_prot)?;
5956 match handler.handle_test_insert_records_of_one_device(args.req) {
5957 Ok(handler_return) => {
5958 let message_ident = TMessageIdentifier::new("testInsertRecordsOfOneDevice", TMessageType::Reply, incoming_sequence_number);
5959 o_prot.write_message_begin(&message_ident)?;
5960 let ret = TSIServiceTestInsertRecordsOfOneDeviceResult { result_value: Some(handler_return) };
5961 ret.write_to_out_protocol(o_prot)?;
5962 o_prot.write_message_end()?;
5963 o_prot.flush()
5964 },
5965 Err(e) => {
5966 match e {
5967 thrift::Error::Application(app_err) => {
5968 let message_ident = TMessageIdentifier::new("testInsertRecordsOfOneDevice", TMessageType::Exception, incoming_sequence_number);
5969 o_prot.write_message_begin(&message_ident)?;
5970 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
5971 o_prot.write_message_end()?;
5972 o_prot.flush()
5973 },
5974 _ => {
5975 let ret_err = {
5976 ApplicationError::new(
5977 ApplicationErrorKind::Unknown,
5978 e.description()
5979 )
5980 };
5981 let message_ident = TMessageIdentifier::new("testInsertRecordsOfOneDevice", TMessageType::Exception, incoming_sequence_number);
5982 o_prot.write_message_begin(&message_ident)?;
5983 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
5984 o_prot.write_message_end()?;
5985 o_prot.flush()
5986 },
5987 }
5988 },
5989 }
5990 }
5991 pub fn process_test_insert_string_records<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
5992 let args = TSIServiceTestInsertStringRecordsArgs::read_from_in_protocol(i_prot)?;
5993 match handler.handle_test_insert_string_records(args.req) {
5994 Ok(handler_return) => {
5995 let message_ident = TMessageIdentifier::new("testInsertStringRecords", TMessageType::Reply, incoming_sequence_number);
5996 o_prot.write_message_begin(&message_ident)?;
5997 let ret = TSIServiceTestInsertStringRecordsResult { result_value: Some(handler_return) };
5998 ret.write_to_out_protocol(o_prot)?;
5999 o_prot.write_message_end()?;
6000 o_prot.flush()
6001 },
6002 Err(e) => {
6003 match e {
6004 thrift::Error::Application(app_err) => {
6005 let message_ident = TMessageIdentifier::new("testInsertStringRecords", TMessageType::Exception, incoming_sequence_number);
6006 o_prot.write_message_begin(&message_ident)?;
6007 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
6008 o_prot.write_message_end()?;
6009 o_prot.flush()
6010 },
6011 _ => {
6012 let ret_err = {
6013 ApplicationError::new(
6014 ApplicationErrorKind::Unknown,
6015 e.description()
6016 )
6017 };
6018 let message_ident = TMessageIdentifier::new("testInsertStringRecords", TMessageType::Exception, incoming_sequence_number);
6019 o_prot.write_message_begin(&message_ident)?;
6020 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
6021 o_prot.write_message_end()?;
6022 o_prot.flush()
6023 },
6024 }
6025 },
6026 }
6027 }
6028 pub fn process_delete_data<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6029 let args = TSIServiceDeleteDataArgs::read_from_in_protocol(i_prot)?;
6030 match handler.handle_delete_data(args.req) {
6031 Ok(handler_return) => {
6032 let message_ident = TMessageIdentifier::new("deleteData", TMessageType::Reply, incoming_sequence_number);
6033 o_prot.write_message_begin(&message_ident)?;
6034 let ret = TSIServiceDeleteDataResult { result_value: Some(handler_return) };
6035 ret.write_to_out_protocol(o_prot)?;
6036 o_prot.write_message_end()?;
6037 o_prot.flush()
6038 },
6039 Err(e) => {
6040 match e {
6041 thrift::Error::Application(app_err) => {
6042 let message_ident = TMessageIdentifier::new("deleteData", TMessageType::Exception, incoming_sequence_number);
6043 o_prot.write_message_begin(&message_ident)?;
6044 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
6045 o_prot.write_message_end()?;
6046 o_prot.flush()
6047 },
6048 _ => {
6049 let ret_err = {
6050 ApplicationError::new(
6051 ApplicationErrorKind::Unknown,
6052 e.description()
6053 )
6054 };
6055 let message_ident = TMessageIdentifier::new("deleteData", TMessageType::Exception, incoming_sequence_number);
6056 o_prot.write_message_begin(&message_ident)?;
6057 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
6058 o_prot.write_message_end()?;
6059 o_prot.flush()
6060 },
6061 }
6062 },
6063 }
6064 }
6065 pub fn process_execute_raw_data_query<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6066 let args = TSIServiceExecuteRawDataQueryArgs::read_from_in_protocol(i_prot)?;
6067 match handler.handle_execute_raw_data_query(args.req) {
6068 Ok(handler_return) => {
6069 let message_ident = TMessageIdentifier::new("executeRawDataQuery", TMessageType::Reply, incoming_sequence_number);
6070 o_prot.write_message_begin(&message_ident)?;
6071 let ret = TSIServiceExecuteRawDataQueryResult { result_value: Some(handler_return) };
6072 ret.write_to_out_protocol(o_prot)?;
6073 o_prot.write_message_end()?;
6074 o_prot.flush()
6075 },
6076 Err(e) => {
6077 match e {
6078 thrift::Error::Application(app_err) => {
6079 let message_ident = TMessageIdentifier::new("executeRawDataQuery", TMessageType::Exception, incoming_sequence_number);
6080 o_prot.write_message_begin(&message_ident)?;
6081 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
6082 o_prot.write_message_end()?;
6083 o_prot.flush()
6084 },
6085 _ => {
6086 let ret_err = {
6087 ApplicationError::new(
6088 ApplicationErrorKind::Unknown,
6089 e.description()
6090 )
6091 };
6092 let message_ident = TMessageIdentifier::new("executeRawDataQuery", TMessageType::Exception, incoming_sequence_number);
6093 o_prot.write_message_begin(&message_ident)?;
6094 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
6095 o_prot.write_message_end()?;
6096 o_prot.flush()
6097 },
6098 }
6099 },
6100 }
6101 }
6102 pub fn process_request_statement_id<H: TSIServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6103 let args = TSIServiceRequestStatementIdArgs::read_from_in_protocol(i_prot)?;
6104 match handler.handle_request_statement_id(args.session_id) {
6105 Ok(handler_return) => {
6106 let message_ident = TMessageIdentifier::new("requestStatementId", TMessageType::Reply, incoming_sequence_number);
6107 o_prot.write_message_begin(&message_ident)?;
6108 let ret = TSIServiceRequestStatementIdResult { result_value: Some(handler_return) };
6109 ret.write_to_out_protocol(o_prot)?;
6110 o_prot.write_message_end()?;
6111 o_prot.flush()
6112 },
6113 Err(e) => {
6114 match e {
6115 thrift::Error::Application(app_err) => {
6116 let message_ident = TMessageIdentifier::new("requestStatementId", TMessageType::Exception, incoming_sequence_number);
6117 o_prot.write_message_begin(&message_ident)?;
6118 thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
6119 o_prot.write_message_end()?;
6120 o_prot.flush()
6121 },
6122 _ => {
6123 let ret_err = {
6124 ApplicationError::new(
6125 ApplicationErrorKind::Unknown,
6126 e.description()
6127 )
6128 };
6129 let message_ident = TMessageIdentifier::new("requestStatementId", TMessageType::Exception, incoming_sequence_number);
6130 o_prot.write_message_begin(&message_ident)?;
6131 thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
6132 o_prot.write_message_end()?;
6133 o_prot.flush()
6134 },
6135 }
6136 },
6137 }
6138 }
6139}
6140
6141impl <H: TSIServiceSyncHandler> TProcessor for TSIServiceSyncProcessor<H> {
6142 fn process(&self, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6143 let message_ident = i_prot.read_message_begin()?;
6144 let res = match &*message_ident.name {
6145 "openSession" => {
6146 self.process_open_session(message_ident.sequence_number, i_prot, o_prot)
6147 },
6148 "closeSession" => {
6149 self.process_close_session(message_ident.sequence_number, i_prot, o_prot)
6150 },
6151 "executeStatement" => {
6152 self.process_execute_statement(message_ident.sequence_number, i_prot, o_prot)
6153 },
6154 "executeBatchStatement" => {
6155 self.process_execute_batch_statement(message_ident.sequence_number, i_prot, o_prot)
6156 },
6157 "executeQueryStatement" => {
6158 self.process_execute_query_statement(message_ident.sequence_number, i_prot, o_prot)
6159 },
6160 "executeUpdateStatement" => {
6161 self.process_execute_update_statement(message_ident.sequence_number, i_prot, o_prot)
6162 },
6163 "fetchResults" => {
6164 self.process_fetch_results(message_ident.sequence_number, i_prot, o_prot)
6165 },
6166 "fetchMetadata" => {
6167 self.process_fetch_metadata(message_ident.sequence_number, i_prot, o_prot)
6168 },
6169 "cancelOperation" => {
6170 self.process_cancel_operation(message_ident.sequence_number, i_prot, o_prot)
6171 },
6172 "closeOperation" => {
6173 self.process_close_operation(message_ident.sequence_number, i_prot, o_prot)
6174 },
6175 "getTimeZone" => {
6176 self.process_get_time_zone(message_ident.sequence_number, i_prot, o_prot)
6177 },
6178 "setTimeZone" => {
6179 self.process_set_time_zone(message_ident.sequence_number, i_prot, o_prot)
6180 },
6181 "getProperties" => {
6182 self.process_get_properties(message_ident.sequence_number, i_prot, o_prot)
6183 },
6184 "setStorageGroup" => {
6185 self.process_set_storage_group(message_ident.sequence_number, i_prot, o_prot)
6186 },
6187 "createTimeseries" => {
6188 self.process_create_timeseries(message_ident.sequence_number, i_prot, o_prot)
6189 },
6190 "createMultiTimeseries" => {
6191 self.process_create_multi_timeseries(message_ident.sequence_number, i_prot, o_prot)
6192 },
6193 "deleteTimeseries" => {
6194 self.process_delete_timeseries(message_ident.sequence_number, i_prot, o_prot)
6195 },
6196 "deleteStorageGroups" => {
6197 self.process_delete_storage_groups(message_ident.sequence_number, i_prot, o_prot)
6198 },
6199 "insertRecord" => {
6200 self.process_insert_record(message_ident.sequence_number, i_prot, o_prot)
6201 },
6202 "insertStringRecord" => {
6203 self.process_insert_string_record(message_ident.sequence_number, i_prot, o_prot)
6204 },
6205 "insertTablet" => {
6206 self.process_insert_tablet(message_ident.sequence_number, i_prot, o_prot)
6207 },
6208 "insertTablets" => {
6209 self.process_insert_tablets(message_ident.sequence_number, i_prot, o_prot)
6210 },
6211 "insertRecords" => {
6212 self.process_insert_records(message_ident.sequence_number, i_prot, o_prot)
6213 },
6214 "insertRecordsOfOneDevice" => {
6215 self.process_insert_records_of_one_device(message_ident.sequence_number, i_prot, o_prot)
6216 },
6217 "insertStringRecords" => {
6218 self.process_insert_string_records(message_ident.sequence_number, i_prot, o_prot)
6219 },
6220 "testInsertTablet" => {
6221 self.process_test_insert_tablet(message_ident.sequence_number, i_prot, o_prot)
6222 },
6223 "testInsertTablets" => {
6224 self.process_test_insert_tablets(message_ident.sequence_number, i_prot, o_prot)
6225 },
6226 "testInsertRecord" => {
6227 self.process_test_insert_record(message_ident.sequence_number, i_prot, o_prot)
6228 },
6229 "testInsertStringRecord" => {
6230 self.process_test_insert_string_record(message_ident.sequence_number, i_prot, o_prot)
6231 },
6232 "testInsertRecords" => {
6233 self.process_test_insert_records(message_ident.sequence_number, i_prot, o_prot)
6234 },
6235 "testInsertRecordsOfOneDevice" => {
6236 self.process_test_insert_records_of_one_device(message_ident.sequence_number, i_prot, o_prot)
6237 },
6238 "testInsertStringRecords" => {
6239 self.process_test_insert_string_records(message_ident.sequence_number, i_prot, o_prot)
6240 },
6241 "deleteData" => {
6242 self.process_delete_data(message_ident.sequence_number, i_prot, o_prot)
6243 },
6244 "executeRawDataQuery" => {
6245 self.process_execute_raw_data_query(message_ident.sequence_number, i_prot, o_prot)
6246 },
6247 "requestStatementId" => {
6248 self.process_request_statement_id(message_ident.sequence_number, i_prot, o_prot)
6249 },
6250 method => {
6251 Err(
6252 thrift::Error::Application(
6253 ApplicationError::new(
6254 ApplicationErrorKind::UnknownMethod,
6255 format!("unknown method {}", method)
6256 )
6257 )
6258 )
6259 },
6260 };
6261 thrift::server::handle_process_result(&message_ident, res, o_prot)
6262 }
6263}
6264
6265#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6270struct TSIServiceOpenSessionArgs {
6271 req: TSOpenSessionReq,
6272}
6273
6274impl TSIServiceOpenSessionArgs {
6275 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceOpenSessionArgs> {
6276 i_prot.read_struct_begin()?;
6277 let mut f_1: Option<TSOpenSessionReq> = None;
6278 loop {
6279 let field_ident = i_prot.read_field_begin()?;
6280 if field_ident.field_type == TType::Stop {
6281 break;
6282 }
6283 let field_id = field_id(&field_ident)?;
6284 match field_id {
6285 1 => {
6286 let val = TSOpenSessionReq::read_from_in_protocol(i_prot)?;
6287 f_1 = Some(val);
6288 },
6289 _ => {
6290 i_prot.skip(field_ident.field_type)?;
6291 },
6292 };
6293 i_prot.read_field_end()?;
6294 }
6295 i_prot.read_struct_end()?;
6296 verify_required_field_exists("TSIServiceOpenSessionArgs.req", &f_1)?;
6297 let ret = TSIServiceOpenSessionArgs {
6298 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
6299 };
6300 Ok(ret)
6301 }
6302 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6303 let struct_ident = TStructIdentifier::new("openSession_args");
6304 o_prot.write_struct_begin(&struct_ident)?;
6305 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
6306 self.req.write_to_out_protocol(o_prot)?;
6307 o_prot.write_field_end()?;
6308 o_prot.write_field_stop()?;
6309 o_prot.write_struct_end()
6310 }
6311}
6312
6313#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6318struct TSIServiceOpenSessionResult {
6319 result_value: Option<TSOpenSessionResp>,
6320}
6321
6322impl TSIServiceOpenSessionResult {
6323 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceOpenSessionResult> {
6324 i_prot.read_struct_begin()?;
6325 let mut f_0: Option<TSOpenSessionResp> = None;
6326 loop {
6327 let field_ident = i_prot.read_field_begin()?;
6328 if field_ident.field_type == TType::Stop {
6329 break;
6330 }
6331 let field_id = field_id(&field_ident)?;
6332 match field_id {
6333 0 => {
6334 let val = TSOpenSessionResp::read_from_in_protocol(i_prot)?;
6335 f_0 = Some(val);
6336 },
6337 _ => {
6338 i_prot.skip(field_ident.field_type)?;
6339 },
6340 };
6341 i_prot.read_field_end()?;
6342 }
6343 i_prot.read_struct_end()?;
6344 let ret = TSIServiceOpenSessionResult {
6345 result_value: f_0,
6346 };
6347 Ok(ret)
6348 }
6349 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6350 let struct_ident = TStructIdentifier::new("TSIServiceOpenSessionResult");
6351 o_prot.write_struct_begin(&struct_ident)?;
6352 if let Some(ref fld_var) = self.result_value {
6353 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
6354 fld_var.write_to_out_protocol(o_prot)?;
6355 o_prot.write_field_end()?;
6356 ()
6357 } else {
6358 ()
6359 }
6360 o_prot.write_field_stop()?;
6361 o_prot.write_struct_end()
6362 }
6363 fn ok_or(self) -> thrift::Result<TSOpenSessionResp> {
6364 if self.result_value.is_some() {
6365 Ok(self.result_value.unwrap())
6366 } else {
6367 Err(
6368 thrift::Error::Application(
6369 ApplicationError::new(
6370 ApplicationErrorKind::MissingResult,
6371 "no result received for TSIServiceOpenSession"
6372 )
6373 )
6374 )
6375 }
6376 }
6377}
6378
6379#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6384struct TSIServiceCloseSessionArgs {
6385 req: TSCloseSessionReq,
6386}
6387
6388impl TSIServiceCloseSessionArgs {
6389 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceCloseSessionArgs> {
6390 i_prot.read_struct_begin()?;
6391 let mut f_1: Option<TSCloseSessionReq> = None;
6392 loop {
6393 let field_ident = i_prot.read_field_begin()?;
6394 if field_ident.field_type == TType::Stop {
6395 break;
6396 }
6397 let field_id = field_id(&field_ident)?;
6398 match field_id {
6399 1 => {
6400 let val = TSCloseSessionReq::read_from_in_protocol(i_prot)?;
6401 f_1 = Some(val);
6402 },
6403 _ => {
6404 i_prot.skip(field_ident.field_type)?;
6405 },
6406 };
6407 i_prot.read_field_end()?;
6408 }
6409 i_prot.read_struct_end()?;
6410 verify_required_field_exists("TSIServiceCloseSessionArgs.req", &f_1)?;
6411 let ret = TSIServiceCloseSessionArgs {
6412 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
6413 };
6414 Ok(ret)
6415 }
6416 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6417 let struct_ident = TStructIdentifier::new("closeSession_args");
6418 o_prot.write_struct_begin(&struct_ident)?;
6419 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
6420 self.req.write_to_out_protocol(o_prot)?;
6421 o_prot.write_field_end()?;
6422 o_prot.write_field_stop()?;
6423 o_prot.write_struct_end()
6424 }
6425}
6426
6427#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6432struct TSIServiceCloseSessionResult {
6433 result_value: Option<TSStatus>,
6434}
6435
6436impl TSIServiceCloseSessionResult {
6437 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceCloseSessionResult> {
6438 i_prot.read_struct_begin()?;
6439 let mut f_0: Option<TSStatus> = None;
6440 loop {
6441 let field_ident = i_prot.read_field_begin()?;
6442 if field_ident.field_type == TType::Stop {
6443 break;
6444 }
6445 let field_id = field_id(&field_ident)?;
6446 match field_id {
6447 0 => {
6448 let val = TSStatus::read_from_in_protocol(i_prot)?;
6449 f_0 = Some(val);
6450 },
6451 _ => {
6452 i_prot.skip(field_ident.field_type)?;
6453 },
6454 };
6455 i_prot.read_field_end()?;
6456 }
6457 i_prot.read_struct_end()?;
6458 let ret = TSIServiceCloseSessionResult {
6459 result_value: f_0,
6460 };
6461 Ok(ret)
6462 }
6463 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6464 let struct_ident = TStructIdentifier::new("TSIServiceCloseSessionResult");
6465 o_prot.write_struct_begin(&struct_ident)?;
6466 if let Some(ref fld_var) = self.result_value {
6467 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
6468 fld_var.write_to_out_protocol(o_prot)?;
6469 o_prot.write_field_end()?;
6470 ()
6471 } else {
6472 ()
6473 }
6474 o_prot.write_field_stop()?;
6475 o_prot.write_struct_end()
6476 }
6477 fn ok_or(self) -> thrift::Result<TSStatus> {
6478 if self.result_value.is_some() {
6479 Ok(self.result_value.unwrap())
6480 } else {
6481 Err(
6482 thrift::Error::Application(
6483 ApplicationError::new(
6484 ApplicationErrorKind::MissingResult,
6485 "no result received for TSIServiceCloseSession"
6486 )
6487 )
6488 )
6489 }
6490 }
6491}
6492
6493#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6498struct TSIServiceExecuteStatementArgs {
6499 req: TSExecuteStatementReq,
6500}
6501
6502impl TSIServiceExecuteStatementArgs {
6503 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceExecuteStatementArgs> {
6504 i_prot.read_struct_begin()?;
6505 let mut f_1: Option<TSExecuteStatementReq> = None;
6506 loop {
6507 let field_ident = i_prot.read_field_begin()?;
6508 if field_ident.field_type == TType::Stop {
6509 break;
6510 }
6511 let field_id = field_id(&field_ident)?;
6512 match field_id {
6513 1 => {
6514 let val = TSExecuteStatementReq::read_from_in_protocol(i_prot)?;
6515 f_1 = Some(val);
6516 },
6517 _ => {
6518 i_prot.skip(field_ident.field_type)?;
6519 },
6520 };
6521 i_prot.read_field_end()?;
6522 }
6523 i_prot.read_struct_end()?;
6524 verify_required_field_exists("TSIServiceExecuteStatementArgs.req", &f_1)?;
6525 let ret = TSIServiceExecuteStatementArgs {
6526 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
6527 };
6528 Ok(ret)
6529 }
6530 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6531 let struct_ident = TStructIdentifier::new("executeStatement_args");
6532 o_prot.write_struct_begin(&struct_ident)?;
6533 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
6534 self.req.write_to_out_protocol(o_prot)?;
6535 o_prot.write_field_end()?;
6536 o_prot.write_field_stop()?;
6537 o_prot.write_struct_end()
6538 }
6539}
6540
6541#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6546struct TSIServiceExecuteStatementResult {
6547 result_value: Option<TSExecuteStatementResp>,
6548}
6549
6550impl TSIServiceExecuteStatementResult {
6551 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceExecuteStatementResult> {
6552 i_prot.read_struct_begin()?;
6553 let mut f_0: Option<TSExecuteStatementResp> = None;
6554 loop {
6555 let field_ident = i_prot.read_field_begin()?;
6556 if field_ident.field_type == TType::Stop {
6557 break;
6558 }
6559 let field_id = field_id(&field_ident)?;
6560 match field_id {
6561 0 => {
6562 let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?;
6563 f_0 = Some(val);
6564 },
6565 _ => {
6566 i_prot.skip(field_ident.field_type)?;
6567 },
6568 };
6569 i_prot.read_field_end()?;
6570 }
6571 i_prot.read_struct_end()?;
6572 let ret = TSIServiceExecuteStatementResult {
6573 result_value: f_0,
6574 };
6575 Ok(ret)
6576 }
6577 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6578 let struct_ident = TStructIdentifier::new("TSIServiceExecuteStatementResult");
6579 o_prot.write_struct_begin(&struct_ident)?;
6580 if let Some(ref fld_var) = self.result_value {
6581 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
6582 fld_var.write_to_out_protocol(o_prot)?;
6583 o_prot.write_field_end()?;
6584 ()
6585 } else {
6586 ()
6587 }
6588 o_prot.write_field_stop()?;
6589 o_prot.write_struct_end()
6590 }
6591 fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> {
6592 if self.result_value.is_some() {
6593 Ok(self.result_value.unwrap())
6594 } else {
6595 Err(
6596 thrift::Error::Application(
6597 ApplicationError::new(
6598 ApplicationErrorKind::MissingResult,
6599 "no result received for TSIServiceExecuteStatement"
6600 )
6601 )
6602 )
6603 }
6604 }
6605}
6606
6607#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6612struct TSIServiceExecuteBatchStatementArgs {
6613 req: TSExecuteBatchStatementReq,
6614}
6615
6616impl TSIServiceExecuteBatchStatementArgs {
6617 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceExecuteBatchStatementArgs> {
6618 i_prot.read_struct_begin()?;
6619 let mut f_1: Option<TSExecuteBatchStatementReq> = None;
6620 loop {
6621 let field_ident = i_prot.read_field_begin()?;
6622 if field_ident.field_type == TType::Stop {
6623 break;
6624 }
6625 let field_id = field_id(&field_ident)?;
6626 match field_id {
6627 1 => {
6628 let val = TSExecuteBatchStatementReq::read_from_in_protocol(i_prot)?;
6629 f_1 = Some(val);
6630 },
6631 _ => {
6632 i_prot.skip(field_ident.field_type)?;
6633 },
6634 };
6635 i_prot.read_field_end()?;
6636 }
6637 i_prot.read_struct_end()?;
6638 verify_required_field_exists("TSIServiceExecuteBatchStatementArgs.req", &f_1)?;
6639 let ret = TSIServiceExecuteBatchStatementArgs {
6640 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
6641 };
6642 Ok(ret)
6643 }
6644 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6645 let struct_ident = TStructIdentifier::new("executeBatchStatement_args");
6646 o_prot.write_struct_begin(&struct_ident)?;
6647 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
6648 self.req.write_to_out_protocol(o_prot)?;
6649 o_prot.write_field_end()?;
6650 o_prot.write_field_stop()?;
6651 o_prot.write_struct_end()
6652 }
6653}
6654
6655#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6660struct TSIServiceExecuteBatchStatementResult {
6661 result_value: Option<TSStatus>,
6662}
6663
6664impl TSIServiceExecuteBatchStatementResult {
6665 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceExecuteBatchStatementResult> {
6666 i_prot.read_struct_begin()?;
6667 let mut f_0: Option<TSStatus> = None;
6668 loop {
6669 let field_ident = i_prot.read_field_begin()?;
6670 if field_ident.field_type == TType::Stop {
6671 break;
6672 }
6673 let field_id = field_id(&field_ident)?;
6674 match field_id {
6675 0 => {
6676 let val = TSStatus::read_from_in_protocol(i_prot)?;
6677 f_0 = Some(val);
6678 },
6679 _ => {
6680 i_prot.skip(field_ident.field_type)?;
6681 },
6682 };
6683 i_prot.read_field_end()?;
6684 }
6685 i_prot.read_struct_end()?;
6686 let ret = TSIServiceExecuteBatchStatementResult {
6687 result_value: f_0,
6688 };
6689 Ok(ret)
6690 }
6691 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6692 let struct_ident = TStructIdentifier::new("TSIServiceExecuteBatchStatementResult");
6693 o_prot.write_struct_begin(&struct_ident)?;
6694 if let Some(ref fld_var) = self.result_value {
6695 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
6696 fld_var.write_to_out_protocol(o_prot)?;
6697 o_prot.write_field_end()?;
6698 ()
6699 } else {
6700 ()
6701 }
6702 o_prot.write_field_stop()?;
6703 o_prot.write_struct_end()
6704 }
6705 fn ok_or(self) -> thrift::Result<TSStatus> {
6706 if self.result_value.is_some() {
6707 Ok(self.result_value.unwrap())
6708 } else {
6709 Err(
6710 thrift::Error::Application(
6711 ApplicationError::new(
6712 ApplicationErrorKind::MissingResult,
6713 "no result received for TSIServiceExecuteBatchStatement"
6714 )
6715 )
6716 )
6717 }
6718 }
6719}
6720
6721#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6726struct TSIServiceExecuteQueryStatementArgs {
6727 req: TSExecuteStatementReq,
6728}
6729
6730impl TSIServiceExecuteQueryStatementArgs {
6731 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceExecuteQueryStatementArgs> {
6732 i_prot.read_struct_begin()?;
6733 let mut f_1: Option<TSExecuteStatementReq> = None;
6734 loop {
6735 let field_ident = i_prot.read_field_begin()?;
6736 if field_ident.field_type == TType::Stop {
6737 break;
6738 }
6739 let field_id = field_id(&field_ident)?;
6740 match field_id {
6741 1 => {
6742 let val = TSExecuteStatementReq::read_from_in_protocol(i_prot)?;
6743 f_1 = Some(val);
6744 },
6745 _ => {
6746 i_prot.skip(field_ident.field_type)?;
6747 },
6748 };
6749 i_prot.read_field_end()?;
6750 }
6751 i_prot.read_struct_end()?;
6752 verify_required_field_exists("TSIServiceExecuteQueryStatementArgs.req", &f_1)?;
6753 let ret = TSIServiceExecuteQueryStatementArgs {
6754 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
6755 };
6756 Ok(ret)
6757 }
6758 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6759 let struct_ident = TStructIdentifier::new("executeQueryStatement_args");
6760 o_prot.write_struct_begin(&struct_ident)?;
6761 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
6762 self.req.write_to_out_protocol(o_prot)?;
6763 o_prot.write_field_end()?;
6764 o_prot.write_field_stop()?;
6765 o_prot.write_struct_end()
6766 }
6767}
6768
6769#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6774struct TSIServiceExecuteQueryStatementResult {
6775 result_value: Option<TSExecuteStatementResp>,
6776}
6777
6778impl TSIServiceExecuteQueryStatementResult {
6779 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceExecuteQueryStatementResult> {
6780 i_prot.read_struct_begin()?;
6781 let mut f_0: Option<TSExecuteStatementResp> = None;
6782 loop {
6783 let field_ident = i_prot.read_field_begin()?;
6784 if field_ident.field_type == TType::Stop {
6785 break;
6786 }
6787 let field_id = field_id(&field_ident)?;
6788 match field_id {
6789 0 => {
6790 let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?;
6791 f_0 = Some(val);
6792 },
6793 _ => {
6794 i_prot.skip(field_ident.field_type)?;
6795 },
6796 };
6797 i_prot.read_field_end()?;
6798 }
6799 i_prot.read_struct_end()?;
6800 let ret = TSIServiceExecuteQueryStatementResult {
6801 result_value: f_0,
6802 };
6803 Ok(ret)
6804 }
6805 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6806 let struct_ident = TStructIdentifier::new("TSIServiceExecuteQueryStatementResult");
6807 o_prot.write_struct_begin(&struct_ident)?;
6808 if let Some(ref fld_var) = self.result_value {
6809 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
6810 fld_var.write_to_out_protocol(o_prot)?;
6811 o_prot.write_field_end()?;
6812 ()
6813 } else {
6814 ()
6815 }
6816 o_prot.write_field_stop()?;
6817 o_prot.write_struct_end()
6818 }
6819 fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> {
6820 if self.result_value.is_some() {
6821 Ok(self.result_value.unwrap())
6822 } else {
6823 Err(
6824 thrift::Error::Application(
6825 ApplicationError::new(
6826 ApplicationErrorKind::MissingResult,
6827 "no result received for TSIServiceExecuteQueryStatement"
6828 )
6829 )
6830 )
6831 }
6832 }
6833}
6834
6835#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6840struct TSIServiceExecuteUpdateStatementArgs {
6841 req: TSExecuteStatementReq,
6842}
6843
6844impl TSIServiceExecuteUpdateStatementArgs {
6845 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceExecuteUpdateStatementArgs> {
6846 i_prot.read_struct_begin()?;
6847 let mut f_1: Option<TSExecuteStatementReq> = None;
6848 loop {
6849 let field_ident = i_prot.read_field_begin()?;
6850 if field_ident.field_type == TType::Stop {
6851 break;
6852 }
6853 let field_id = field_id(&field_ident)?;
6854 match field_id {
6855 1 => {
6856 let val = TSExecuteStatementReq::read_from_in_protocol(i_prot)?;
6857 f_1 = Some(val);
6858 },
6859 _ => {
6860 i_prot.skip(field_ident.field_type)?;
6861 },
6862 };
6863 i_prot.read_field_end()?;
6864 }
6865 i_prot.read_struct_end()?;
6866 verify_required_field_exists("TSIServiceExecuteUpdateStatementArgs.req", &f_1)?;
6867 let ret = TSIServiceExecuteUpdateStatementArgs {
6868 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
6869 };
6870 Ok(ret)
6871 }
6872 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6873 let struct_ident = TStructIdentifier::new("executeUpdateStatement_args");
6874 o_prot.write_struct_begin(&struct_ident)?;
6875 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
6876 self.req.write_to_out_protocol(o_prot)?;
6877 o_prot.write_field_end()?;
6878 o_prot.write_field_stop()?;
6879 o_prot.write_struct_end()
6880 }
6881}
6882
6883#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6888struct TSIServiceExecuteUpdateStatementResult {
6889 result_value: Option<TSExecuteStatementResp>,
6890}
6891
6892impl TSIServiceExecuteUpdateStatementResult {
6893 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceExecuteUpdateStatementResult> {
6894 i_prot.read_struct_begin()?;
6895 let mut f_0: Option<TSExecuteStatementResp> = None;
6896 loop {
6897 let field_ident = i_prot.read_field_begin()?;
6898 if field_ident.field_type == TType::Stop {
6899 break;
6900 }
6901 let field_id = field_id(&field_ident)?;
6902 match field_id {
6903 0 => {
6904 let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?;
6905 f_0 = Some(val);
6906 },
6907 _ => {
6908 i_prot.skip(field_ident.field_type)?;
6909 },
6910 };
6911 i_prot.read_field_end()?;
6912 }
6913 i_prot.read_struct_end()?;
6914 let ret = TSIServiceExecuteUpdateStatementResult {
6915 result_value: f_0,
6916 };
6917 Ok(ret)
6918 }
6919 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6920 let struct_ident = TStructIdentifier::new("TSIServiceExecuteUpdateStatementResult");
6921 o_prot.write_struct_begin(&struct_ident)?;
6922 if let Some(ref fld_var) = self.result_value {
6923 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
6924 fld_var.write_to_out_protocol(o_prot)?;
6925 o_prot.write_field_end()?;
6926 ()
6927 } else {
6928 ()
6929 }
6930 o_prot.write_field_stop()?;
6931 o_prot.write_struct_end()
6932 }
6933 fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> {
6934 if self.result_value.is_some() {
6935 Ok(self.result_value.unwrap())
6936 } else {
6937 Err(
6938 thrift::Error::Application(
6939 ApplicationError::new(
6940 ApplicationErrorKind::MissingResult,
6941 "no result received for TSIServiceExecuteUpdateStatement"
6942 )
6943 )
6944 )
6945 }
6946 }
6947}
6948
6949#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6954struct TSIServiceFetchResultsArgs {
6955 req: TSFetchResultsReq,
6956}
6957
6958impl TSIServiceFetchResultsArgs {
6959 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceFetchResultsArgs> {
6960 i_prot.read_struct_begin()?;
6961 let mut f_1: Option<TSFetchResultsReq> = None;
6962 loop {
6963 let field_ident = i_prot.read_field_begin()?;
6964 if field_ident.field_type == TType::Stop {
6965 break;
6966 }
6967 let field_id = field_id(&field_ident)?;
6968 match field_id {
6969 1 => {
6970 let val = TSFetchResultsReq::read_from_in_protocol(i_prot)?;
6971 f_1 = Some(val);
6972 },
6973 _ => {
6974 i_prot.skip(field_ident.field_type)?;
6975 },
6976 };
6977 i_prot.read_field_end()?;
6978 }
6979 i_prot.read_struct_end()?;
6980 verify_required_field_exists("TSIServiceFetchResultsArgs.req", &f_1)?;
6981 let ret = TSIServiceFetchResultsArgs {
6982 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
6983 };
6984 Ok(ret)
6985 }
6986 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
6987 let struct_ident = TStructIdentifier::new("fetchResults_args");
6988 o_prot.write_struct_begin(&struct_ident)?;
6989 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
6990 self.req.write_to_out_protocol(o_prot)?;
6991 o_prot.write_field_end()?;
6992 o_prot.write_field_stop()?;
6993 o_prot.write_struct_end()
6994 }
6995}
6996
6997#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7002struct TSIServiceFetchResultsResult {
7003 result_value: Option<TSFetchResultsResp>,
7004}
7005
7006impl TSIServiceFetchResultsResult {
7007 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceFetchResultsResult> {
7008 i_prot.read_struct_begin()?;
7009 let mut f_0: Option<TSFetchResultsResp> = 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 0 => {
7018 let val = TSFetchResultsResp::read_from_in_protocol(i_prot)?;
7019 f_0 = Some(val);
7020 },
7021 _ => {
7022 i_prot.skip(field_ident.field_type)?;
7023 },
7024 };
7025 i_prot.read_field_end()?;
7026 }
7027 i_prot.read_struct_end()?;
7028 let ret = TSIServiceFetchResultsResult {
7029 result_value: f_0,
7030 };
7031 Ok(ret)
7032 }
7033 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7034 let struct_ident = TStructIdentifier::new("TSIServiceFetchResultsResult");
7035 o_prot.write_struct_begin(&struct_ident)?;
7036 if let Some(ref fld_var) = self.result_value {
7037 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
7038 fld_var.write_to_out_protocol(o_prot)?;
7039 o_prot.write_field_end()?;
7040 ()
7041 } else {
7042 ()
7043 }
7044 o_prot.write_field_stop()?;
7045 o_prot.write_struct_end()
7046 }
7047 fn ok_or(self) -> thrift::Result<TSFetchResultsResp> {
7048 if self.result_value.is_some() {
7049 Ok(self.result_value.unwrap())
7050 } else {
7051 Err(
7052 thrift::Error::Application(
7053 ApplicationError::new(
7054 ApplicationErrorKind::MissingResult,
7055 "no result received for TSIServiceFetchsResult"
7056 )
7057 )
7058 )
7059 }
7060 }
7061}
7062
7063#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7068struct TSIServiceFetchMetadataArgs {
7069 req: TSFetchMetadataReq,
7070}
7071
7072impl TSIServiceFetchMetadataArgs {
7073 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceFetchMetadataArgs> {
7074 i_prot.read_struct_begin()?;
7075 let mut f_1: Option<TSFetchMetadataReq> = None;
7076 loop {
7077 let field_ident = i_prot.read_field_begin()?;
7078 if field_ident.field_type == TType::Stop {
7079 break;
7080 }
7081 let field_id = field_id(&field_ident)?;
7082 match field_id {
7083 1 => {
7084 let val = TSFetchMetadataReq::read_from_in_protocol(i_prot)?;
7085 f_1 = Some(val);
7086 },
7087 _ => {
7088 i_prot.skip(field_ident.field_type)?;
7089 },
7090 };
7091 i_prot.read_field_end()?;
7092 }
7093 i_prot.read_struct_end()?;
7094 verify_required_field_exists("TSIServiceFetchMetadataArgs.req", &f_1)?;
7095 let ret = TSIServiceFetchMetadataArgs {
7096 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
7097 };
7098 Ok(ret)
7099 }
7100 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7101 let struct_ident = TStructIdentifier::new("fetchMetadata_args");
7102 o_prot.write_struct_begin(&struct_ident)?;
7103 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
7104 self.req.write_to_out_protocol(o_prot)?;
7105 o_prot.write_field_end()?;
7106 o_prot.write_field_stop()?;
7107 o_prot.write_struct_end()
7108 }
7109}
7110
7111#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7116struct TSIServiceFetchMetadataResult {
7117 result_value: Option<TSFetchMetadataResp>,
7118}
7119
7120impl TSIServiceFetchMetadataResult {
7121 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceFetchMetadataResult> {
7122 i_prot.read_struct_begin()?;
7123 let mut f_0: Option<TSFetchMetadataResp> = None;
7124 loop {
7125 let field_ident = i_prot.read_field_begin()?;
7126 if field_ident.field_type == TType::Stop {
7127 break;
7128 }
7129 let field_id = field_id(&field_ident)?;
7130 match field_id {
7131 0 => {
7132 let val = TSFetchMetadataResp::read_from_in_protocol(i_prot)?;
7133 f_0 = Some(val);
7134 },
7135 _ => {
7136 i_prot.skip(field_ident.field_type)?;
7137 },
7138 };
7139 i_prot.read_field_end()?;
7140 }
7141 i_prot.read_struct_end()?;
7142 let ret = TSIServiceFetchMetadataResult {
7143 result_value: f_0,
7144 };
7145 Ok(ret)
7146 }
7147 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7148 let struct_ident = TStructIdentifier::new("TSIServiceFetchMetadataResult");
7149 o_prot.write_struct_begin(&struct_ident)?;
7150 if let Some(ref fld_var) = self.result_value {
7151 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
7152 fld_var.write_to_out_protocol(o_prot)?;
7153 o_prot.write_field_end()?;
7154 ()
7155 } else {
7156 ()
7157 }
7158 o_prot.write_field_stop()?;
7159 o_prot.write_struct_end()
7160 }
7161 fn ok_or(self) -> thrift::Result<TSFetchMetadataResp> {
7162 if self.result_value.is_some() {
7163 Ok(self.result_value.unwrap())
7164 } else {
7165 Err(
7166 thrift::Error::Application(
7167 ApplicationError::new(
7168 ApplicationErrorKind::MissingResult,
7169 "no result received for TSIServiceFetchMetadata"
7170 )
7171 )
7172 )
7173 }
7174 }
7175}
7176
7177#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7182struct TSIServiceCancelOperationArgs {
7183 req: TSCancelOperationReq,
7184}
7185
7186impl TSIServiceCancelOperationArgs {
7187 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceCancelOperationArgs> {
7188 i_prot.read_struct_begin()?;
7189 let mut f_1: Option<TSCancelOperationReq> = None;
7190 loop {
7191 let field_ident = i_prot.read_field_begin()?;
7192 if field_ident.field_type == TType::Stop {
7193 break;
7194 }
7195 let field_id = field_id(&field_ident)?;
7196 match field_id {
7197 1 => {
7198 let val = TSCancelOperationReq::read_from_in_protocol(i_prot)?;
7199 f_1 = Some(val);
7200 },
7201 _ => {
7202 i_prot.skip(field_ident.field_type)?;
7203 },
7204 };
7205 i_prot.read_field_end()?;
7206 }
7207 i_prot.read_struct_end()?;
7208 verify_required_field_exists("TSIServiceCancelOperationArgs.req", &f_1)?;
7209 let ret = TSIServiceCancelOperationArgs {
7210 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
7211 };
7212 Ok(ret)
7213 }
7214 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7215 let struct_ident = TStructIdentifier::new("cancelOperation_args");
7216 o_prot.write_struct_begin(&struct_ident)?;
7217 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
7218 self.req.write_to_out_protocol(o_prot)?;
7219 o_prot.write_field_end()?;
7220 o_prot.write_field_stop()?;
7221 o_prot.write_struct_end()
7222 }
7223}
7224
7225#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7230struct TSIServiceCancelOperationResult {
7231 result_value: Option<TSStatus>,
7232}
7233
7234impl TSIServiceCancelOperationResult {
7235 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceCancelOperationResult> {
7236 i_prot.read_struct_begin()?;
7237 let mut f_0: Option<TSStatus> = None;
7238 loop {
7239 let field_ident = i_prot.read_field_begin()?;
7240 if field_ident.field_type == TType::Stop {
7241 break;
7242 }
7243 let field_id = field_id(&field_ident)?;
7244 match field_id {
7245 0 => {
7246 let val = TSStatus::read_from_in_protocol(i_prot)?;
7247 f_0 = Some(val);
7248 },
7249 _ => {
7250 i_prot.skip(field_ident.field_type)?;
7251 },
7252 };
7253 i_prot.read_field_end()?;
7254 }
7255 i_prot.read_struct_end()?;
7256 let ret = TSIServiceCancelOperationResult {
7257 result_value: f_0,
7258 };
7259 Ok(ret)
7260 }
7261 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7262 let struct_ident = TStructIdentifier::new("TSIServiceCancelOperationResult");
7263 o_prot.write_struct_begin(&struct_ident)?;
7264 if let Some(ref fld_var) = self.result_value {
7265 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
7266 fld_var.write_to_out_protocol(o_prot)?;
7267 o_prot.write_field_end()?;
7268 ()
7269 } else {
7270 ()
7271 }
7272 o_prot.write_field_stop()?;
7273 o_prot.write_struct_end()
7274 }
7275 fn ok_or(self) -> thrift::Result<TSStatus> {
7276 if self.result_value.is_some() {
7277 Ok(self.result_value.unwrap())
7278 } else {
7279 Err(
7280 thrift::Error::Application(
7281 ApplicationError::new(
7282 ApplicationErrorKind::MissingResult,
7283 "no result received for TSIServiceCancelOperation"
7284 )
7285 )
7286 )
7287 }
7288 }
7289}
7290
7291#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7296struct TSIServiceCloseOperationArgs {
7297 req: TSCloseOperationReq,
7298}
7299
7300impl TSIServiceCloseOperationArgs {
7301 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceCloseOperationArgs> {
7302 i_prot.read_struct_begin()?;
7303 let mut f_1: Option<TSCloseOperationReq> = None;
7304 loop {
7305 let field_ident = i_prot.read_field_begin()?;
7306 if field_ident.field_type == TType::Stop {
7307 break;
7308 }
7309 let field_id = field_id(&field_ident)?;
7310 match field_id {
7311 1 => {
7312 let val = TSCloseOperationReq::read_from_in_protocol(i_prot)?;
7313 f_1 = Some(val);
7314 },
7315 _ => {
7316 i_prot.skip(field_ident.field_type)?;
7317 },
7318 };
7319 i_prot.read_field_end()?;
7320 }
7321 i_prot.read_struct_end()?;
7322 verify_required_field_exists("TSIServiceCloseOperationArgs.req", &f_1)?;
7323 let ret = TSIServiceCloseOperationArgs {
7324 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
7325 };
7326 Ok(ret)
7327 }
7328 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7329 let struct_ident = TStructIdentifier::new("closeOperation_args");
7330 o_prot.write_struct_begin(&struct_ident)?;
7331 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
7332 self.req.write_to_out_protocol(o_prot)?;
7333 o_prot.write_field_end()?;
7334 o_prot.write_field_stop()?;
7335 o_prot.write_struct_end()
7336 }
7337}
7338
7339#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7344struct TSIServiceCloseOperationResult {
7345 result_value: Option<TSStatus>,
7346}
7347
7348impl TSIServiceCloseOperationResult {
7349 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceCloseOperationResult> {
7350 i_prot.read_struct_begin()?;
7351 let mut f_0: Option<TSStatus> = None;
7352 loop {
7353 let field_ident = i_prot.read_field_begin()?;
7354 if field_ident.field_type == TType::Stop {
7355 break;
7356 }
7357 let field_id = field_id(&field_ident)?;
7358 match field_id {
7359 0 => {
7360 let val = TSStatus::read_from_in_protocol(i_prot)?;
7361 f_0 = Some(val);
7362 },
7363 _ => {
7364 i_prot.skip(field_ident.field_type)?;
7365 },
7366 };
7367 i_prot.read_field_end()?;
7368 }
7369 i_prot.read_struct_end()?;
7370 let ret = TSIServiceCloseOperationResult {
7371 result_value: f_0,
7372 };
7373 Ok(ret)
7374 }
7375 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7376 let struct_ident = TStructIdentifier::new("TSIServiceCloseOperationResult");
7377 o_prot.write_struct_begin(&struct_ident)?;
7378 if let Some(ref fld_var) = self.result_value {
7379 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
7380 fld_var.write_to_out_protocol(o_prot)?;
7381 o_prot.write_field_end()?;
7382 ()
7383 } else {
7384 ()
7385 }
7386 o_prot.write_field_stop()?;
7387 o_prot.write_struct_end()
7388 }
7389 fn ok_or(self) -> thrift::Result<TSStatus> {
7390 if self.result_value.is_some() {
7391 Ok(self.result_value.unwrap())
7392 } else {
7393 Err(
7394 thrift::Error::Application(
7395 ApplicationError::new(
7396 ApplicationErrorKind::MissingResult,
7397 "no result received for TSIServiceCloseOperation"
7398 )
7399 )
7400 )
7401 }
7402 }
7403}
7404
7405#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7410struct TSIServiceGetTimeZoneArgs {
7411 session_id: i64,
7412}
7413
7414impl TSIServiceGetTimeZoneArgs {
7415 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceGetTimeZoneArgs> {
7416 i_prot.read_struct_begin()?;
7417 let mut f_1: Option<i64> = None;
7418 loop {
7419 let field_ident = i_prot.read_field_begin()?;
7420 if field_ident.field_type == TType::Stop {
7421 break;
7422 }
7423 let field_id = field_id(&field_ident)?;
7424 match field_id {
7425 1 => {
7426 let val = i_prot.read_i64()?;
7427 f_1 = Some(val);
7428 },
7429 _ => {
7430 i_prot.skip(field_ident.field_type)?;
7431 },
7432 };
7433 i_prot.read_field_end()?;
7434 }
7435 i_prot.read_struct_end()?;
7436 verify_required_field_exists("TSIServiceGetTimeZoneArgs.session_id", &f_1)?;
7437 let ret = TSIServiceGetTimeZoneArgs {
7438 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
7439 };
7440 Ok(ret)
7441 }
7442 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7443 let struct_ident = TStructIdentifier::new("getTimeZone_args");
7444 o_prot.write_struct_begin(&struct_ident)?;
7445 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
7446 o_prot.write_i64(self.session_id)?;
7447 o_prot.write_field_end()?;
7448 o_prot.write_field_stop()?;
7449 o_prot.write_struct_end()
7450 }
7451}
7452
7453#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7458struct TSIServiceGetTimeZoneResult {
7459 result_value: Option<TSGetTimeZoneResp>,
7460}
7461
7462impl TSIServiceGetTimeZoneResult {
7463 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceGetTimeZoneResult> {
7464 i_prot.read_struct_begin()?;
7465 let mut f_0: Option<TSGetTimeZoneResp> = None;
7466 loop {
7467 let field_ident = i_prot.read_field_begin()?;
7468 if field_ident.field_type == TType::Stop {
7469 break;
7470 }
7471 let field_id = field_id(&field_ident)?;
7472 match field_id {
7473 0 => {
7474 let val = TSGetTimeZoneResp::read_from_in_protocol(i_prot)?;
7475 f_0 = Some(val);
7476 },
7477 _ => {
7478 i_prot.skip(field_ident.field_type)?;
7479 },
7480 };
7481 i_prot.read_field_end()?;
7482 }
7483 i_prot.read_struct_end()?;
7484 let ret = TSIServiceGetTimeZoneResult {
7485 result_value: f_0,
7486 };
7487 Ok(ret)
7488 }
7489 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7490 let struct_ident = TStructIdentifier::new("TSIServiceGetTimeZoneResult");
7491 o_prot.write_struct_begin(&struct_ident)?;
7492 if let Some(ref fld_var) = self.result_value {
7493 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
7494 fld_var.write_to_out_protocol(o_prot)?;
7495 o_prot.write_field_end()?;
7496 ()
7497 } else {
7498 ()
7499 }
7500 o_prot.write_field_stop()?;
7501 o_prot.write_struct_end()
7502 }
7503 fn ok_or(self) -> thrift::Result<TSGetTimeZoneResp> {
7504 if self.result_value.is_some() {
7505 Ok(self.result_value.unwrap())
7506 } else {
7507 Err(
7508 thrift::Error::Application(
7509 ApplicationError::new(
7510 ApplicationErrorKind::MissingResult,
7511 "no result received for TSIServiceGetTimeZone"
7512 )
7513 )
7514 )
7515 }
7516 }
7517}
7518
7519#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7524struct TSIServiceSetTimeZoneArgs {
7525 req: TSSetTimeZoneReq,
7526}
7527
7528impl TSIServiceSetTimeZoneArgs {
7529 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceSetTimeZoneArgs> {
7530 i_prot.read_struct_begin()?;
7531 let mut f_1: Option<TSSetTimeZoneReq> = None;
7532 loop {
7533 let field_ident = i_prot.read_field_begin()?;
7534 if field_ident.field_type == TType::Stop {
7535 break;
7536 }
7537 let field_id = field_id(&field_ident)?;
7538 match field_id {
7539 1 => {
7540 let val = TSSetTimeZoneReq::read_from_in_protocol(i_prot)?;
7541 f_1 = Some(val);
7542 },
7543 _ => {
7544 i_prot.skip(field_ident.field_type)?;
7545 },
7546 };
7547 i_prot.read_field_end()?;
7548 }
7549 i_prot.read_struct_end()?;
7550 verify_required_field_exists("TSIServiceSetTimeZoneArgs.req", &f_1)?;
7551 let ret = TSIServiceSetTimeZoneArgs {
7552 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
7553 };
7554 Ok(ret)
7555 }
7556 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7557 let struct_ident = TStructIdentifier::new("setTimeZone_args");
7558 o_prot.write_struct_begin(&struct_ident)?;
7559 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
7560 self.req.write_to_out_protocol(o_prot)?;
7561 o_prot.write_field_end()?;
7562 o_prot.write_field_stop()?;
7563 o_prot.write_struct_end()
7564 }
7565}
7566
7567#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7572struct TSIServiceSetTimeZoneResult {
7573 result_value: Option<TSStatus>,
7574}
7575
7576impl TSIServiceSetTimeZoneResult {
7577 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceSetTimeZoneResult> {
7578 i_prot.read_struct_begin()?;
7579 let mut f_0: Option<TSStatus> = None;
7580 loop {
7581 let field_ident = i_prot.read_field_begin()?;
7582 if field_ident.field_type == TType::Stop {
7583 break;
7584 }
7585 let field_id = field_id(&field_ident)?;
7586 match field_id {
7587 0 => {
7588 let val = TSStatus::read_from_in_protocol(i_prot)?;
7589 f_0 = Some(val);
7590 },
7591 _ => {
7592 i_prot.skip(field_ident.field_type)?;
7593 },
7594 };
7595 i_prot.read_field_end()?;
7596 }
7597 i_prot.read_struct_end()?;
7598 let ret = TSIServiceSetTimeZoneResult {
7599 result_value: f_0,
7600 };
7601 Ok(ret)
7602 }
7603 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7604 let struct_ident = TStructIdentifier::new("TSIServiceSetTimeZoneResult");
7605 o_prot.write_struct_begin(&struct_ident)?;
7606 if let Some(ref fld_var) = self.result_value {
7607 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
7608 fld_var.write_to_out_protocol(o_prot)?;
7609 o_prot.write_field_end()?;
7610 ()
7611 } else {
7612 ()
7613 }
7614 o_prot.write_field_stop()?;
7615 o_prot.write_struct_end()
7616 }
7617 fn ok_or(self) -> thrift::Result<TSStatus> {
7618 if self.result_value.is_some() {
7619 Ok(self.result_value.unwrap())
7620 } else {
7621 Err(
7622 thrift::Error::Application(
7623 ApplicationError::new(
7624 ApplicationErrorKind::MissingResult,
7625 "no result received for TSIServiceSetTimeZone"
7626 )
7627 )
7628 )
7629 }
7630 }
7631}
7632
7633#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7638struct TSIServiceGetPropertiesArgs {
7639}
7640
7641impl TSIServiceGetPropertiesArgs {
7642 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceGetPropertiesArgs> {
7643 i_prot.read_struct_begin()?;
7644 loop {
7645 let field_ident = i_prot.read_field_begin()?;
7646 if field_ident.field_type == TType::Stop {
7647 break;
7648 }
7649 let field_id = field_id(&field_ident)?;
7650 match field_id {
7651 _ => {
7652 i_prot.skip(field_ident.field_type)?;
7653 },
7654 };
7655 i_prot.read_field_end()?;
7656 }
7657 i_prot.read_struct_end()?;
7658 let ret = TSIServiceGetPropertiesArgs {};
7659 Ok(ret)
7660 }
7661 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7662 let struct_ident = TStructIdentifier::new("getProperties_args");
7663 o_prot.write_struct_begin(&struct_ident)?;
7664 o_prot.write_field_stop()?;
7665 o_prot.write_struct_end()
7666 }
7667}
7668
7669#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7674struct TSIServiceGetPropertiesResult {
7675 result_value: Option<ServerProperties>,
7676}
7677
7678impl TSIServiceGetPropertiesResult {
7679 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceGetPropertiesResult> {
7680 i_prot.read_struct_begin()?;
7681 let mut f_0: Option<ServerProperties> = None;
7682 loop {
7683 let field_ident = i_prot.read_field_begin()?;
7684 if field_ident.field_type == TType::Stop {
7685 break;
7686 }
7687 let field_id = field_id(&field_ident)?;
7688 match field_id {
7689 0 => {
7690 let val = ServerProperties::read_from_in_protocol(i_prot)?;
7691 f_0 = Some(val);
7692 },
7693 _ => {
7694 i_prot.skip(field_ident.field_type)?;
7695 },
7696 };
7697 i_prot.read_field_end()?;
7698 }
7699 i_prot.read_struct_end()?;
7700 let ret = TSIServiceGetPropertiesResult {
7701 result_value: f_0,
7702 };
7703 Ok(ret)
7704 }
7705 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7706 let struct_ident = TStructIdentifier::new("TSIServiceGetPropertiesResult");
7707 o_prot.write_struct_begin(&struct_ident)?;
7708 if let Some(ref fld_var) = self.result_value {
7709 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
7710 fld_var.write_to_out_protocol(o_prot)?;
7711 o_prot.write_field_end()?;
7712 ()
7713 } else {
7714 ()
7715 }
7716 o_prot.write_field_stop()?;
7717 o_prot.write_struct_end()
7718 }
7719 fn ok_or(self) -> thrift::Result<ServerProperties> {
7720 if self.result_value.is_some() {
7721 Ok(self.result_value.unwrap())
7722 } else {
7723 Err(
7724 thrift::Error::Application(
7725 ApplicationError::new(
7726 ApplicationErrorKind::MissingResult,
7727 "no result received for TSIServiceGetProperties"
7728 )
7729 )
7730 )
7731 }
7732 }
7733}
7734
7735#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7740struct TSIServiceSetStorageGroupArgs {
7741 session_id: i64,
7742 storage_group: String,
7743}
7744
7745impl TSIServiceSetStorageGroupArgs {
7746 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceSetStorageGroupArgs> {
7747 i_prot.read_struct_begin()?;
7748 let mut f_1: Option<i64> = None;
7749 let mut f_2: Option<String> = None;
7750 loop {
7751 let field_ident = i_prot.read_field_begin()?;
7752 if field_ident.field_type == TType::Stop {
7753 break;
7754 }
7755 let field_id = field_id(&field_ident)?;
7756 match field_id {
7757 1 => {
7758 let val = i_prot.read_i64()?;
7759 f_1 = Some(val);
7760 },
7761 2 => {
7762 let val = i_prot.read_string()?;
7763 f_2 = Some(val);
7764 },
7765 _ => {
7766 i_prot.skip(field_ident.field_type)?;
7767 },
7768 };
7769 i_prot.read_field_end()?;
7770 }
7771 i_prot.read_struct_end()?;
7772 verify_required_field_exists("TSIServiceSetStorageGroupArgs.session_id", &f_1)?;
7773 verify_required_field_exists("TSIServiceSetStorageGroupArgs.storage_group", &f_2)?;
7774 let ret = TSIServiceSetStorageGroupArgs {
7775 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
7776 storage_group: f_2.expect("auto-generated code should have checked for presence of required fields"),
7777 };
7778 Ok(ret)
7779 }
7780 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7781 let struct_ident = TStructIdentifier::new("setStorageGroup_args");
7782 o_prot.write_struct_begin(&struct_ident)?;
7783 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
7784 o_prot.write_i64(self.session_id)?;
7785 o_prot.write_field_end()?;
7786 o_prot.write_field_begin(&TFieldIdentifier::new("storageGroup", TType::String, 2))?;
7787 o_prot.write_string(&self.storage_group)?;
7788 o_prot.write_field_end()?;
7789 o_prot.write_field_stop()?;
7790 o_prot.write_struct_end()
7791 }
7792}
7793
7794#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7799struct TSIServiceSetStorageGroupResult {
7800 result_value: Option<TSStatus>,
7801}
7802
7803impl TSIServiceSetStorageGroupResult {
7804 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceSetStorageGroupResult> {
7805 i_prot.read_struct_begin()?;
7806 let mut f_0: Option<TSStatus> = None;
7807 loop {
7808 let field_ident = i_prot.read_field_begin()?;
7809 if field_ident.field_type == TType::Stop {
7810 break;
7811 }
7812 let field_id = field_id(&field_ident)?;
7813 match field_id {
7814 0 => {
7815 let val = TSStatus::read_from_in_protocol(i_prot)?;
7816 f_0 = Some(val);
7817 },
7818 _ => {
7819 i_prot.skip(field_ident.field_type)?;
7820 },
7821 };
7822 i_prot.read_field_end()?;
7823 }
7824 i_prot.read_struct_end()?;
7825 let ret = TSIServiceSetStorageGroupResult {
7826 result_value: f_0,
7827 };
7828 Ok(ret)
7829 }
7830 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7831 let struct_ident = TStructIdentifier::new("TSIServiceSetStorageGroupResult");
7832 o_prot.write_struct_begin(&struct_ident)?;
7833 if let Some(ref fld_var) = self.result_value {
7834 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
7835 fld_var.write_to_out_protocol(o_prot)?;
7836 o_prot.write_field_end()?;
7837 ()
7838 } else {
7839 ()
7840 }
7841 o_prot.write_field_stop()?;
7842 o_prot.write_struct_end()
7843 }
7844 fn ok_or(self) -> thrift::Result<TSStatus> {
7845 if self.result_value.is_some() {
7846 Ok(self.result_value.unwrap())
7847 } else {
7848 Err(
7849 thrift::Error::Application(
7850 ApplicationError::new(
7851 ApplicationErrorKind::MissingResult,
7852 "no result received for TSIServiceSetStorageGroup"
7853 )
7854 )
7855 )
7856 }
7857 }
7858}
7859
7860#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7865struct TSIServiceCreateTimeseriesArgs {
7866 req: TSCreateTimeseriesReq,
7867}
7868
7869impl TSIServiceCreateTimeseriesArgs {
7870 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceCreateTimeseriesArgs> {
7871 i_prot.read_struct_begin()?;
7872 let mut f_1: Option<TSCreateTimeseriesReq> = None;
7873 loop {
7874 let field_ident = i_prot.read_field_begin()?;
7875 if field_ident.field_type == TType::Stop {
7876 break;
7877 }
7878 let field_id = field_id(&field_ident)?;
7879 match field_id {
7880 1 => {
7881 let val = TSCreateTimeseriesReq::read_from_in_protocol(i_prot)?;
7882 f_1 = Some(val);
7883 },
7884 _ => {
7885 i_prot.skip(field_ident.field_type)?;
7886 },
7887 };
7888 i_prot.read_field_end()?;
7889 }
7890 i_prot.read_struct_end()?;
7891 verify_required_field_exists("TSIServiceCreateTimeseriesArgs.req", &f_1)?;
7892 let ret = TSIServiceCreateTimeseriesArgs {
7893 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
7894 };
7895 Ok(ret)
7896 }
7897 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7898 let struct_ident = TStructIdentifier::new("createTimeseries_args");
7899 o_prot.write_struct_begin(&struct_ident)?;
7900 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
7901 self.req.write_to_out_protocol(o_prot)?;
7902 o_prot.write_field_end()?;
7903 o_prot.write_field_stop()?;
7904 o_prot.write_struct_end()
7905 }
7906}
7907
7908#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7913struct TSIServiceCreateTimeseriesResult {
7914 result_value: Option<TSStatus>,
7915}
7916
7917impl TSIServiceCreateTimeseriesResult {
7918 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceCreateTimeseriesResult> {
7919 i_prot.read_struct_begin()?;
7920 let mut f_0: Option<TSStatus> = None;
7921 loop {
7922 let field_ident = i_prot.read_field_begin()?;
7923 if field_ident.field_type == TType::Stop {
7924 break;
7925 }
7926 let field_id = field_id(&field_ident)?;
7927 match field_id {
7928 0 => {
7929 let val = TSStatus::read_from_in_protocol(i_prot)?;
7930 f_0 = Some(val);
7931 },
7932 _ => {
7933 i_prot.skip(field_ident.field_type)?;
7934 },
7935 };
7936 i_prot.read_field_end()?;
7937 }
7938 i_prot.read_struct_end()?;
7939 let ret = TSIServiceCreateTimeseriesResult {
7940 result_value: f_0,
7941 };
7942 Ok(ret)
7943 }
7944 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
7945 let struct_ident = TStructIdentifier::new("TSIServiceCreateTimeseriesResult");
7946 o_prot.write_struct_begin(&struct_ident)?;
7947 if let Some(ref fld_var) = self.result_value {
7948 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
7949 fld_var.write_to_out_protocol(o_prot)?;
7950 o_prot.write_field_end()?;
7951 ()
7952 } else {
7953 ()
7954 }
7955 o_prot.write_field_stop()?;
7956 o_prot.write_struct_end()
7957 }
7958 fn ok_or(self) -> thrift::Result<TSStatus> {
7959 if self.result_value.is_some() {
7960 Ok(self.result_value.unwrap())
7961 } else {
7962 Err(
7963 thrift::Error::Application(
7964 ApplicationError::new(
7965 ApplicationErrorKind::MissingResult,
7966 "no result received for TSIServiceCreateTimeseries"
7967 )
7968 )
7969 )
7970 }
7971 }
7972}
7973
7974#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7979struct TSIServiceCreateMultiTimeseriesArgs {
7980 req: TSCreateMultiTimeseriesReq,
7981}
7982
7983impl TSIServiceCreateMultiTimeseriesArgs {
7984 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceCreateMultiTimeseriesArgs> {
7985 i_prot.read_struct_begin()?;
7986 let mut f_1: Option<TSCreateMultiTimeseriesReq> = None;
7987 loop {
7988 let field_ident = i_prot.read_field_begin()?;
7989 if field_ident.field_type == TType::Stop {
7990 break;
7991 }
7992 let field_id = field_id(&field_ident)?;
7993 match field_id {
7994 1 => {
7995 let val = TSCreateMultiTimeseriesReq::read_from_in_protocol(i_prot)?;
7996 f_1 = Some(val);
7997 },
7998 _ => {
7999 i_prot.skip(field_ident.field_type)?;
8000 },
8001 };
8002 i_prot.read_field_end()?;
8003 }
8004 i_prot.read_struct_end()?;
8005 verify_required_field_exists("TSIServiceCreateMultiTimeseriesArgs.req", &f_1)?;
8006 let ret = TSIServiceCreateMultiTimeseriesArgs {
8007 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
8008 };
8009 Ok(ret)
8010 }
8011 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8012 let struct_ident = TStructIdentifier::new("createMultiTimeseries_args");
8013 o_prot.write_struct_begin(&struct_ident)?;
8014 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
8015 self.req.write_to_out_protocol(o_prot)?;
8016 o_prot.write_field_end()?;
8017 o_prot.write_field_stop()?;
8018 o_prot.write_struct_end()
8019 }
8020}
8021
8022#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8027struct TSIServiceCreateMultiTimeseriesResult {
8028 result_value: Option<TSStatus>,
8029}
8030
8031impl TSIServiceCreateMultiTimeseriesResult {
8032 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceCreateMultiTimeseriesResult> {
8033 i_prot.read_struct_begin()?;
8034 let mut f_0: Option<TSStatus> = None;
8035 loop {
8036 let field_ident = i_prot.read_field_begin()?;
8037 if field_ident.field_type == TType::Stop {
8038 break;
8039 }
8040 let field_id = field_id(&field_ident)?;
8041 match field_id {
8042 0 => {
8043 let val = TSStatus::read_from_in_protocol(i_prot)?;
8044 f_0 = Some(val);
8045 },
8046 _ => {
8047 i_prot.skip(field_ident.field_type)?;
8048 },
8049 };
8050 i_prot.read_field_end()?;
8051 }
8052 i_prot.read_struct_end()?;
8053 let ret = TSIServiceCreateMultiTimeseriesResult {
8054 result_value: f_0,
8055 };
8056 Ok(ret)
8057 }
8058 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8059 let struct_ident = TStructIdentifier::new("TSIServiceCreateMultiTimeseriesResult");
8060 o_prot.write_struct_begin(&struct_ident)?;
8061 if let Some(ref fld_var) = self.result_value {
8062 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
8063 fld_var.write_to_out_protocol(o_prot)?;
8064 o_prot.write_field_end()?;
8065 ()
8066 } else {
8067 ()
8068 }
8069 o_prot.write_field_stop()?;
8070 o_prot.write_struct_end()
8071 }
8072 fn ok_or(self) -> thrift::Result<TSStatus> {
8073 if self.result_value.is_some() {
8074 Ok(self.result_value.unwrap())
8075 } else {
8076 Err(
8077 thrift::Error::Application(
8078 ApplicationError::new(
8079 ApplicationErrorKind::MissingResult,
8080 "no result received for TSIServiceCreateMultiTimeseries"
8081 )
8082 )
8083 )
8084 }
8085 }
8086}
8087
8088#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8093struct TSIServiceDeleteTimeseriesArgs {
8094 session_id: i64,
8095 path: Vec<String>,
8096}
8097
8098impl TSIServiceDeleteTimeseriesArgs {
8099 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceDeleteTimeseriesArgs> {
8100 i_prot.read_struct_begin()?;
8101 let mut f_1: Option<i64> = None;
8102 let mut f_2: Option<Vec<String>> = None;
8103 loop {
8104 let field_ident = i_prot.read_field_begin()?;
8105 if field_ident.field_type == TType::Stop {
8106 break;
8107 }
8108 let field_id = field_id(&field_ident)?;
8109 match field_id {
8110 1 => {
8111 let val = i_prot.read_i64()?;
8112 f_1 = Some(val);
8113 },
8114 2 => {
8115 let list_ident = i_prot.read_list_begin()?;
8116 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
8117 for _ in 0..list_ident.size {
8118 let list_elem_66 = i_prot.read_string()?;
8119 val.push(list_elem_66);
8120 }
8121 i_prot.read_list_end()?;
8122 f_2 = Some(val);
8123 },
8124 _ => {
8125 i_prot.skip(field_ident.field_type)?;
8126 },
8127 };
8128 i_prot.read_field_end()?;
8129 }
8130 i_prot.read_struct_end()?;
8131 verify_required_field_exists("TSIServiceDeleteTimeseriesArgs.session_id", &f_1)?;
8132 verify_required_field_exists("TSIServiceDeleteTimeseriesArgs.path", &f_2)?;
8133 let ret = TSIServiceDeleteTimeseriesArgs {
8134 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
8135 path: f_2.expect("auto-generated code should have checked for presence of required fields"),
8136 };
8137 Ok(ret)
8138 }
8139 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8140 let struct_ident = TStructIdentifier::new("deleteTimeseries_args");
8141 o_prot.write_struct_begin(&struct_ident)?;
8142 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
8143 o_prot.write_i64(self.session_id)?;
8144 o_prot.write_field_end()?;
8145 o_prot.write_field_begin(&TFieldIdentifier::new("path", TType::List, 2))?;
8146 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.path.len() as i32))?;
8147 for e in &self.path {
8148 o_prot.write_string(e)?;
8149 o_prot.write_list_end()?;
8150 }
8151 o_prot.write_field_end()?;
8152 o_prot.write_field_stop()?;
8153 o_prot.write_struct_end()
8154 }
8155}
8156
8157#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8162struct TSIServiceDeleteTimeseriesResult {
8163 result_value: Option<TSStatus>,
8164}
8165
8166impl TSIServiceDeleteTimeseriesResult {
8167 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceDeleteTimeseriesResult> {
8168 i_prot.read_struct_begin()?;
8169 let mut f_0: Option<TSStatus> = None;
8170 loop {
8171 let field_ident = i_prot.read_field_begin()?;
8172 if field_ident.field_type == TType::Stop {
8173 break;
8174 }
8175 let field_id = field_id(&field_ident)?;
8176 match field_id {
8177 0 => {
8178 let val = TSStatus::read_from_in_protocol(i_prot)?;
8179 f_0 = Some(val);
8180 },
8181 _ => {
8182 i_prot.skip(field_ident.field_type)?;
8183 },
8184 };
8185 i_prot.read_field_end()?;
8186 }
8187 i_prot.read_struct_end()?;
8188 let ret = TSIServiceDeleteTimeseriesResult {
8189 result_value: f_0,
8190 };
8191 Ok(ret)
8192 }
8193 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8194 let struct_ident = TStructIdentifier::new("TSIServiceDeleteTimeseriesResult");
8195 o_prot.write_struct_begin(&struct_ident)?;
8196 if let Some(ref fld_var) = self.result_value {
8197 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
8198 fld_var.write_to_out_protocol(o_prot)?;
8199 o_prot.write_field_end()?;
8200 ()
8201 } else {
8202 ()
8203 }
8204 o_prot.write_field_stop()?;
8205 o_prot.write_struct_end()
8206 }
8207 fn ok_or(self) -> thrift::Result<TSStatus> {
8208 if self.result_value.is_some() {
8209 Ok(self.result_value.unwrap())
8210 } else {
8211 Err(
8212 thrift::Error::Application(
8213 ApplicationError::new(
8214 ApplicationErrorKind::MissingResult,
8215 "no result received for TSIServiceDeleteTimeseries"
8216 )
8217 )
8218 )
8219 }
8220 }
8221}
8222
8223#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8228struct TSIServiceDeleteStorageGroupsArgs {
8229 session_id: i64,
8230 storage_group: Vec<String>,
8231}
8232
8233impl TSIServiceDeleteStorageGroupsArgs {
8234 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceDeleteStorageGroupsArgs> {
8235 i_prot.read_struct_begin()?;
8236 let mut f_1: Option<i64> = None;
8237 let mut f_2: Option<Vec<String>> = None;
8238 loop {
8239 let field_ident = i_prot.read_field_begin()?;
8240 if field_ident.field_type == TType::Stop {
8241 break;
8242 }
8243 let field_id = field_id(&field_ident)?;
8244 match field_id {
8245 1 => {
8246 let val = i_prot.read_i64()?;
8247 f_1 = Some(val);
8248 },
8249 2 => {
8250 let list_ident = i_prot.read_list_begin()?;
8251 let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
8252 for _ in 0..list_ident.size {
8253 let list_elem_67 = i_prot.read_string()?;
8254 val.push(list_elem_67);
8255 }
8256 i_prot.read_list_end()?;
8257 f_2 = Some(val);
8258 },
8259 _ => {
8260 i_prot.skip(field_ident.field_type)?;
8261 },
8262 };
8263 i_prot.read_field_end()?;
8264 }
8265 i_prot.read_struct_end()?;
8266 verify_required_field_exists("TSIServiceDeleteStorageGroupsArgs.session_id", &f_1)?;
8267 verify_required_field_exists("TSIServiceDeleteStorageGroupsArgs.storage_group", &f_2)?;
8268 let ret = TSIServiceDeleteStorageGroupsArgs {
8269 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
8270 storage_group: f_2.expect("auto-generated code should have checked for presence of required fields"),
8271 };
8272 Ok(ret)
8273 }
8274 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8275 let struct_ident = TStructIdentifier::new("deleteStorageGroups_args");
8276 o_prot.write_struct_begin(&struct_ident)?;
8277 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
8278 o_prot.write_i64(self.session_id)?;
8279 o_prot.write_field_end()?;
8280 o_prot.write_field_begin(&TFieldIdentifier::new("storageGroup", TType::List, 2))?;
8281 o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.storage_group.len() as i32))?;
8282 for e in &self.storage_group {
8283 o_prot.write_string(e)?;
8284 o_prot.write_list_end()?;
8285 }
8286 o_prot.write_field_end()?;
8287 o_prot.write_field_stop()?;
8288 o_prot.write_struct_end()
8289 }
8290}
8291
8292#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8297struct TSIServiceDeleteStorageGroupsResult {
8298 result_value: Option<TSStatus>,
8299}
8300
8301impl TSIServiceDeleteStorageGroupsResult {
8302 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceDeleteStorageGroupsResult> {
8303 i_prot.read_struct_begin()?;
8304 let mut f_0: Option<TSStatus> = None;
8305 loop {
8306 let field_ident = i_prot.read_field_begin()?;
8307 if field_ident.field_type == TType::Stop {
8308 break;
8309 }
8310 let field_id = field_id(&field_ident)?;
8311 match field_id {
8312 0 => {
8313 let val = TSStatus::read_from_in_protocol(i_prot)?;
8314 f_0 = Some(val);
8315 },
8316 _ => {
8317 i_prot.skip(field_ident.field_type)?;
8318 },
8319 };
8320 i_prot.read_field_end()?;
8321 }
8322 i_prot.read_struct_end()?;
8323 let ret = TSIServiceDeleteStorageGroupsResult {
8324 result_value: f_0,
8325 };
8326 Ok(ret)
8327 }
8328 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8329 let struct_ident = TStructIdentifier::new("TSIServiceDeleteStorageGroupsResult");
8330 o_prot.write_struct_begin(&struct_ident)?;
8331 if let Some(ref fld_var) = self.result_value {
8332 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
8333 fld_var.write_to_out_protocol(o_prot)?;
8334 o_prot.write_field_end()?;
8335 ()
8336 } else {
8337 ()
8338 }
8339 o_prot.write_field_stop()?;
8340 o_prot.write_struct_end()
8341 }
8342 fn ok_or(self) -> thrift::Result<TSStatus> {
8343 if self.result_value.is_some() {
8344 Ok(self.result_value.unwrap())
8345 } else {
8346 Err(
8347 thrift::Error::Application(
8348 ApplicationError::new(
8349 ApplicationErrorKind::MissingResult,
8350 "no result received for TSIServiceDeleteStorageGroups"
8351 )
8352 )
8353 )
8354 }
8355 }
8356}
8357
8358#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8363struct TSIServiceInsertRecordArgs {
8364 req: TSInsertRecordReq,
8365}
8366
8367impl TSIServiceInsertRecordArgs {
8368 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertRecordArgs> {
8369 i_prot.read_struct_begin()?;
8370 let mut f_1: Option<TSInsertRecordReq> = None;
8371 loop {
8372 let field_ident = i_prot.read_field_begin()?;
8373 if field_ident.field_type == TType::Stop {
8374 break;
8375 }
8376 let field_id = field_id(&field_ident)?;
8377 match field_id {
8378 1 => {
8379 let val = TSInsertRecordReq::read_from_in_protocol(i_prot)?;
8380 f_1 = Some(val);
8381 },
8382 _ => {
8383 i_prot.skip(field_ident.field_type)?;
8384 },
8385 };
8386 i_prot.read_field_end()?;
8387 }
8388 i_prot.read_struct_end()?;
8389 verify_required_field_exists("TSIServiceInsertRecordArgs.req", &f_1)?;
8390 let ret = TSIServiceInsertRecordArgs {
8391 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
8392 };
8393 Ok(ret)
8394 }
8395 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8396 let struct_ident = TStructIdentifier::new("insertRecord_args");
8397 o_prot.write_struct_begin(&struct_ident)?;
8398 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
8399 self.req.write_to_out_protocol(o_prot)?;
8400 o_prot.write_field_end()?;
8401 o_prot.write_field_stop()?;
8402 o_prot.write_struct_end()
8403 }
8404}
8405
8406#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8411struct TSIServiceInsertRecordResult {
8412 result_value: Option<TSStatus>,
8413}
8414
8415impl TSIServiceInsertRecordResult {
8416 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertRecordResult> {
8417 i_prot.read_struct_begin()?;
8418 let mut f_0: Option<TSStatus> = None;
8419 loop {
8420 let field_ident = i_prot.read_field_begin()?;
8421 if field_ident.field_type == TType::Stop {
8422 break;
8423 }
8424 let field_id = field_id(&field_ident)?;
8425 match field_id {
8426 0 => {
8427 let val = TSStatus::read_from_in_protocol(i_prot)?;
8428 f_0 = Some(val);
8429 },
8430 _ => {
8431 i_prot.skip(field_ident.field_type)?;
8432 },
8433 };
8434 i_prot.read_field_end()?;
8435 }
8436 i_prot.read_struct_end()?;
8437 let ret = TSIServiceInsertRecordResult {
8438 result_value: f_0,
8439 };
8440 Ok(ret)
8441 }
8442 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8443 let struct_ident = TStructIdentifier::new("TSIServiceInsertRecordResult");
8444 o_prot.write_struct_begin(&struct_ident)?;
8445 if let Some(ref fld_var) = self.result_value {
8446 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
8447 fld_var.write_to_out_protocol(o_prot)?;
8448 o_prot.write_field_end()?;
8449 ()
8450 } else {
8451 ()
8452 }
8453 o_prot.write_field_stop()?;
8454 o_prot.write_struct_end()
8455 }
8456 fn ok_or(self) -> thrift::Result<TSStatus> {
8457 if self.result_value.is_some() {
8458 Ok(self.result_value.unwrap())
8459 } else {
8460 Err(
8461 thrift::Error::Application(
8462 ApplicationError::new(
8463 ApplicationErrorKind::MissingResult,
8464 "no result received for TSIServiceInsertRecord"
8465 )
8466 )
8467 )
8468 }
8469 }
8470}
8471
8472#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8477struct TSIServiceInsertStringRecordArgs {
8478 req: TSInsertStringRecordReq,
8479}
8480
8481impl TSIServiceInsertStringRecordArgs {
8482 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertStringRecordArgs> {
8483 i_prot.read_struct_begin()?;
8484 let mut f_1: Option<TSInsertStringRecordReq> = None;
8485 loop {
8486 let field_ident = i_prot.read_field_begin()?;
8487 if field_ident.field_type == TType::Stop {
8488 break;
8489 }
8490 let field_id = field_id(&field_ident)?;
8491 match field_id {
8492 1 => {
8493 let val = TSInsertStringRecordReq::read_from_in_protocol(i_prot)?;
8494 f_1 = Some(val);
8495 },
8496 _ => {
8497 i_prot.skip(field_ident.field_type)?;
8498 },
8499 };
8500 i_prot.read_field_end()?;
8501 }
8502 i_prot.read_struct_end()?;
8503 verify_required_field_exists("TSIServiceInsertStringRecordArgs.req", &f_1)?;
8504 let ret = TSIServiceInsertStringRecordArgs {
8505 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
8506 };
8507 Ok(ret)
8508 }
8509 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8510 let struct_ident = TStructIdentifier::new("insertStringRecord_args");
8511 o_prot.write_struct_begin(&struct_ident)?;
8512 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
8513 self.req.write_to_out_protocol(o_prot)?;
8514 o_prot.write_field_end()?;
8515 o_prot.write_field_stop()?;
8516 o_prot.write_struct_end()
8517 }
8518}
8519
8520#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8525struct TSIServiceInsertStringRecordResult {
8526 result_value: Option<TSStatus>,
8527}
8528
8529impl TSIServiceInsertStringRecordResult {
8530 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertStringRecordResult> {
8531 i_prot.read_struct_begin()?;
8532 let mut f_0: Option<TSStatus> = None;
8533 loop {
8534 let field_ident = i_prot.read_field_begin()?;
8535 if field_ident.field_type == TType::Stop {
8536 break;
8537 }
8538 let field_id = field_id(&field_ident)?;
8539 match field_id {
8540 0 => {
8541 let val = TSStatus::read_from_in_protocol(i_prot)?;
8542 f_0 = Some(val);
8543 },
8544 _ => {
8545 i_prot.skip(field_ident.field_type)?;
8546 },
8547 };
8548 i_prot.read_field_end()?;
8549 }
8550 i_prot.read_struct_end()?;
8551 let ret = TSIServiceInsertStringRecordResult {
8552 result_value: f_0,
8553 };
8554 Ok(ret)
8555 }
8556 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8557 let struct_ident = TStructIdentifier::new("TSIServiceInsertStringRecordResult");
8558 o_prot.write_struct_begin(&struct_ident)?;
8559 if let Some(ref fld_var) = self.result_value {
8560 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
8561 fld_var.write_to_out_protocol(o_prot)?;
8562 o_prot.write_field_end()?;
8563 ()
8564 } else {
8565 ()
8566 }
8567 o_prot.write_field_stop()?;
8568 o_prot.write_struct_end()
8569 }
8570 fn ok_or(self) -> thrift::Result<TSStatus> {
8571 if self.result_value.is_some() {
8572 Ok(self.result_value.unwrap())
8573 } else {
8574 Err(
8575 thrift::Error::Application(
8576 ApplicationError::new(
8577 ApplicationErrorKind::MissingResult,
8578 "no result received for TSIServiceInsertStringRecord"
8579 )
8580 )
8581 )
8582 }
8583 }
8584}
8585
8586#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8591struct TSIServiceInsertTabletArgs {
8592 req: TSInsertTabletReq,
8593}
8594
8595impl TSIServiceInsertTabletArgs {
8596 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertTabletArgs> {
8597 i_prot.read_struct_begin()?;
8598 let mut f_1: Option<TSInsertTabletReq> = None;
8599 loop {
8600 let field_ident = i_prot.read_field_begin()?;
8601 if field_ident.field_type == TType::Stop {
8602 break;
8603 }
8604 let field_id = field_id(&field_ident)?;
8605 match field_id {
8606 1 => {
8607 let val = TSInsertTabletReq::read_from_in_protocol(i_prot)?;
8608 f_1 = Some(val);
8609 },
8610 _ => {
8611 i_prot.skip(field_ident.field_type)?;
8612 },
8613 };
8614 i_prot.read_field_end()?;
8615 }
8616 i_prot.read_struct_end()?;
8617 verify_required_field_exists("TSIServiceInsertTabletArgs.req", &f_1)?;
8618 let ret = TSIServiceInsertTabletArgs {
8619 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
8620 };
8621 Ok(ret)
8622 }
8623 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8624 let struct_ident = TStructIdentifier::new("insertTablet_args");
8625 o_prot.write_struct_begin(&struct_ident)?;
8626 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
8627 self.req.write_to_out_protocol(o_prot)?;
8628 o_prot.write_field_end()?;
8629 o_prot.write_field_stop()?;
8630 o_prot.write_struct_end()
8631 }
8632}
8633
8634#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8639struct TSIServiceInsertTabletResult {
8640 result_value: Option<TSStatus>,
8641}
8642
8643impl TSIServiceInsertTabletResult {
8644 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertTabletResult> {
8645 i_prot.read_struct_begin()?;
8646 let mut f_0: Option<TSStatus> = None;
8647 loop {
8648 let field_ident = i_prot.read_field_begin()?;
8649 if field_ident.field_type == TType::Stop {
8650 break;
8651 }
8652 let field_id = field_id(&field_ident)?;
8653 match field_id {
8654 0 => {
8655 let val = TSStatus::read_from_in_protocol(i_prot)?;
8656 f_0 = Some(val);
8657 },
8658 _ => {
8659 i_prot.skip(field_ident.field_type)?;
8660 },
8661 };
8662 i_prot.read_field_end()?;
8663 }
8664 i_prot.read_struct_end()?;
8665 let ret = TSIServiceInsertTabletResult {
8666 result_value: f_0,
8667 };
8668 Ok(ret)
8669 }
8670 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8671 let struct_ident = TStructIdentifier::new("TSIServiceInsertTabletResult");
8672 o_prot.write_struct_begin(&struct_ident)?;
8673 if let Some(ref fld_var) = self.result_value {
8674 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
8675 fld_var.write_to_out_protocol(o_prot)?;
8676 o_prot.write_field_end()?;
8677 ()
8678 } else {
8679 ()
8680 }
8681 o_prot.write_field_stop()?;
8682 o_prot.write_struct_end()
8683 }
8684 fn ok_or(self) -> thrift::Result<TSStatus> {
8685 if self.result_value.is_some() {
8686 Ok(self.result_value.unwrap())
8687 } else {
8688 Err(
8689 thrift::Error::Application(
8690 ApplicationError::new(
8691 ApplicationErrorKind::MissingResult,
8692 "no result received for TSIServiceInsertTablet"
8693 )
8694 )
8695 )
8696 }
8697 }
8698}
8699
8700#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8705struct TSIServiceInsertTabletsArgs {
8706 req: TSInsertTabletsReq,
8707}
8708
8709impl TSIServiceInsertTabletsArgs {
8710 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertTabletsArgs> {
8711 i_prot.read_struct_begin()?;
8712 let mut f_1: Option<TSInsertTabletsReq> = None;
8713 loop {
8714 let field_ident = i_prot.read_field_begin()?;
8715 if field_ident.field_type == TType::Stop {
8716 break;
8717 }
8718 let field_id = field_id(&field_ident)?;
8719 match field_id {
8720 1 => {
8721 let val = TSInsertTabletsReq::read_from_in_protocol(i_prot)?;
8722 f_1 = Some(val);
8723 },
8724 _ => {
8725 i_prot.skip(field_ident.field_type)?;
8726 },
8727 };
8728 i_prot.read_field_end()?;
8729 }
8730 i_prot.read_struct_end()?;
8731 verify_required_field_exists("TSIServiceInsertTabletsArgs.req", &f_1)?;
8732 let ret = TSIServiceInsertTabletsArgs {
8733 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
8734 };
8735 Ok(ret)
8736 }
8737 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8738 let struct_ident = TStructIdentifier::new("insertTablets_args");
8739 o_prot.write_struct_begin(&struct_ident)?;
8740 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
8741 self.req.write_to_out_protocol(o_prot)?;
8742 o_prot.write_field_end()?;
8743 o_prot.write_field_stop()?;
8744 o_prot.write_struct_end()
8745 }
8746}
8747
8748#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8753struct TSIServiceInsertTabletsResult {
8754 result_value: Option<TSStatus>,
8755}
8756
8757impl TSIServiceInsertTabletsResult {
8758 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertTabletsResult> {
8759 i_prot.read_struct_begin()?;
8760 let mut f_0: Option<TSStatus> = None;
8761 loop {
8762 let field_ident = i_prot.read_field_begin()?;
8763 if field_ident.field_type == TType::Stop {
8764 break;
8765 }
8766 let field_id = field_id(&field_ident)?;
8767 match field_id {
8768 0 => {
8769 let val = TSStatus::read_from_in_protocol(i_prot)?;
8770 f_0 = Some(val);
8771 },
8772 _ => {
8773 i_prot.skip(field_ident.field_type)?;
8774 },
8775 };
8776 i_prot.read_field_end()?;
8777 }
8778 i_prot.read_struct_end()?;
8779 let ret = TSIServiceInsertTabletsResult {
8780 result_value: f_0,
8781 };
8782 Ok(ret)
8783 }
8784 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8785 let struct_ident = TStructIdentifier::new("TSIServiceInsertTabletsResult");
8786 o_prot.write_struct_begin(&struct_ident)?;
8787 if let Some(ref fld_var) = self.result_value {
8788 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
8789 fld_var.write_to_out_protocol(o_prot)?;
8790 o_prot.write_field_end()?;
8791 ()
8792 } else {
8793 ()
8794 }
8795 o_prot.write_field_stop()?;
8796 o_prot.write_struct_end()
8797 }
8798 fn ok_or(self) -> thrift::Result<TSStatus> {
8799 if self.result_value.is_some() {
8800 Ok(self.result_value.unwrap())
8801 } else {
8802 Err(
8803 thrift::Error::Application(
8804 ApplicationError::new(
8805 ApplicationErrorKind::MissingResult,
8806 "no result received for TSIServiceInsertTablets"
8807 )
8808 )
8809 )
8810 }
8811 }
8812}
8813
8814#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8819struct TSIServiceInsertRecordsArgs {
8820 req: TSInsertRecordsReq,
8821}
8822
8823impl TSIServiceInsertRecordsArgs {
8824 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertRecordsArgs> {
8825 i_prot.read_struct_begin()?;
8826 let mut f_1: Option<TSInsertRecordsReq> = None;
8827 loop {
8828 let field_ident = i_prot.read_field_begin()?;
8829 if field_ident.field_type == TType::Stop {
8830 break;
8831 }
8832 let field_id = field_id(&field_ident)?;
8833 match field_id {
8834 1 => {
8835 let val = TSInsertRecordsReq::read_from_in_protocol(i_prot)?;
8836 f_1 = Some(val);
8837 },
8838 _ => {
8839 i_prot.skip(field_ident.field_type)?;
8840 },
8841 };
8842 i_prot.read_field_end()?;
8843 }
8844 i_prot.read_struct_end()?;
8845 verify_required_field_exists("TSIServiceInsertRecordsArgs.req", &f_1)?;
8846 let ret = TSIServiceInsertRecordsArgs {
8847 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
8848 };
8849 Ok(ret)
8850 }
8851 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8852 let struct_ident = TStructIdentifier::new("insertRecords_args");
8853 o_prot.write_struct_begin(&struct_ident)?;
8854 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
8855 self.req.write_to_out_protocol(o_prot)?;
8856 o_prot.write_field_end()?;
8857 o_prot.write_field_stop()?;
8858 o_prot.write_struct_end()
8859 }
8860}
8861
8862#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8867struct TSIServiceInsertRecordsResult {
8868 result_value: Option<TSStatus>,
8869}
8870
8871impl TSIServiceInsertRecordsResult {
8872 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertRecordsResult> {
8873 i_prot.read_struct_begin()?;
8874 let mut f_0: Option<TSStatus> = None;
8875 loop {
8876 let field_ident = i_prot.read_field_begin()?;
8877 if field_ident.field_type == TType::Stop {
8878 break;
8879 }
8880 let field_id = field_id(&field_ident)?;
8881 match field_id {
8882 0 => {
8883 let val = TSStatus::read_from_in_protocol(i_prot)?;
8884 f_0 = Some(val);
8885 },
8886 _ => {
8887 i_prot.skip(field_ident.field_type)?;
8888 },
8889 };
8890 i_prot.read_field_end()?;
8891 }
8892 i_prot.read_struct_end()?;
8893 let ret = TSIServiceInsertRecordsResult {
8894 result_value: f_0,
8895 };
8896 Ok(ret)
8897 }
8898 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8899 let struct_ident = TStructIdentifier::new("TSIServiceInsertRecordsResult");
8900 o_prot.write_struct_begin(&struct_ident)?;
8901 if let Some(ref fld_var) = self.result_value {
8902 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
8903 fld_var.write_to_out_protocol(o_prot)?;
8904 o_prot.write_field_end()?;
8905 ()
8906 } else {
8907 ()
8908 }
8909 o_prot.write_field_stop()?;
8910 o_prot.write_struct_end()
8911 }
8912 fn ok_or(self) -> thrift::Result<TSStatus> {
8913 if self.result_value.is_some() {
8914 Ok(self.result_value.unwrap())
8915 } else {
8916 Err(
8917 thrift::Error::Application(
8918 ApplicationError::new(
8919 ApplicationErrorKind::MissingResult,
8920 "no result received for TSIServiceInsertRecords"
8921 )
8922 )
8923 )
8924 }
8925 }
8926}
8927
8928#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8933struct TSIServiceInsertRecordsOfOneDeviceArgs {
8934 req: TSInsertRecordsOfOneDeviceReq,
8935}
8936
8937impl TSIServiceInsertRecordsOfOneDeviceArgs {
8938 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertRecordsOfOneDeviceArgs> {
8939 i_prot.read_struct_begin()?;
8940 let mut f_1: Option<TSInsertRecordsOfOneDeviceReq> = None;
8941 loop {
8942 let field_ident = i_prot.read_field_begin()?;
8943 if field_ident.field_type == TType::Stop {
8944 break;
8945 }
8946 let field_id = field_id(&field_ident)?;
8947 match field_id {
8948 1 => {
8949 let val = TSInsertRecordsOfOneDeviceReq::read_from_in_protocol(i_prot)?;
8950 f_1 = Some(val);
8951 },
8952 _ => {
8953 i_prot.skip(field_ident.field_type)?;
8954 },
8955 };
8956 i_prot.read_field_end()?;
8957 }
8958 i_prot.read_struct_end()?;
8959 verify_required_field_exists("TSIServiceInsertRecordsOfOneDeviceArgs.req", &f_1)?;
8960 let ret = TSIServiceInsertRecordsOfOneDeviceArgs {
8961 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
8962 };
8963 Ok(ret)
8964 }
8965 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
8966 let struct_ident = TStructIdentifier::new("insertRecordsOfOneDevice_args");
8967 o_prot.write_struct_begin(&struct_ident)?;
8968 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
8969 self.req.write_to_out_protocol(o_prot)?;
8970 o_prot.write_field_end()?;
8971 o_prot.write_field_stop()?;
8972 o_prot.write_struct_end()
8973 }
8974}
8975
8976#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8981struct TSIServiceInsertRecordsOfOneDeviceResult {
8982 result_value: Option<TSStatus>,
8983}
8984
8985impl TSIServiceInsertRecordsOfOneDeviceResult {
8986 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertRecordsOfOneDeviceResult> {
8987 i_prot.read_struct_begin()?;
8988 let mut f_0: Option<TSStatus> = None;
8989 loop {
8990 let field_ident = i_prot.read_field_begin()?;
8991 if field_ident.field_type == TType::Stop {
8992 break;
8993 }
8994 let field_id = field_id(&field_ident)?;
8995 match field_id {
8996 0 => {
8997 let val = TSStatus::read_from_in_protocol(i_prot)?;
8998 f_0 = Some(val);
8999 },
9000 _ => {
9001 i_prot.skip(field_ident.field_type)?;
9002 },
9003 };
9004 i_prot.read_field_end()?;
9005 }
9006 i_prot.read_struct_end()?;
9007 let ret = TSIServiceInsertRecordsOfOneDeviceResult {
9008 result_value: f_0,
9009 };
9010 Ok(ret)
9011 }
9012 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9013 let struct_ident = TStructIdentifier::new("TSIServiceInsertRecordsOfOneDeviceResult");
9014 o_prot.write_struct_begin(&struct_ident)?;
9015 if let Some(ref fld_var) = self.result_value {
9016 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9017 fld_var.write_to_out_protocol(o_prot)?;
9018 o_prot.write_field_end()?;
9019 ()
9020 } else {
9021 ()
9022 }
9023 o_prot.write_field_stop()?;
9024 o_prot.write_struct_end()
9025 }
9026 fn ok_or(self) -> thrift::Result<TSStatus> {
9027 if self.result_value.is_some() {
9028 Ok(self.result_value.unwrap())
9029 } else {
9030 Err(
9031 thrift::Error::Application(
9032 ApplicationError::new(
9033 ApplicationErrorKind::MissingResult,
9034 "no result received for TSIServiceInsertRecordsOfOneDevice"
9035 )
9036 )
9037 )
9038 }
9039 }
9040}
9041
9042#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9047struct TSIServiceInsertStringRecordsArgs {
9048 req: TSInsertStringRecordsReq,
9049}
9050
9051impl TSIServiceInsertStringRecordsArgs {
9052 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertStringRecordsArgs> {
9053 i_prot.read_struct_begin()?;
9054 let mut f_1: Option<TSInsertStringRecordsReq> = None;
9055 loop {
9056 let field_ident = i_prot.read_field_begin()?;
9057 if field_ident.field_type == TType::Stop {
9058 break;
9059 }
9060 let field_id = field_id(&field_ident)?;
9061 match field_id {
9062 1 => {
9063 let val = TSInsertStringRecordsReq::read_from_in_protocol(i_prot)?;
9064 f_1 = Some(val);
9065 },
9066 _ => {
9067 i_prot.skip(field_ident.field_type)?;
9068 },
9069 };
9070 i_prot.read_field_end()?;
9071 }
9072 i_prot.read_struct_end()?;
9073 verify_required_field_exists("TSIServiceInsertStringRecordsArgs.req", &f_1)?;
9074 let ret = TSIServiceInsertStringRecordsArgs {
9075 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9076 };
9077 Ok(ret)
9078 }
9079 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9080 let struct_ident = TStructIdentifier::new("insertStringRecords_args");
9081 o_prot.write_struct_begin(&struct_ident)?;
9082 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9083 self.req.write_to_out_protocol(o_prot)?;
9084 o_prot.write_field_end()?;
9085 o_prot.write_field_stop()?;
9086 o_prot.write_struct_end()
9087 }
9088}
9089
9090#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9095struct TSIServiceInsertStringRecordsResult {
9096 result_value: Option<TSStatus>,
9097}
9098
9099impl TSIServiceInsertStringRecordsResult {
9100 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceInsertStringRecordsResult> {
9101 i_prot.read_struct_begin()?;
9102 let mut f_0: Option<TSStatus> = None;
9103 loop {
9104 let field_ident = i_prot.read_field_begin()?;
9105 if field_ident.field_type == TType::Stop {
9106 break;
9107 }
9108 let field_id = field_id(&field_ident)?;
9109 match field_id {
9110 0 => {
9111 let val = TSStatus::read_from_in_protocol(i_prot)?;
9112 f_0 = Some(val);
9113 },
9114 _ => {
9115 i_prot.skip(field_ident.field_type)?;
9116 },
9117 };
9118 i_prot.read_field_end()?;
9119 }
9120 i_prot.read_struct_end()?;
9121 let ret = TSIServiceInsertStringRecordsResult {
9122 result_value: f_0,
9123 };
9124 Ok(ret)
9125 }
9126 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9127 let struct_ident = TStructIdentifier::new("TSIServiceInsertStringRecordsResult");
9128 o_prot.write_struct_begin(&struct_ident)?;
9129 if let Some(ref fld_var) = self.result_value {
9130 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9131 fld_var.write_to_out_protocol(o_prot)?;
9132 o_prot.write_field_end()?;
9133 ()
9134 } else {
9135 ()
9136 }
9137 o_prot.write_field_stop()?;
9138 o_prot.write_struct_end()
9139 }
9140 fn ok_or(self) -> thrift::Result<TSStatus> {
9141 if self.result_value.is_some() {
9142 Ok(self.result_value.unwrap())
9143 } else {
9144 Err(
9145 thrift::Error::Application(
9146 ApplicationError::new(
9147 ApplicationErrorKind::MissingResult,
9148 "no result received for TSIServiceInsertStringRecords"
9149 )
9150 )
9151 )
9152 }
9153 }
9154}
9155
9156#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9161struct TSIServiceTestInsertTabletArgs {
9162 req: TSInsertTabletReq,
9163}
9164
9165impl TSIServiceTestInsertTabletArgs {
9166 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertTabletArgs> {
9167 i_prot.read_struct_begin()?;
9168 let mut f_1: Option<TSInsertTabletReq> = None;
9169 loop {
9170 let field_ident = i_prot.read_field_begin()?;
9171 if field_ident.field_type == TType::Stop {
9172 break;
9173 }
9174 let field_id = field_id(&field_ident)?;
9175 match field_id {
9176 1 => {
9177 let val = TSInsertTabletReq::read_from_in_protocol(i_prot)?;
9178 f_1 = Some(val);
9179 },
9180 _ => {
9181 i_prot.skip(field_ident.field_type)?;
9182 },
9183 };
9184 i_prot.read_field_end()?;
9185 }
9186 i_prot.read_struct_end()?;
9187 verify_required_field_exists("TSIServiceTestInsertTabletArgs.req", &f_1)?;
9188 let ret = TSIServiceTestInsertTabletArgs {
9189 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9190 };
9191 Ok(ret)
9192 }
9193 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9194 let struct_ident = TStructIdentifier::new("testInsertTablet_args");
9195 o_prot.write_struct_begin(&struct_ident)?;
9196 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9197 self.req.write_to_out_protocol(o_prot)?;
9198 o_prot.write_field_end()?;
9199 o_prot.write_field_stop()?;
9200 o_prot.write_struct_end()
9201 }
9202}
9203
9204#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9209struct TSIServiceTestInsertTabletResult {
9210 result_value: Option<TSStatus>,
9211}
9212
9213impl TSIServiceTestInsertTabletResult {
9214 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertTabletResult> {
9215 i_prot.read_struct_begin()?;
9216 let mut f_0: Option<TSStatus> = None;
9217 loop {
9218 let field_ident = i_prot.read_field_begin()?;
9219 if field_ident.field_type == TType::Stop {
9220 break;
9221 }
9222 let field_id = field_id(&field_ident)?;
9223 match field_id {
9224 0 => {
9225 let val = TSStatus::read_from_in_protocol(i_prot)?;
9226 f_0 = Some(val);
9227 },
9228 _ => {
9229 i_prot.skip(field_ident.field_type)?;
9230 },
9231 };
9232 i_prot.read_field_end()?;
9233 }
9234 i_prot.read_struct_end()?;
9235 let ret = TSIServiceTestInsertTabletResult {
9236 result_value: f_0,
9237 };
9238 Ok(ret)
9239 }
9240 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9241 let struct_ident = TStructIdentifier::new("TSIServiceTestInsertTabletResult");
9242 o_prot.write_struct_begin(&struct_ident)?;
9243 if let Some(ref fld_var) = self.result_value {
9244 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9245 fld_var.write_to_out_protocol(o_prot)?;
9246 o_prot.write_field_end()?;
9247 ()
9248 } else {
9249 ()
9250 }
9251 o_prot.write_field_stop()?;
9252 o_prot.write_struct_end()
9253 }
9254 fn ok_or(self) -> thrift::Result<TSStatus> {
9255 if self.result_value.is_some() {
9256 Ok(self.result_value.unwrap())
9257 } else {
9258 Err(
9259 thrift::Error::Application(
9260 ApplicationError::new(
9261 ApplicationErrorKind::MissingResult,
9262 "no result received for TSIServiceTestInsertTablet"
9263 )
9264 )
9265 )
9266 }
9267 }
9268}
9269
9270#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9275struct TSIServiceTestInsertTabletsArgs {
9276 req: TSInsertTabletsReq,
9277}
9278
9279impl TSIServiceTestInsertTabletsArgs {
9280 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertTabletsArgs> {
9281 i_prot.read_struct_begin()?;
9282 let mut f_1: Option<TSInsertTabletsReq> = None;
9283 loop {
9284 let field_ident = i_prot.read_field_begin()?;
9285 if field_ident.field_type == TType::Stop {
9286 break;
9287 }
9288 let field_id = field_id(&field_ident)?;
9289 match field_id {
9290 1 => {
9291 let val = TSInsertTabletsReq::read_from_in_protocol(i_prot)?;
9292 f_1 = Some(val);
9293 },
9294 _ => {
9295 i_prot.skip(field_ident.field_type)?;
9296 },
9297 };
9298 i_prot.read_field_end()?;
9299 }
9300 i_prot.read_struct_end()?;
9301 verify_required_field_exists("TSIServiceTestInsertTabletsArgs.req", &f_1)?;
9302 let ret = TSIServiceTestInsertTabletsArgs {
9303 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9304 };
9305 Ok(ret)
9306 }
9307 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9308 let struct_ident = TStructIdentifier::new("testInsertTablets_args");
9309 o_prot.write_struct_begin(&struct_ident)?;
9310 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9311 self.req.write_to_out_protocol(o_prot)?;
9312 o_prot.write_field_end()?;
9313 o_prot.write_field_stop()?;
9314 o_prot.write_struct_end()
9315 }
9316}
9317
9318#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9323struct TSIServiceTestInsertTabletsResult {
9324 result_value: Option<TSStatus>,
9325}
9326
9327impl TSIServiceTestInsertTabletsResult {
9328 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertTabletsResult> {
9329 i_prot.read_struct_begin()?;
9330 let mut f_0: Option<TSStatus> = None;
9331 loop {
9332 let field_ident = i_prot.read_field_begin()?;
9333 if field_ident.field_type == TType::Stop {
9334 break;
9335 }
9336 let field_id = field_id(&field_ident)?;
9337 match field_id {
9338 0 => {
9339 let val = TSStatus::read_from_in_protocol(i_prot)?;
9340 f_0 = Some(val);
9341 },
9342 _ => {
9343 i_prot.skip(field_ident.field_type)?;
9344 },
9345 };
9346 i_prot.read_field_end()?;
9347 }
9348 i_prot.read_struct_end()?;
9349 let ret = TSIServiceTestInsertTabletsResult {
9350 result_value: f_0,
9351 };
9352 Ok(ret)
9353 }
9354 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9355 let struct_ident = TStructIdentifier::new("TSIServiceTestInsertTabletsResult");
9356 o_prot.write_struct_begin(&struct_ident)?;
9357 if let Some(ref fld_var) = self.result_value {
9358 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9359 fld_var.write_to_out_protocol(o_prot)?;
9360 o_prot.write_field_end()?;
9361 ()
9362 } else {
9363 ()
9364 }
9365 o_prot.write_field_stop()?;
9366 o_prot.write_struct_end()
9367 }
9368 fn ok_or(self) -> thrift::Result<TSStatus> {
9369 if self.result_value.is_some() {
9370 Ok(self.result_value.unwrap())
9371 } else {
9372 Err(
9373 thrift::Error::Application(
9374 ApplicationError::new(
9375 ApplicationErrorKind::MissingResult,
9376 "no result received for TSIServiceTestInsertTablets"
9377 )
9378 )
9379 )
9380 }
9381 }
9382}
9383
9384#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9389struct TSIServiceTestInsertRecordArgs {
9390 req: TSInsertRecordReq,
9391}
9392
9393impl TSIServiceTestInsertRecordArgs {
9394 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertRecordArgs> {
9395 i_prot.read_struct_begin()?;
9396 let mut f_1: Option<TSInsertRecordReq> = None;
9397 loop {
9398 let field_ident = i_prot.read_field_begin()?;
9399 if field_ident.field_type == TType::Stop {
9400 break;
9401 }
9402 let field_id = field_id(&field_ident)?;
9403 match field_id {
9404 1 => {
9405 let val = TSInsertRecordReq::read_from_in_protocol(i_prot)?;
9406 f_1 = Some(val);
9407 },
9408 _ => {
9409 i_prot.skip(field_ident.field_type)?;
9410 },
9411 };
9412 i_prot.read_field_end()?;
9413 }
9414 i_prot.read_struct_end()?;
9415 verify_required_field_exists("TSIServiceTestInsertRecordArgs.req", &f_1)?;
9416 let ret = TSIServiceTestInsertRecordArgs {
9417 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9418 };
9419 Ok(ret)
9420 }
9421 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9422 let struct_ident = TStructIdentifier::new("testInsertRecord_args");
9423 o_prot.write_struct_begin(&struct_ident)?;
9424 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9425 self.req.write_to_out_protocol(o_prot)?;
9426 o_prot.write_field_end()?;
9427 o_prot.write_field_stop()?;
9428 o_prot.write_struct_end()
9429 }
9430}
9431
9432#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9437struct TSIServiceTestInsertRecordResult {
9438 result_value: Option<TSStatus>,
9439}
9440
9441impl TSIServiceTestInsertRecordResult {
9442 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertRecordResult> {
9443 i_prot.read_struct_begin()?;
9444 let mut f_0: Option<TSStatus> = None;
9445 loop {
9446 let field_ident = i_prot.read_field_begin()?;
9447 if field_ident.field_type == TType::Stop {
9448 break;
9449 }
9450 let field_id = field_id(&field_ident)?;
9451 match field_id {
9452 0 => {
9453 let val = TSStatus::read_from_in_protocol(i_prot)?;
9454 f_0 = Some(val);
9455 },
9456 _ => {
9457 i_prot.skip(field_ident.field_type)?;
9458 },
9459 };
9460 i_prot.read_field_end()?;
9461 }
9462 i_prot.read_struct_end()?;
9463 let ret = TSIServiceTestInsertRecordResult {
9464 result_value: f_0,
9465 };
9466 Ok(ret)
9467 }
9468 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9469 let struct_ident = TStructIdentifier::new("TSIServiceTestInsertRecordResult");
9470 o_prot.write_struct_begin(&struct_ident)?;
9471 if let Some(ref fld_var) = self.result_value {
9472 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9473 fld_var.write_to_out_protocol(o_prot)?;
9474 o_prot.write_field_end()?;
9475 ()
9476 } else {
9477 ()
9478 }
9479 o_prot.write_field_stop()?;
9480 o_prot.write_struct_end()
9481 }
9482 fn ok_or(self) -> thrift::Result<TSStatus> {
9483 if self.result_value.is_some() {
9484 Ok(self.result_value.unwrap())
9485 } else {
9486 Err(
9487 thrift::Error::Application(
9488 ApplicationError::new(
9489 ApplicationErrorKind::MissingResult,
9490 "no result received for TSIServiceTestInsertRecord"
9491 )
9492 )
9493 )
9494 }
9495 }
9496}
9497
9498#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9503struct TSIServiceTestInsertStringRecordArgs {
9504 req: TSInsertStringRecordReq,
9505}
9506
9507impl TSIServiceTestInsertStringRecordArgs {
9508 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertStringRecordArgs> {
9509 i_prot.read_struct_begin()?;
9510 let mut f_1: Option<TSInsertStringRecordReq> = None;
9511 loop {
9512 let field_ident = i_prot.read_field_begin()?;
9513 if field_ident.field_type == TType::Stop {
9514 break;
9515 }
9516 let field_id = field_id(&field_ident)?;
9517 match field_id {
9518 1 => {
9519 let val = TSInsertStringRecordReq::read_from_in_protocol(i_prot)?;
9520 f_1 = Some(val);
9521 },
9522 _ => {
9523 i_prot.skip(field_ident.field_type)?;
9524 },
9525 };
9526 i_prot.read_field_end()?;
9527 }
9528 i_prot.read_struct_end()?;
9529 verify_required_field_exists("TSIServiceTestInsertStringRecordArgs.req", &f_1)?;
9530 let ret = TSIServiceTestInsertStringRecordArgs {
9531 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9532 };
9533 Ok(ret)
9534 }
9535 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9536 let struct_ident = TStructIdentifier::new("testInsertStringRecord_args");
9537 o_prot.write_struct_begin(&struct_ident)?;
9538 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9539 self.req.write_to_out_protocol(o_prot)?;
9540 o_prot.write_field_end()?;
9541 o_prot.write_field_stop()?;
9542 o_prot.write_struct_end()
9543 }
9544}
9545
9546#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9551struct TSIServiceTestInsertStringRecordResult {
9552 result_value: Option<TSStatus>,
9553}
9554
9555impl TSIServiceTestInsertStringRecordResult {
9556 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertStringRecordResult> {
9557 i_prot.read_struct_begin()?;
9558 let mut f_0: Option<TSStatus> = None;
9559 loop {
9560 let field_ident = i_prot.read_field_begin()?;
9561 if field_ident.field_type == TType::Stop {
9562 break;
9563 }
9564 let field_id = field_id(&field_ident)?;
9565 match field_id {
9566 0 => {
9567 let val = TSStatus::read_from_in_protocol(i_prot)?;
9568 f_0 = Some(val);
9569 },
9570 _ => {
9571 i_prot.skip(field_ident.field_type)?;
9572 },
9573 };
9574 i_prot.read_field_end()?;
9575 }
9576 i_prot.read_struct_end()?;
9577 let ret = TSIServiceTestInsertStringRecordResult {
9578 result_value: f_0,
9579 };
9580 Ok(ret)
9581 }
9582 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9583 let struct_ident = TStructIdentifier::new("TSIServiceTestInsertStringRecordResult");
9584 o_prot.write_struct_begin(&struct_ident)?;
9585 if let Some(ref fld_var) = self.result_value {
9586 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9587 fld_var.write_to_out_protocol(o_prot)?;
9588 o_prot.write_field_end()?;
9589 ()
9590 } else {
9591 ()
9592 }
9593 o_prot.write_field_stop()?;
9594 o_prot.write_struct_end()
9595 }
9596 fn ok_or(self) -> thrift::Result<TSStatus> {
9597 if self.result_value.is_some() {
9598 Ok(self.result_value.unwrap())
9599 } else {
9600 Err(
9601 thrift::Error::Application(
9602 ApplicationError::new(
9603 ApplicationErrorKind::MissingResult,
9604 "no result received for TSIServiceTestInsertStringRecord"
9605 )
9606 )
9607 )
9608 }
9609 }
9610}
9611
9612#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9617struct TSIServiceTestInsertRecordsArgs {
9618 req: TSInsertRecordsReq,
9619}
9620
9621impl TSIServiceTestInsertRecordsArgs {
9622 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertRecordsArgs> {
9623 i_prot.read_struct_begin()?;
9624 let mut f_1: Option<TSInsertRecordsReq> = None;
9625 loop {
9626 let field_ident = i_prot.read_field_begin()?;
9627 if field_ident.field_type == TType::Stop {
9628 break;
9629 }
9630 let field_id = field_id(&field_ident)?;
9631 match field_id {
9632 1 => {
9633 let val = TSInsertRecordsReq::read_from_in_protocol(i_prot)?;
9634 f_1 = Some(val);
9635 },
9636 _ => {
9637 i_prot.skip(field_ident.field_type)?;
9638 },
9639 };
9640 i_prot.read_field_end()?;
9641 }
9642 i_prot.read_struct_end()?;
9643 verify_required_field_exists("TSIServiceTestInsertRecordsArgs.req", &f_1)?;
9644 let ret = TSIServiceTestInsertRecordsArgs {
9645 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9646 };
9647 Ok(ret)
9648 }
9649 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9650 let struct_ident = TStructIdentifier::new("testInsertRecords_args");
9651 o_prot.write_struct_begin(&struct_ident)?;
9652 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9653 self.req.write_to_out_protocol(o_prot)?;
9654 o_prot.write_field_end()?;
9655 o_prot.write_field_stop()?;
9656 o_prot.write_struct_end()
9657 }
9658}
9659
9660#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9665struct TSIServiceTestInsertRecordsResult {
9666 result_value: Option<TSStatus>,
9667}
9668
9669impl TSIServiceTestInsertRecordsResult {
9670 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertRecordsResult> {
9671 i_prot.read_struct_begin()?;
9672 let mut f_0: Option<TSStatus> = None;
9673 loop {
9674 let field_ident = i_prot.read_field_begin()?;
9675 if field_ident.field_type == TType::Stop {
9676 break;
9677 }
9678 let field_id = field_id(&field_ident)?;
9679 match field_id {
9680 0 => {
9681 let val = TSStatus::read_from_in_protocol(i_prot)?;
9682 f_0 = Some(val);
9683 },
9684 _ => {
9685 i_prot.skip(field_ident.field_type)?;
9686 },
9687 };
9688 i_prot.read_field_end()?;
9689 }
9690 i_prot.read_struct_end()?;
9691 let ret = TSIServiceTestInsertRecordsResult {
9692 result_value: f_0,
9693 };
9694 Ok(ret)
9695 }
9696 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9697 let struct_ident = TStructIdentifier::new("TSIServiceTestInsertRecordsResult");
9698 o_prot.write_struct_begin(&struct_ident)?;
9699 if let Some(ref fld_var) = self.result_value {
9700 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9701 fld_var.write_to_out_protocol(o_prot)?;
9702 o_prot.write_field_end()?;
9703 ()
9704 } else {
9705 ()
9706 }
9707 o_prot.write_field_stop()?;
9708 o_prot.write_struct_end()
9709 }
9710 fn ok_or(self) -> thrift::Result<TSStatus> {
9711 if self.result_value.is_some() {
9712 Ok(self.result_value.unwrap())
9713 } else {
9714 Err(
9715 thrift::Error::Application(
9716 ApplicationError::new(
9717 ApplicationErrorKind::MissingResult,
9718 "no result received for TSIServiceTestInsertRecords"
9719 )
9720 )
9721 )
9722 }
9723 }
9724}
9725
9726#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9731struct TSIServiceTestInsertRecordsOfOneDeviceArgs {
9732 req: TSInsertRecordsOfOneDeviceReq,
9733}
9734
9735impl TSIServiceTestInsertRecordsOfOneDeviceArgs {
9736 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertRecordsOfOneDeviceArgs> {
9737 i_prot.read_struct_begin()?;
9738 let mut f_1: Option<TSInsertRecordsOfOneDeviceReq> = None;
9739 loop {
9740 let field_ident = i_prot.read_field_begin()?;
9741 if field_ident.field_type == TType::Stop {
9742 break;
9743 }
9744 let field_id = field_id(&field_ident)?;
9745 match field_id {
9746 1 => {
9747 let val = TSInsertRecordsOfOneDeviceReq::read_from_in_protocol(i_prot)?;
9748 f_1 = Some(val);
9749 },
9750 _ => {
9751 i_prot.skip(field_ident.field_type)?;
9752 },
9753 };
9754 i_prot.read_field_end()?;
9755 }
9756 i_prot.read_struct_end()?;
9757 verify_required_field_exists("TSIServiceTestInsertRecordsOfOneDeviceArgs.req", &f_1)?;
9758 let ret = TSIServiceTestInsertRecordsOfOneDeviceArgs {
9759 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9760 };
9761 Ok(ret)
9762 }
9763 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9764 let struct_ident = TStructIdentifier::new("testInsertRecordsOfOneDevice_args");
9765 o_prot.write_struct_begin(&struct_ident)?;
9766 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9767 self.req.write_to_out_protocol(o_prot)?;
9768 o_prot.write_field_end()?;
9769 o_prot.write_field_stop()?;
9770 o_prot.write_struct_end()
9771 }
9772}
9773
9774#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9779struct TSIServiceTestInsertRecordsOfOneDeviceResult {
9780 result_value: Option<TSStatus>,
9781}
9782
9783impl TSIServiceTestInsertRecordsOfOneDeviceResult {
9784 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertRecordsOfOneDeviceResult> {
9785 i_prot.read_struct_begin()?;
9786 let mut f_0: Option<TSStatus> = None;
9787 loop {
9788 let field_ident = i_prot.read_field_begin()?;
9789 if field_ident.field_type == TType::Stop {
9790 break;
9791 }
9792 let field_id = field_id(&field_ident)?;
9793 match field_id {
9794 0 => {
9795 let val = TSStatus::read_from_in_protocol(i_prot)?;
9796 f_0 = Some(val);
9797 },
9798 _ => {
9799 i_prot.skip(field_ident.field_type)?;
9800 },
9801 };
9802 i_prot.read_field_end()?;
9803 }
9804 i_prot.read_struct_end()?;
9805 let ret = TSIServiceTestInsertRecordsOfOneDeviceResult {
9806 result_value: f_0,
9807 };
9808 Ok(ret)
9809 }
9810 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9811 let struct_ident = TStructIdentifier::new("TSIServiceTestInsertRecordsOfOneDeviceResult");
9812 o_prot.write_struct_begin(&struct_ident)?;
9813 if let Some(ref fld_var) = self.result_value {
9814 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9815 fld_var.write_to_out_protocol(o_prot)?;
9816 o_prot.write_field_end()?;
9817 ()
9818 } else {
9819 ()
9820 }
9821 o_prot.write_field_stop()?;
9822 o_prot.write_struct_end()
9823 }
9824 fn ok_or(self) -> thrift::Result<TSStatus> {
9825 if self.result_value.is_some() {
9826 Ok(self.result_value.unwrap())
9827 } else {
9828 Err(
9829 thrift::Error::Application(
9830 ApplicationError::new(
9831 ApplicationErrorKind::MissingResult,
9832 "no result received for TSIServiceTestInsertRecordsOfOneDevice"
9833 )
9834 )
9835 )
9836 }
9837 }
9838}
9839
9840#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9845struct TSIServiceTestInsertStringRecordsArgs {
9846 req: TSInsertStringRecordsReq,
9847}
9848
9849impl TSIServiceTestInsertStringRecordsArgs {
9850 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertStringRecordsArgs> {
9851 i_prot.read_struct_begin()?;
9852 let mut f_1: Option<TSInsertStringRecordsReq> = None;
9853 loop {
9854 let field_ident = i_prot.read_field_begin()?;
9855 if field_ident.field_type == TType::Stop {
9856 break;
9857 }
9858 let field_id = field_id(&field_ident)?;
9859 match field_id {
9860 1 => {
9861 let val = TSInsertStringRecordsReq::read_from_in_protocol(i_prot)?;
9862 f_1 = Some(val);
9863 },
9864 _ => {
9865 i_prot.skip(field_ident.field_type)?;
9866 },
9867 };
9868 i_prot.read_field_end()?;
9869 }
9870 i_prot.read_struct_end()?;
9871 verify_required_field_exists("TSIServiceTestInsertStringRecordsArgs.req", &f_1)?;
9872 let ret = TSIServiceTestInsertStringRecordsArgs {
9873 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9874 };
9875 Ok(ret)
9876 }
9877 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9878 let struct_ident = TStructIdentifier::new("testInsertStringRecords_args");
9879 o_prot.write_struct_begin(&struct_ident)?;
9880 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9881 self.req.write_to_out_protocol(o_prot)?;
9882 o_prot.write_field_end()?;
9883 o_prot.write_field_stop()?;
9884 o_prot.write_struct_end()
9885 }
9886}
9887
9888#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9893struct TSIServiceTestInsertStringRecordsResult {
9894 result_value: Option<TSStatus>,
9895}
9896
9897impl TSIServiceTestInsertStringRecordsResult {
9898 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceTestInsertStringRecordsResult> {
9899 i_prot.read_struct_begin()?;
9900 let mut f_0: Option<TSStatus> = None;
9901 loop {
9902 let field_ident = i_prot.read_field_begin()?;
9903 if field_ident.field_type == TType::Stop {
9904 break;
9905 }
9906 let field_id = field_id(&field_ident)?;
9907 match field_id {
9908 0 => {
9909 let val = TSStatus::read_from_in_protocol(i_prot)?;
9910 f_0 = Some(val);
9911 },
9912 _ => {
9913 i_prot.skip(field_ident.field_type)?;
9914 },
9915 };
9916 i_prot.read_field_end()?;
9917 }
9918 i_prot.read_struct_end()?;
9919 let ret = TSIServiceTestInsertStringRecordsResult {
9920 result_value: f_0,
9921 };
9922 Ok(ret)
9923 }
9924 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9925 let struct_ident = TStructIdentifier::new("TSIServiceTestInsertStringRecordsResult");
9926 o_prot.write_struct_begin(&struct_ident)?;
9927 if let Some(ref fld_var) = self.result_value {
9928 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
9929 fld_var.write_to_out_protocol(o_prot)?;
9930 o_prot.write_field_end()?;
9931 ()
9932 } else {
9933 ()
9934 }
9935 o_prot.write_field_stop()?;
9936 o_prot.write_struct_end()
9937 }
9938 fn ok_or(self) -> thrift::Result<TSStatus> {
9939 if self.result_value.is_some() {
9940 Ok(self.result_value.unwrap())
9941 } else {
9942 Err(
9943 thrift::Error::Application(
9944 ApplicationError::new(
9945 ApplicationErrorKind::MissingResult,
9946 "no result received for TSIServiceTestInsertStringRecords"
9947 )
9948 )
9949 )
9950 }
9951 }
9952}
9953
9954#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9959struct TSIServiceDeleteDataArgs {
9960 req: TSDeleteDataReq,
9961}
9962
9963impl TSIServiceDeleteDataArgs {
9964 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceDeleteDataArgs> {
9965 i_prot.read_struct_begin()?;
9966 let mut f_1: Option<TSDeleteDataReq> = None;
9967 loop {
9968 let field_ident = i_prot.read_field_begin()?;
9969 if field_ident.field_type == TType::Stop {
9970 break;
9971 }
9972 let field_id = field_id(&field_ident)?;
9973 match field_id {
9974 1 => {
9975 let val = TSDeleteDataReq::read_from_in_protocol(i_prot)?;
9976 f_1 = Some(val);
9977 },
9978 _ => {
9979 i_prot.skip(field_ident.field_type)?;
9980 },
9981 };
9982 i_prot.read_field_end()?;
9983 }
9984 i_prot.read_struct_end()?;
9985 verify_required_field_exists("TSIServiceDeleteDataArgs.req", &f_1)?;
9986 let ret = TSIServiceDeleteDataArgs {
9987 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
9988 };
9989 Ok(ret)
9990 }
9991 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
9992 let struct_ident = TStructIdentifier::new("deleteData_args");
9993 o_prot.write_struct_begin(&struct_ident)?;
9994 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
9995 self.req.write_to_out_protocol(o_prot)?;
9996 o_prot.write_field_end()?;
9997 o_prot.write_field_stop()?;
9998 o_prot.write_struct_end()
9999 }
10000}
10001
10002#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10007struct TSIServiceDeleteDataResult {
10008 result_value: Option<TSStatus>,
10009}
10010
10011impl TSIServiceDeleteDataResult {
10012 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceDeleteDataResult> {
10013 i_prot.read_struct_begin()?;
10014 let mut f_0: Option<TSStatus> = None;
10015 loop {
10016 let field_ident = i_prot.read_field_begin()?;
10017 if field_ident.field_type == TType::Stop {
10018 break;
10019 }
10020 let field_id = field_id(&field_ident)?;
10021 match field_id {
10022 0 => {
10023 let val = TSStatus::read_from_in_protocol(i_prot)?;
10024 f_0 = Some(val);
10025 },
10026 _ => {
10027 i_prot.skip(field_ident.field_type)?;
10028 },
10029 };
10030 i_prot.read_field_end()?;
10031 }
10032 i_prot.read_struct_end()?;
10033 let ret = TSIServiceDeleteDataResult {
10034 result_value: f_0,
10035 };
10036 Ok(ret)
10037 }
10038 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10039 let struct_ident = TStructIdentifier::new("TSIServiceDeleteDataResult");
10040 o_prot.write_struct_begin(&struct_ident)?;
10041 if let Some(ref fld_var) = self.result_value {
10042 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10043 fld_var.write_to_out_protocol(o_prot)?;
10044 o_prot.write_field_end()?;
10045 ()
10046 } else {
10047 ()
10048 }
10049 o_prot.write_field_stop()?;
10050 o_prot.write_struct_end()
10051 }
10052 fn ok_or(self) -> thrift::Result<TSStatus> {
10053 if self.result_value.is_some() {
10054 Ok(self.result_value.unwrap())
10055 } else {
10056 Err(
10057 thrift::Error::Application(
10058 ApplicationError::new(
10059 ApplicationErrorKind::MissingResult,
10060 "no result received for TSIServiceDeleteData"
10061 )
10062 )
10063 )
10064 }
10065 }
10066}
10067
10068#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10073struct TSIServiceExecuteRawDataQueryArgs {
10074 req: TSRawDataQueryReq,
10075}
10076
10077impl TSIServiceExecuteRawDataQueryArgs {
10078 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceExecuteRawDataQueryArgs> {
10079 i_prot.read_struct_begin()?;
10080 let mut f_1: Option<TSRawDataQueryReq> = None;
10081 loop {
10082 let field_ident = i_prot.read_field_begin()?;
10083 if field_ident.field_type == TType::Stop {
10084 break;
10085 }
10086 let field_id = field_id(&field_ident)?;
10087 match field_id {
10088 1 => {
10089 let val = TSRawDataQueryReq::read_from_in_protocol(i_prot)?;
10090 f_1 = Some(val);
10091 },
10092 _ => {
10093 i_prot.skip(field_ident.field_type)?;
10094 },
10095 };
10096 i_prot.read_field_end()?;
10097 }
10098 i_prot.read_struct_end()?;
10099 verify_required_field_exists("TSIServiceExecuteRawDataQueryArgs.req", &f_1)?;
10100 let ret = TSIServiceExecuteRawDataQueryArgs {
10101 req: f_1.expect("auto-generated code should have checked for presence of required fields"),
10102 };
10103 Ok(ret)
10104 }
10105 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10106 let struct_ident = TStructIdentifier::new("executeRawDataQuery_args");
10107 o_prot.write_struct_begin(&struct_ident)?;
10108 o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?;
10109 self.req.write_to_out_protocol(o_prot)?;
10110 o_prot.write_field_end()?;
10111 o_prot.write_field_stop()?;
10112 o_prot.write_struct_end()
10113 }
10114}
10115
10116#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10121struct TSIServiceExecuteRawDataQueryResult {
10122 result_value: Option<TSExecuteStatementResp>,
10123}
10124
10125impl TSIServiceExecuteRawDataQueryResult {
10126 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceExecuteRawDataQueryResult> {
10127 i_prot.read_struct_begin()?;
10128 let mut f_0: Option<TSExecuteStatementResp> = None;
10129 loop {
10130 let field_ident = i_prot.read_field_begin()?;
10131 if field_ident.field_type == TType::Stop {
10132 break;
10133 }
10134 let field_id = field_id(&field_ident)?;
10135 match field_id {
10136 0 => {
10137 let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?;
10138 f_0 = Some(val);
10139 },
10140 _ => {
10141 i_prot.skip(field_ident.field_type)?;
10142 },
10143 };
10144 i_prot.read_field_end()?;
10145 }
10146 i_prot.read_struct_end()?;
10147 let ret = TSIServiceExecuteRawDataQueryResult {
10148 result_value: f_0,
10149 };
10150 Ok(ret)
10151 }
10152 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10153 let struct_ident = TStructIdentifier::new("TSIServiceExecuteRawDataQueryResult");
10154 o_prot.write_struct_begin(&struct_ident)?;
10155 if let Some(ref fld_var) = self.result_value {
10156 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
10157 fld_var.write_to_out_protocol(o_prot)?;
10158 o_prot.write_field_end()?;
10159 ()
10160 } else {
10161 ()
10162 }
10163 o_prot.write_field_stop()?;
10164 o_prot.write_struct_end()
10165 }
10166 fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> {
10167 if self.result_value.is_some() {
10168 Ok(self.result_value.unwrap())
10169 } else {
10170 Err(
10171 thrift::Error::Application(
10172 ApplicationError::new(
10173 ApplicationErrorKind::MissingResult,
10174 "no result received for TSIServiceExecuteRawDataQuery"
10175 )
10176 )
10177 )
10178 }
10179 }
10180}
10181
10182#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10187struct TSIServiceRequestStatementIdArgs {
10188 session_id: i64,
10189}
10190
10191impl TSIServiceRequestStatementIdArgs {
10192 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceRequestStatementIdArgs> {
10193 i_prot.read_struct_begin()?;
10194 let mut f_1: Option<i64> = None;
10195 loop {
10196 let field_ident = i_prot.read_field_begin()?;
10197 if field_ident.field_type == TType::Stop {
10198 break;
10199 }
10200 let field_id = field_id(&field_ident)?;
10201 match field_id {
10202 1 => {
10203 let val = i_prot.read_i64()?;
10204 f_1 = Some(val);
10205 },
10206 _ => {
10207 i_prot.skip(field_ident.field_type)?;
10208 },
10209 };
10210 i_prot.read_field_end()?;
10211 }
10212 i_prot.read_struct_end()?;
10213 verify_required_field_exists("TSIServiceRequestStatementIdArgs.session_id", &f_1)?;
10214 let ret = TSIServiceRequestStatementIdArgs {
10215 session_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
10216 };
10217 Ok(ret)
10218 }
10219 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10220 let struct_ident = TStructIdentifier::new("requestStatementId_args");
10221 o_prot.write_struct_begin(&struct_ident)?;
10222 o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?;
10223 o_prot.write_i64(self.session_id)?;
10224 o_prot.write_field_end()?;
10225 o_prot.write_field_stop()?;
10226 o_prot.write_struct_end()
10227 }
10228}
10229
10230#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10235struct TSIServiceRequestStatementIdResult {
10236 result_value: Option<i64>,
10237}
10238
10239impl TSIServiceRequestStatementIdResult {
10240 fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSIServiceRequestStatementIdResult> {
10241 i_prot.read_struct_begin()?;
10242 let mut f_0: Option<i64> = None;
10243 loop {
10244 let field_ident = i_prot.read_field_begin()?;
10245 if field_ident.field_type == TType::Stop {
10246 break;
10247 }
10248 let field_id = field_id(&field_ident)?;
10249 match field_id {
10250 0 => {
10251 let val = i_prot.read_i64()?;
10252 f_0 = Some(val);
10253 },
10254 _ => {
10255 i_prot.skip(field_ident.field_type)?;
10256 },
10257 };
10258 i_prot.read_field_end()?;
10259 }
10260 i_prot.read_struct_end()?;
10261 let ret = TSIServiceRequestStatementIdResult {
10262 result_value: f_0,
10263 };
10264 Ok(ret)
10265 }
10266 fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> {
10267 let struct_ident = TStructIdentifier::new("TSIServiceRequestStatementIdResult");
10268 o_prot.write_struct_begin(&struct_ident)?;
10269 if let Some(fld_var) = self.result_value {
10270 o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::I64, 0))?;
10271 o_prot.write_i64(fld_var)?;
10272 o_prot.write_field_end()?;
10273 ()
10274 } else {
10275 ()
10276 }
10277 o_prot.write_field_stop()?;
10278 o_prot.write_struct_end()
10279 }
10280 fn ok_or(self) -> thrift::Result<i64> {
10281 if self.result_value.is_some() {
10282 Ok(self.result_value.unwrap())
10283 } else {
10284 Err(
10285 thrift::Error::Application(
10286 ApplicationError::new(
10287 ApplicationErrorKind::MissingResult,
10288 "no result received for TSIServiceRequestStatementId"
10289 )
10290 )
10291 )
10292 }
10293 }
10294}
10295