| // Licensed to the Apache Software Foundation (ASF) under one |
| // or more contributor license agreements. See the NOTICE file |
| // distributed with this work for additional information |
| // regarding copyright ownership. The ASF licenses this file |
| // to you under the Apache License, Version 2.0 (the |
| // "License"); you may not use this file except in compliance |
| // with the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, |
| // software distributed under the License is distributed on an |
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| // KIND, either express or implied. See the License for the |
| // specific language governing permissions and limitations |
| // under the License. |
| |
| // Autogenerated by Thrift Compiler (0.14.1) |
| // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| |
| #![allow(unused_imports)] |
| #![allow(unused_extern_crates)] |
| #![allow(clippy::too_many_arguments, clippy::type_complexity)] |
| #![cfg_attr(rustfmt, rustfmt_skip)] |
| |
| use std::cell::RefCell; |
| use std::collections::{BTreeMap, BTreeSet}; |
| use std::convert::{From, TryFrom}; |
| use std::default::Default; |
| use std::error::Error; |
| use std::fmt; |
| use std::fmt::{Display, Formatter}; |
| use std::rc::Rc; |
| |
| use thrift::OrderedFloat; |
| use thrift::{ApplicationError, ApplicationErrorKind, ProtocolError, ProtocolErrorKind, TThriftClient}; |
| use thrift::protocol::{TFieldIdentifier, TListIdentifier, TMapIdentifier, TMessageIdentifier, TMessageType, TInputProtocol, TOutputProtocol, TSetIdentifier, TStructIdentifier, TType}; |
| use thrift::protocol::field_id; |
| use thrift::protocol::verify_expected_message_type; |
| use thrift::protocol::verify_expected_sequence_number; |
| use thrift::protocol::verify_expected_service_call; |
| use thrift::protocol::verify_required_field_exists; |
| use thrift::server::TProcessor; |
| |
| use crate::protocol::common; |
| |
| #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub enum TSProtocolVersion { |
| IotdbServiceProtocolV1 = 0, |
| IotdbServiceProtocolV2 = 1, |
| IotdbServiceProtocolV3 = 2, |
| } |
| |
| impl TSProtocolVersion { |
| pub fn write_to_out_protocol(self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| o_prot.write_i32(self as i32) |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSProtocolVersion> { |
| let enum_value = i_prot.read_i32()?; |
| TSProtocolVersion::try_from(enum_value) } |
| } |
| |
| impl TryFrom<i32> for TSProtocolVersion { |
| type Error = thrift::Error; fn try_from(i: i32) -> Result<Self, Self::Error> { |
| match i { |
| 0 => Ok(TSProtocolVersion::IotdbServiceProtocolV1), |
| 1 => Ok(TSProtocolVersion::IotdbServiceProtocolV2), |
| 2 => Ok(TSProtocolVersion::IotdbServiceProtocolV3), |
| _ => { |
| Err( |
| thrift::Error::Protocol( |
| ProtocolError::new( |
| ProtocolErrorKind::InvalidData, |
| format!("cannot convert enum constant {} to TSProtocolVersion", i) |
| ) |
| ) |
| ) |
| }, |
| } |
| } |
| } |
| |
| #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub enum TSConnectionType { |
| ThriftBased = 0, |
| MqttBased = 1, |
| Internal = 2, |
| RestBased = 3, |
| } |
| |
| impl TSConnectionType { |
| pub fn write_to_out_protocol(self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| o_prot.write_i32(self as i32) |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSConnectionType> { |
| let enum_value = i_prot.read_i32()?; |
| TSConnectionType::try_from(enum_value) } |
| } |
| |
| impl TryFrom<i32> for TSConnectionType { |
| type Error = thrift::Error; fn try_from(i: i32) -> Result<Self, Self::Error> { |
| match i { |
| 0 => Ok(TSConnectionType::ThriftBased), |
| 1 => Ok(TSConnectionType::MqttBased), |
| 2 => Ok(TSConnectionType::Internal), |
| 3 => Ok(TSConnectionType::RestBased), |
| _ => { |
| Err( |
| thrift::Error::Protocol( |
| ProtocolError::new( |
| ProtocolErrorKind::InvalidData, |
| format!("cannot convert enum constant {} to TSConnectionType", i) |
| ) |
| ) |
| ) |
| }, |
| } |
| } |
| } |
| |
| // |
| // TSQueryDataSet |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSQueryDataSet { |
| pub time: Vec<u8>, |
| pub value_list: Vec<Vec<u8>>, |
| pub bitmap_list: Vec<Vec<u8>>, |
| } |
| |
| impl TSQueryDataSet { |
| pub fn new(time: Vec<u8>, value_list: Vec<Vec<u8>>, bitmap_list: Vec<Vec<u8>>) -> TSQueryDataSet { |
| TSQueryDataSet { |
| time, |
| value_list, |
| bitmap_list, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSQueryDataSet> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<Vec<u8>> = None; |
| let mut f_2: Option<Vec<Vec<u8>>> = None; |
| let mut f_3: Option<Vec<Vec<u8>>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_bytes()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_0 = i_prot.read_bytes()?; |
| val.push(list_elem_0); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_1 = i_prot.read_bytes()?; |
| val.push(list_elem_1); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSQueryDataSet.time", &f_1)?; |
| verify_required_field_exists("TSQueryDataSet.value_list", &f_2)?; |
| verify_required_field_exists("TSQueryDataSet.bitmap_list", &f_3)?; |
| let ret = TSQueryDataSet { |
| time: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| value_list: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| bitmap_list: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSQueryDataSet"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("time", TType::String, 1))?; |
| o_prot.write_bytes(&self.time)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("valueList", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.value_list.len() as i32))?; |
| for e in &self.value_list { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("bitmapList", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.bitmap_list.len() as i32))?; |
| for e in &self.bitmap_list { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSQueryNonAlignDataSet |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSQueryNonAlignDataSet { |
| pub time_list: Vec<Vec<u8>>, |
| pub value_list: Vec<Vec<u8>>, |
| } |
| |
| impl TSQueryNonAlignDataSet { |
| pub fn new(time_list: Vec<Vec<u8>>, value_list: Vec<Vec<u8>>) -> TSQueryNonAlignDataSet { |
| TSQueryNonAlignDataSet { |
| time_list, |
| value_list, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSQueryNonAlignDataSet> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<Vec<Vec<u8>>> = None; |
| let mut f_2: Option<Vec<Vec<u8>>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_2 = i_prot.read_bytes()?; |
| val.push(list_elem_2); |
| } |
| i_prot.read_list_end()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_3 = i_prot.read_bytes()?; |
| val.push(list_elem_3); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSQueryNonAlignDataSet.time_list", &f_1)?; |
| verify_required_field_exists("TSQueryNonAlignDataSet.value_list", &f_2)?; |
| let ret = TSQueryNonAlignDataSet { |
| time_list: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| value_list: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSQueryNonAlignDataSet"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeList", TType::List, 1))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.time_list.len() as i32))?; |
| for e in &self.time_list { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("valueList", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.value_list.len() as i32))?; |
| for e in &self.value_list { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSTracingInfo |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSTracingInfo { |
| pub activity_list: Vec<String>, |
| pub elapsed_time_list: Vec<i64>, |
| pub series_path_num: Option<i32>, |
| pub seq_file_num: Option<i32>, |
| pub un_seq_file_num: Option<i32>, |
| pub sequence_chunk_num: Option<i32>, |
| pub sequence_chunk_point_num: Option<i64>, |
| pub unsequence_chunk_num: Option<i32>, |
| pub unsequence_chunk_point_num: Option<i64>, |
| pub total_page_num: Option<i32>, |
| pub overlapped_page_num: Option<i32>, |
| } |
| |
| impl TSTracingInfo { |
| pub fn new<F3, F4, F5, F6, F7, F8, F9, F10, F11>(activity_list: Vec<String>, elapsed_time_list: Vec<i64>, series_path_num: F3, seq_file_num: F4, un_seq_file_num: F5, sequence_chunk_num: F6, sequence_chunk_point_num: F7, unsequence_chunk_num: F8, unsequence_chunk_point_num: F9, total_page_num: F10, overlapped_page_num: F11) -> TSTracingInfo where F3: Into<Option<i32>>, F4: Into<Option<i32>>, F5: Into<Option<i32>>, F6: Into<Option<i32>>, F7: Into<Option<i64>>, F8: Into<Option<i32>>, F9: Into<Option<i64>>, F10: Into<Option<i32>>, F11: Into<Option<i32>> { |
| TSTracingInfo { |
| activity_list, |
| elapsed_time_list, |
| series_path_num: series_path_num.into(), |
| seq_file_num: seq_file_num.into(), |
| un_seq_file_num: un_seq_file_num.into(), |
| sequence_chunk_num: sequence_chunk_num.into(), |
| sequence_chunk_point_num: sequence_chunk_point_num.into(), |
| unsequence_chunk_num: unsequence_chunk_num.into(), |
| unsequence_chunk_point_num: unsequence_chunk_point_num.into(), |
| total_page_num: total_page_num.into(), |
| overlapped_page_num: overlapped_page_num.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSTracingInfo> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<Vec<String>> = None; |
| let mut f_2: Option<Vec<i64>> = None; |
| let mut f_3: Option<i32> = None; |
| let mut f_4: Option<i32> = None; |
| let mut f_5: Option<i32> = None; |
| let mut f_6: Option<i32> = None; |
| let mut f_7: Option<i64> = None; |
| let mut f_8: Option<i32> = None; |
| let mut f_9: Option<i64> = None; |
| let mut f_10: Option<i32> = None; |
| let mut f_11: Option<i32> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_4 = i_prot.read_string()?; |
| val.push(list_elem_4); |
| } |
| i_prot.read_list_end()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i64> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_5 = i_prot.read_i64()?; |
| val.push(list_elem_5); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i32()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i32()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i32()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_i32()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_i64()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let val = i_prot.read_i32()?; |
| f_8 = Some(val); |
| }, |
| 9 => { |
| let val = i_prot.read_i64()?; |
| f_9 = Some(val); |
| }, |
| 10 => { |
| let val = i_prot.read_i32()?; |
| f_10 = Some(val); |
| }, |
| 11 => { |
| let val = i_prot.read_i32()?; |
| f_11 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSTracingInfo.activity_list", &f_1)?; |
| verify_required_field_exists("TSTracingInfo.elapsed_time_list", &f_2)?; |
| let ret = TSTracingInfo { |
| activity_list: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| elapsed_time_list: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| series_path_num: f_3, |
| seq_file_num: f_4, |
| un_seq_file_num: f_5, |
| sequence_chunk_num: f_6, |
| sequence_chunk_point_num: f_7, |
| unsequence_chunk_num: f_8, |
| unsequence_chunk_point_num: f_9, |
| total_page_num: f_10, |
| overlapped_page_num: f_11, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSTracingInfo"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("activityList", TType::List, 1))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.activity_list.len() as i32))?; |
| for e in &self.activity_list { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("elapsedTimeList", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I64, self.elapsed_time_list.len() as i32))?; |
| for e in &self.elapsed_time_list { |
| o_prot.write_i64(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.series_path_num { |
| o_prot.write_field_begin(&TFieldIdentifier::new("seriesPathNum", TType::I32, 3))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.seq_file_num { |
| o_prot.write_field_begin(&TFieldIdentifier::new("seqFileNum", TType::I32, 4))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.un_seq_file_num { |
| o_prot.write_field_begin(&TFieldIdentifier::new("unSeqFileNum", TType::I32, 5))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.sequence_chunk_num { |
| o_prot.write_field_begin(&TFieldIdentifier::new("sequenceChunkNum", TType::I32, 6))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.sequence_chunk_point_num { |
| o_prot.write_field_begin(&TFieldIdentifier::new("sequenceChunkPointNum", TType::I64, 7))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.unsequence_chunk_num { |
| o_prot.write_field_begin(&TFieldIdentifier::new("unsequenceChunkNum", TType::I32, 8))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.unsequence_chunk_point_num { |
| o_prot.write_field_begin(&TFieldIdentifier::new("unsequenceChunkPointNum", TType::I64, 9))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.total_page_num { |
| o_prot.write_field_begin(&TFieldIdentifier::new("totalPageNum", TType::I32, 10))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.overlapped_page_num { |
| o_prot.write_field_begin(&TFieldIdentifier::new("overlappedPageNum", TType::I32, 11))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSExecuteStatementResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSExecuteStatementResp { |
| pub status: common::TSStatus, |
| pub query_id: Option<i64>, |
| pub columns: Option<Vec<String>>, |
| pub operation_type: Option<String>, |
| pub ignore_time_stamp: Option<bool>, |
| pub data_type_list: Option<Vec<String>>, |
| pub query_data_set: Option<TSQueryDataSet>, |
| pub non_align_query_data_set: Option<TSQueryNonAlignDataSet>, |
| pub column_name_index_map: Option<BTreeMap<String, i32>>, |
| pub sg_columns: Option<Vec<String>>, |
| pub alias_columns: Option<Vec<i8>>, |
| pub tracing_info: Option<TSTracingInfo>, |
| pub query_result: Option<Vec<Vec<u8>>>, |
| pub more_data: Option<bool>, |
| pub database: Option<String>, |
| pub table_model: Option<bool>, |
| pub column_index2_ts_block_column_index_list: Option<Vec<i32>>, |
| } |
| |
| impl TSExecuteStatementResp { |
| pub fn new<F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17>(status: common::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, sg_columns: F10, alias_columns: F11, tracing_info: F12, query_result: F13, more_data: F14, database: F15, table_model: F16, column_index2_ts_block_column_index_list: F17) -> 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>>>, F10: Into<Option<Vec<String>>>, F11: Into<Option<Vec<i8>>>, F12: Into<Option<TSTracingInfo>>, F13: Into<Option<Vec<Vec<u8>>>>, F14: Into<Option<bool>>, F15: Into<Option<String>>, F16: Into<Option<bool>>, F17: Into<Option<Vec<i32>>> { |
| TSExecuteStatementResp { |
| status, |
| query_id: query_id.into(), |
| columns: columns.into(), |
| operation_type: operation_type.into(), |
| ignore_time_stamp: ignore_time_stamp.into(), |
| data_type_list: data_type_list.into(), |
| query_data_set: query_data_set.into(), |
| non_align_query_data_set: non_align_query_data_set.into(), |
| column_name_index_map: column_name_index_map.into(), |
| sg_columns: sg_columns.into(), |
| alias_columns: alias_columns.into(), |
| tracing_info: tracing_info.into(), |
| query_result: query_result.into(), |
| more_data: more_data.into(), |
| database: database.into(), |
| table_model: table_model.into(), |
| column_index2_ts_block_column_index_list: column_index2_ts_block_column_index_list.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSExecuteStatementResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<common::TSStatus> = None; |
| let mut f_2: Option<i64> = None; |
| let mut f_3: Option<Vec<String>> = None; |
| let mut f_4: Option<String> = None; |
| let mut f_5: Option<bool> = None; |
| let mut f_6: Option<Vec<String>> = None; |
| let mut f_7: Option<TSQueryDataSet> = None; |
| let mut f_8: Option<TSQueryNonAlignDataSet> = None; |
| let mut f_9: Option<BTreeMap<String, i32>> = None; |
| let mut f_10: Option<Vec<String>> = None; |
| let mut f_11: Option<Vec<i8>> = None; |
| let mut f_12: Option<TSTracingInfo> = None; |
| let mut f_13: Option<Vec<Vec<u8>>> = None; |
| let mut f_14: Option<bool> = None; |
| let mut f_15: Option<String> = None; |
| let mut f_16: Option<bool> = None; |
| let mut f_17: Option<Vec<i32>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i64()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_6 = i_prot.read_string()?; |
| val.push(list_elem_6); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_string()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_bool()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_7 = i_prot.read_string()?; |
| val.push(list_elem_7); |
| } |
| i_prot.read_list_end()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = TSQueryDataSet::read_from_in_protocol(i_prot)?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let val = TSQueryNonAlignDataSet::read_from_in_protocol(i_prot)?; |
| f_8 = Some(val); |
| }, |
| 9 => { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut val: BTreeMap<String, i32> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_8 = i_prot.read_string()?; |
| let map_val_9 = i_prot.read_i32()?; |
| val.insert(map_key_8, map_val_9); |
| } |
| i_prot.read_map_end()?; |
| f_9 = Some(val); |
| }, |
| 10 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_10 = i_prot.read_string()?; |
| val.push(list_elem_10); |
| } |
| i_prot.read_list_end()?; |
| f_10 = Some(val); |
| }, |
| 11 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i8> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_11 = i_prot.read_i8()?; |
| val.push(list_elem_11); |
| } |
| i_prot.read_list_end()?; |
| f_11 = Some(val); |
| }, |
| 12 => { |
| let val = TSTracingInfo::read_from_in_protocol(i_prot)?; |
| f_12 = Some(val); |
| }, |
| 13 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_12 = i_prot.read_bytes()?; |
| val.push(list_elem_12); |
| } |
| i_prot.read_list_end()?; |
| f_13 = Some(val); |
| }, |
| 14 => { |
| let val = i_prot.read_bool()?; |
| f_14 = Some(val); |
| }, |
| 15 => { |
| let val = i_prot.read_string()?; |
| f_15 = Some(val); |
| }, |
| 16 => { |
| let val = i_prot.read_bool()?; |
| f_16 = Some(val); |
| }, |
| 17 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_13 = i_prot.read_i32()?; |
| val.push(list_elem_13); |
| } |
| i_prot.read_list_end()?; |
| f_17 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSExecuteStatementResp.status", &f_1)?; |
| let ret = TSExecuteStatementResp { |
| status: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| query_id: f_2, |
| columns: f_3, |
| operation_type: f_4, |
| ignore_time_stamp: f_5, |
| data_type_list: f_6, |
| query_data_set: f_7, |
| non_align_query_data_set: f_8, |
| column_name_index_map: f_9, |
| sg_columns: f_10, |
| alias_columns: f_11, |
| tracing_info: f_12, |
| query_result: f_13, |
| more_data: f_14, |
| database: f_15, |
| table_model: f_16, |
| column_index2_ts_block_column_index_list: f_17, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSExecuteStatementResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?; |
| self.status.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.query_id { |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::I64, 2))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.columns { |
| o_prot.write_field_begin(&TFieldIdentifier::new("columns", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.operation_type { |
| o_prot.write_field_begin(&TFieldIdentifier::new("operationType", TType::String, 4))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.ignore_time_stamp { |
| o_prot.write_field_begin(&TFieldIdentifier::new("ignoreTimeStamp", TType::Bool, 5))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.data_type_list { |
| o_prot.write_field_begin(&TFieldIdentifier::new("dataTypeList", TType::List, 6))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.query_data_set { |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryDataSet", TType::Struct, 7))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.non_align_query_data_set { |
| o_prot.write_field_begin(&TFieldIdentifier::new("nonAlignQueryDataSet", TType::Struct, 8))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.column_name_index_map { |
| o_prot.write_field_begin(&TFieldIdentifier::new("columnNameIndexMap", TType::Map, 9))?; |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::I32, fld_var.len() as i32))?; |
| for (k, v) in fld_var { |
| o_prot.write_string(k)?; |
| o_prot.write_i32(*v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.sg_columns { |
| o_prot.write_field_begin(&TFieldIdentifier::new("sgColumns", TType::List, 10))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.alias_columns { |
| o_prot.write_field_begin(&TFieldIdentifier::new("aliasColumns", TType::List, 11))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I08, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_i8(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.tracing_info { |
| o_prot.write_field_begin(&TFieldIdentifier::new("tracingInfo", TType::Struct, 12))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.query_result { |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryResult", TType::List, 13))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.more_data { |
| o_prot.write_field_begin(&TFieldIdentifier::new("moreData", TType::Bool, 14))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.database { |
| o_prot.write_field_begin(&TFieldIdentifier::new("database", TType::String, 15))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.table_model { |
| o_prot.write_field_begin(&TFieldIdentifier::new("tableModel", TType::Bool, 16))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.column_index2_ts_block_column_index_list { |
| o_prot.write_field_begin(&TFieldIdentifier::new("columnIndex2TsBlockColumnIndexList", TType::List, 17))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSOpenSessionResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSOpenSessionResp { |
| pub status: common::TSStatus, |
| pub server_protocol_version: TSProtocolVersion, |
| pub session_id: Option<i64>, |
| pub configuration: Option<BTreeMap<String, String>>, |
| } |
| |
| impl TSOpenSessionResp { |
| pub fn new<F3, F4>(status: common::TSStatus, server_protocol_version: TSProtocolVersion, session_id: F3, configuration: F4) -> TSOpenSessionResp where F3: Into<Option<i64>>, F4: Into<Option<BTreeMap<String, String>>> { |
| TSOpenSessionResp { |
| status, |
| server_protocol_version, |
| session_id: session_id.into(), |
| configuration: configuration.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSOpenSessionResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<common::TSStatus> = None; |
| let mut f_2: Option<TSProtocolVersion> = None; |
| let mut f_3: Option<i64> = None; |
| let mut f_4: Option<BTreeMap<String, String>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = TSProtocolVersion::read_from_in_protocol(i_prot)?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i64()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut val: BTreeMap<String, String> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_14 = i_prot.read_string()?; |
| let map_val_15 = i_prot.read_string()?; |
| val.insert(map_key_14, map_val_15); |
| } |
| i_prot.read_map_end()?; |
| f_4 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSOpenSessionResp.status", &f_1)?; |
| verify_required_field_exists("TSOpenSessionResp.server_protocol_version", &f_2)?; |
| let ret = TSOpenSessionResp { |
| status: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| server_protocol_version: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| session_id: f_3, |
| configuration: f_4, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSOpenSessionResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?; |
| self.status.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("serverProtocolVersion", TType::I32, 2))?; |
| self.server_protocol_version.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.session_id { |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 3))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.configuration { |
| o_prot.write_field_begin(&TFieldIdentifier::new("configuration", TType::Map, 4))?; |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?; |
| for (k, v) in fld_var { |
| o_prot.write_string(k)?; |
| o_prot.write_string(v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSOpenSessionReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSOpenSessionReq { |
| pub client_protocol: TSProtocolVersion, |
| pub zone_id: String, |
| pub username: String, |
| pub password: Option<String>, |
| pub configuration: Option<BTreeMap<String, String>>, |
| } |
| |
| impl TSOpenSessionReq { |
| pub fn new<F4, F5>(client_protocol: TSProtocolVersion, zone_id: String, username: String, password: F4, configuration: F5) -> TSOpenSessionReq where F4: Into<Option<String>>, F5: Into<Option<BTreeMap<String, String>>> { |
| TSOpenSessionReq { |
| client_protocol, |
| zone_id, |
| username, |
| password: password.into(), |
| configuration: configuration.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSOpenSessionReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSProtocolVersion> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<String> = None; |
| let mut f_4: Option<String> = None; |
| let mut f_5: Option<BTreeMap<String, String>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSProtocolVersion::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_string()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut val: BTreeMap<String, String> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_16 = i_prot.read_string()?; |
| let map_val_17 = i_prot.read_string()?; |
| val.insert(map_key_16, map_val_17); |
| } |
| i_prot.read_map_end()?; |
| f_5 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSOpenSessionReq.client_protocol", &f_1)?; |
| verify_required_field_exists("TSOpenSessionReq.zone_id", &f_2)?; |
| verify_required_field_exists("TSOpenSessionReq.username", &f_3)?; |
| let ret = TSOpenSessionReq { |
| client_protocol: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| zone_id: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| username: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| password: f_4, |
| configuration: f_5, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSOpenSessionReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("client_protocol", TType::I32, 1))?; |
| self.client_protocol.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("zoneId", TType::String, 2))?; |
| o_prot.write_string(&self.zone_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("username", TType::String, 3))?; |
| o_prot.write_string(&self.username)?; |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.password { |
| o_prot.write_field_begin(&TFieldIdentifier::new("password", TType::String, 4))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.configuration { |
| o_prot.write_field_begin(&TFieldIdentifier::new("configuration", TType::Map, 5))?; |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?; |
| for (k, v) in fld_var { |
| o_prot.write_string(k)?; |
| o_prot.write_string(v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSCloseSessionReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSCloseSessionReq { |
| pub session_id: i64, |
| } |
| |
| impl TSCloseSessionReq { |
| pub fn new(session_id: i64) -> TSCloseSessionReq { |
| TSCloseSessionReq { |
| session_id, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCloseSessionReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSCloseSessionReq.session_id", &f_1)?; |
| let ret = TSCloseSessionReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSCloseSessionReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSExecuteStatementReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSExecuteStatementReq { |
| pub session_id: i64, |
| pub statement: String, |
| pub statement_id: i64, |
| pub fetch_size: Option<i32>, |
| pub timeout: Option<i64>, |
| pub enable_redirect_query: Option<bool>, |
| pub jdbc_query: Option<bool>, |
| } |
| |
| impl TSExecuteStatementReq { |
| pub fn new<F4, F5, F6, F7>(session_id: i64, statement: String, statement_id: i64, fetch_size: F4, timeout: F5, enable_redirect_query: F6, jdbc_query: F7) -> TSExecuteStatementReq where F4: Into<Option<i32>>, F5: Into<Option<i64>>, F6: Into<Option<bool>>, F7: Into<Option<bool>> { |
| TSExecuteStatementReq { |
| session_id, |
| statement, |
| statement_id, |
| fetch_size: fetch_size.into(), |
| timeout: timeout.into(), |
| enable_redirect_query: enable_redirect_query.into(), |
| jdbc_query: jdbc_query.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSExecuteStatementReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<i64> = None; |
| let mut f_4: Option<i32> = None; |
| let mut f_5: Option<i64> = None; |
| let mut f_6: Option<bool> = None; |
| let mut f_7: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i64()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i32()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i64()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_bool()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_bool()?; |
| f_7 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSExecuteStatementReq.session_id", &f_1)?; |
| verify_required_field_exists("TSExecuteStatementReq.statement", &f_2)?; |
| verify_required_field_exists("TSExecuteStatementReq.statement_id", &f_3)?; |
| let ret = TSExecuteStatementReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| statement: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| statement_id: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| fetch_size: f_4, |
| timeout: f_5, |
| enable_redirect_query: f_6, |
| jdbc_query: f_7, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSExecuteStatementReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("statement", TType::String, 2))?; |
| o_prot.write_string(&self.statement)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 3))?; |
| o_prot.write_i64(self.statement_id)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.fetch_size { |
| o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 4))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.timeout { |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeout", TType::I64, 5))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.enable_redirect_query { |
| o_prot.write_field_begin(&TFieldIdentifier::new("enableRedirectQuery", TType::Bool, 6))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.jdbc_query { |
| o_prot.write_field_begin(&TFieldIdentifier::new("jdbcQuery", TType::Bool, 7))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSExecuteBatchStatementReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSExecuteBatchStatementReq { |
| pub session_id: i64, |
| pub statements: Vec<String>, |
| } |
| |
| impl TSExecuteBatchStatementReq { |
| pub fn new(session_id: i64, statements: Vec<String>) -> TSExecuteBatchStatementReq { |
| TSExecuteBatchStatementReq { |
| session_id, |
| statements, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSExecuteBatchStatementReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_18 = i_prot.read_string()?; |
| val.push(list_elem_18); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSExecuteBatchStatementReq.session_id", &f_1)?; |
| verify_required_field_exists("TSExecuteBatchStatementReq.statements", &f_2)?; |
| let ret = TSExecuteBatchStatementReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| statements: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSExecuteBatchStatementReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("statements", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.statements.len() as i32))?; |
| for e in &self.statements { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSGetOperationStatusReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSGetOperationStatusReq { |
| pub session_id: i64, |
| pub query_id: i64, |
| } |
| |
| impl TSGetOperationStatusReq { |
| pub fn new(session_id: i64, query_id: i64) -> TSGetOperationStatusReq { |
| TSGetOperationStatusReq { |
| session_id, |
| query_id, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSGetOperationStatusReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i64()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSGetOperationStatusReq.session_id", &f_1)?; |
| verify_required_field_exists("TSGetOperationStatusReq.query_id", &f_2)?; |
| let ret = TSGetOperationStatusReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| query_id: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSGetOperationStatusReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::I64, 2))?; |
| o_prot.write_i64(self.query_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSCancelOperationReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSCancelOperationReq { |
| pub session_id: i64, |
| pub query_id: i64, |
| } |
| |
| impl TSCancelOperationReq { |
| pub fn new(session_id: i64, query_id: i64) -> TSCancelOperationReq { |
| TSCancelOperationReq { |
| session_id, |
| query_id, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCancelOperationReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i64()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSCancelOperationReq.session_id", &f_1)?; |
| verify_required_field_exists("TSCancelOperationReq.query_id", &f_2)?; |
| let ret = TSCancelOperationReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| query_id: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSCancelOperationReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::I64, 2))?; |
| o_prot.write_i64(self.query_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSCloseOperationReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSCloseOperationReq { |
| pub session_id: i64, |
| pub query_id: Option<i64>, |
| pub statement_id: Option<i64>, |
| pub prepared_statement_name: Option<String>, |
| } |
| |
| impl TSCloseOperationReq { |
| pub fn new<F2, F3, F4>(session_id: i64, query_id: F2, statement_id: F3, prepared_statement_name: F4) -> TSCloseOperationReq where F2: Into<Option<i64>>, F3: Into<Option<i64>>, F4: Into<Option<String>> { |
| TSCloseOperationReq { |
| session_id, |
| query_id: query_id.into(), |
| statement_id: statement_id.into(), |
| prepared_statement_name: prepared_statement_name.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCloseOperationReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<i64> = None; |
| let mut f_3: Option<i64> = None; |
| let mut f_4: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i64()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i64()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_string()?; |
| f_4 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSCloseOperationReq.session_id", &f_1)?; |
| let ret = TSCloseOperationReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| query_id: f_2, |
| statement_id: f_3, |
| prepared_statement_name: f_4, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSCloseOperationReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.query_id { |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::I64, 2))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.statement_id { |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 3))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.prepared_statement_name { |
| o_prot.write_field_begin(&TFieldIdentifier::new("preparedStatementName", TType::String, 4))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSPrepareReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSPrepareReq { |
| pub session_id: i64, |
| pub sql: String, |
| pub statement_name: String, |
| } |
| |
| impl TSPrepareReq { |
| pub fn new(session_id: i64, sql: String, statement_name: String) -> TSPrepareReq { |
| TSPrepareReq { |
| session_id, |
| sql, |
| statement_name, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSPrepareReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSPrepareReq.session_id", &f_1)?; |
| verify_required_field_exists("TSPrepareReq.sql", &f_2)?; |
| verify_required_field_exists("TSPrepareReq.statement_name", &f_3)?; |
| let ret = TSPrepareReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| sql: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| statement_name: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSPrepareReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sql", TType::String, 2))?; |
| o_prot.write_string(&self.sql)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementName", TType::String, 3))?; |
| o_prot.write_string(&self.statement_name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSPrepareResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSPrepareResp { |
| pub status: common::TSStatus, |
| pub parameter_count: Option<i32>, |
| } |
| |
| impl TSPrepareResp { |
| pub fn new<F2>(status: common::TSStatus, parameter_count: F2) -> TSPrepareResp where F2: Into<Option<i32>> { |
| TSPrepareResp { |
| status, |
| parameter_count: parameter_count.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSPrepareResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<common::TSStatus> = None; |
| let mut f_2: Option<i32> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i32()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSPrepareResp.status", &f_1)?; |
| let ret = TSPrepareResp { |
| status: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| parameter_count: f_2, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSPrepareResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?; |
| self.status.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.parameter_count { |
| o_prot.write_field_begin(&TFieldIdentifier::new("parameterCount", TType::I32, 2))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSExecutePreparedReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSExecutePreparedReq { |
| pub session_id: i64, |
| pub statement_name: String, |
| pub parameters: Vec<u8>, |
| pub fetch_size: Option<i32>, |
| pub timeout: Option<i64>, |
| pub statement_id: i64, |
| } |
| |
| impl TSExecutePreparedReq { |
| pub fn new<F4, F5>(session_id: i64, statement_name: String, parameters: Vec<u8>, fetch_size: F4, timeout: F5, statement_id: i64) -> TSExecutePreparedReq where F4: Into<Option<i32>>, F5: Into<Option<i64>> { |
| TSExecutePreparedReq { |
| session_id, |
| statement_name, |
| parameters, |
| fetch_size: fetch_size.into(), |
| timeout: timeout.into(), |
| statement_id, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSExecutePreparedReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<Vec<u8>> = None; |
| let mut f_4: Option<i32> = None; |
| let mut f_5: Option<i64> = None; |
| let mut f_6: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_bytes()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i32()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i64()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_i64()?; |
| f_6 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSExecutePreparedReq.session_id", &f_1)?; |
| verify_required_field_exists("TSExecutePreparedReq.statement_name", &f_2)?; |
| verify_required_field_exists("TSExecutePreparedReq.parameters", &f_3)?; |
| verify_required_field_exists("TSExecutePreparedReq.statement_id", &f_6)?; |
| let ret = TSExecutePreparedReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| statement_name: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| parameters: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| fetch_size: f_4, |
| timeout: f_5, |
| statement_id: f_6.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSExecutePreparedReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementName", TType::String, 2))?; |
| o_prot.write_string(&self.statement_name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("parameters", TType::String, 3))?; |
| o_prot.write_bytes(&self.parameters)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.fetch_size { |
| o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 4))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.timeout { |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeout", TType::I64, 5))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 6))?; |
| o_prot.write_i64(self.statement_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSDeallocatePreparedReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSDeallocatePreparedReq { |
| pub session_id: i64, |
| pub statement_name: String, |
| } |
| |
| impl TSDeallocatePreparedReq { |
| pub fn new(session_id: i64, statement_name: String) -> TSDeallocatePreparedReq { |
| TSDeallocatePreparedReq { |
| session_id, |
| statement_name, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSDeallocatePreparedReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSDeallocatePreparedReq.session_id", &f_1)?; |
| verify_required_field_exists("TSDeallocatePreparedReq.statement_name", &f_2)?; |
| let ret = TSDeallocatePreparedReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| statement_name: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSDeallocatePreparedReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementName", TType::String, 2))?; |
| o_prot.write_string(&self.statement_name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSFetchResultsReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSFetchResultsReq { |
| pub session_id: i64, |
| pub statement: String, |
| pub fetch_size: i32, |
| pub query_id: i64, |
| pub is_align: bool, |
| pub timeout: Option<i64>, |
| pub statement_id: Option<i64>, |
| } |
| |
| impl TSFetchResultsReq { |
| pub fn new<F6, F7>(session_id: i64, statement: String, fetch_size: i32, query_id: i64, is_align: bool, timeout: F6, statement_id: F7) -> TSFetchResultsReq where F6: Into<Option<i64>>, F7: Into<Option<i64>> { |
| TSFetchResultsReq { |
| session_id, |
| statement, |
| fetch_size, |
| query_id, |
| is_align, |
| timeout: timeout.into(), |
| statement_id: statement_id.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSFetchResultsReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<i32> = None; |
| let mut f_4: Option<i64> = None; |
| let mut f_5: Option<bool> = None; |
| let mut f_6: Option<i64> = None; |
| let mut f_7: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i32()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i64()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_bool()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_i64()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_i64()?; |
| f_7 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSFetchResultsReq.session_id", &f_1)?; |
| verify_required_field_exists("TSFetchResultsReq.statement", &f_2)?; |
| verify_required_field_exists("TSFetchResultsReq.fetch_size", &f_3)?; |
| verify_required_field_exists("TSFetchResultsReq.query_id", &f_4)?; |
| verify_required_field_exists("TSFetchResultsReq.is_align", &f_5)?; |
| let ret = TSFetchResultsReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| statement: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| fetch_size: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| query_id: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| is_align: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| timeout: f_6, |
| statement_id: f_7, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSFetchResultsReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("statement", TType::String, 2))?; |
| o_prot.write_string(&self.statement)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 3))?; |
| o_prot.write_i32(self.fetch_size)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryId", TType::I64, 4))?; |
| o_prot.write_i64(self.query_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAlign", TType::Bool, 5))?; |
| o_prot.write_bool(self.is_align)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.timeout { |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeout", TType::I64, 6))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.statement_id { |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 7))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSFetchResultsResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSFetchResultsResp { |
| pub status: common::TSStatus, |
| pub has_result_set: bool, |
| pub is_align: bool, |
| pub query_data_set: Option<TSQueryDataSet>, |
| pub non_align_query_data_set: Option<TSQueryNonAlignDataSet>, |
| pub query_result: Option<Vec<Vec<u8>>>, |
| pub more_data: Option<bool>, |
| } |
| |
| impl TSFetchResultsResp { |
| pub fn new<F4, F5, F6, F7>(status: common::TSStatus, has_result_set: bool, is_align: bool, query_data_set: F4, non_align_query_data_set: F5, query_result: F6, more_data: F7) -> TSFetchResultsResp where F4: Into<Option<TSQueryDataSet>>, F5: Into<Option<TSQueryNonAlignDataSet>>, F6: Into<Option<Vec<Vec<u8>>>>, F7: Into<Option<bool>> { |
| TSFetchResultsResp { |
| status, |
| has_result_set, |
| is_align, |
| query_data_set: query_data_set.into(), |
| non_align_query_data_set: non_align_query_data_set.into(), |
| query_result: query_result.into(), |
| more_data: more_data.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSFetchResultsResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<common::TSStatus> = None; |
| let mut f_2: Option<bool> = None; |
| let mut f_3: Option<bool> = None; |
| let mut f_4: Option<TSQueryDataSet> = None; |
| let mut f_5: Option<TSQueryNonAlignDataSet> = None; |
| let mut f_6: Option<Vec<Vec<u8>>> = None; |
| let mut f_7: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_bool()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_bool()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = TSQueryDataSet::read_from_in_protocol(i_prot)?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = TSQueryNonAlignDataSet::read_from_in_protocol(i_prot)?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_19 = i_prot.read_bytes()?; |
| val.push(list_elem_19); |
| } |
| i_prot.read_list_end()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_bool()?; |
| f_7 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSFetchResultsResp.status", &f_1)?; |
| verify_required_field_exists("TSFetchResultsResp.has_result_set", &f_2)?; |
| verify_required_field_exists("TSFetchResultsResp.is_align", &f_3)?; |
| let ret = TSFetchResultsResp { |
| status: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| has_result_set: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| is_align: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| query_data_set: f_4, |
| non_align_query_data_set: f_5, |
| query_result: f_6, |
| more_data: f_7, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSFetchResultsResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?; |
| self.status.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("hasResultSet", TType::Bool, 2))?; |
| o_prot.write_bool(self.has_result_set)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAlign", TType::Bool, 3))?; |
| o_prot.write_bool(self.is_align)?; |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.query_data_set { |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryDataSet", TType::Struct, 4))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.non_align_query_data_set { |
| o_prot.write_field_begin(&TFieldIdentifier::new("nonAlignQueryDataSet", TType::Struct, 5))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.query_result { |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryResult", TType::List, 6))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.more_data { |
| o_prot.write_field_begin(&TFieldIdentifier::new("moreData", TType::Bool, 7))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSFetchMetadataResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSFetchMetadataResp { |
| pub status: common::TSStatus, |
| pub metadata_in_json: Option<String>, |
| pub columns_list: Option<Vec<String>>, |
| pub data_type: Option<String>, |
| } |
| |
| impl TSFetchMetadataResp { |
| pub fn new<F2, F3, F4>(status: common::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>> { |
| TSFetchMetadataResp { |
| status, |
| metadata_in_json: metadata_in_json.into(), |
| columns_list: columns_list.into(), |
| data_type: data_type.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSFetchMetadataResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<common::TSStatus> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<Vec<String>> = None; |
| let mut f_4: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_20 = i_prot.read_string()?; |
| val.push(list_elem_20); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_string()?; |
| f_4 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSFetchMetadataResp.status", &f_1)?; |
| let ret = TSFetchMetadataResp { |
| status: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| metadata_in_json: f_2, |
| columns_list: f_3, |
| data_type: f_4, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSFetchMetadataResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?; |
| self.status.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.metadata_in_json { |
| o_prot.write_field_begin(&TFieldIdentifier::new("metadataInJson", TType::String, 2))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.columns_list { |
| o_prot.write_field_begin(&TFieldIdentifier::new("columnsList", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.data_type { |
| o_prot.write_field_begin(&TFieldIdentifier::new("dataType", TType::String, 4))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSFetchMetadataReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSFetchMetadataReq { |
| pub session_id: i64, |
| pub type_: String, |
| pub column_path: Option<String>, |
| } |
| |
| impl TSFetchMetadataReq { |
| pub fn new<F3>(session_id: i64, type_: String, column_path: F3) -> TSFetchMetadataReq where F3: Into<Option<String>> { |
| TSFetchMetadataReq { |
| session_id, |
| type_, |
| column_path: column_path.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSFetchMetadataReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSFetchMetadataReq.session_id", &f_1)?; |
| verify_required_field_exists("TSFetchMetadataReq.type_", &f_2)?; |
| let ret = TSFetchMetadataReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| type_: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| column_path: f_3, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSFetchMetadataReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("type", TType::String, 2))?; |
| o_prot.write_string(&self.type_)?; |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.column_path { |
| o_prot.write_field_begin(&TFieldIdentifier::new("columnPath", TType::String, 3))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSGetTimeZoneResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSGetTimeZoneResp { |
| pub status: common::TSStatus, |
| pub time_zone: String, |
| } |
| |
| impl TSGetTimeZoneResp { |
| pub fn new(status: common::TSStatus, time_zone: String) -> TSGetTimeZoneResp { |
| TSGetTimeZoneResp { |
| status, |
| time_zone, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSGetTimeZoneResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<common::TSStatus> = None; |
| let mut f_2: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSGetTimeZoneResp.status", &f_1)?; |
| verify_required_field_exists("TSGetTimeZoneResp.time_zone", &f_2)?; |
| let ret = TSGetTimeZoneResp { |
| status: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| time_zone: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSGetTimeZoneResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?; |
| self.status.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeZone", TType::String, 2))?; |
| o_prot.write_string(&self.time_zone)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSSetTimeZoneReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSSetTimeZoneReq { |
| pub session_id: i64, |
| pub time_zone: String, |
| } |
| |
| impl TSSetTimeZoneReq { |
| pub fn new(session_id: i64, time_zone: String) -> TSSetTimeZoneReq { |
| TSSetTimeZoneReq { |
| session_id, |
| time_zone, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSSetTimeZoneReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSSetTimeZoneReq.session_id", &f_1)?; |
| verify_required_field_exists("TSSetTimeZoneReq.time_zone", &f_2)?; |
| let ret = TSSetTimeZoneReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| time_zone: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSSetTimeZoneReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeZone", TType::String, 2))?; |
| o_prot.write_string(&self.time_zone)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSInsertRecordReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSInsertRecordReq { |
| pub session_id: i64, |
| pub prefix_path: String, |
| pub measurements: Vec<String>, |
| pub values: Vec<u8>, |
| pub timestamp: i64, |
| pub is_aligned: Option<bool>, |
| pub is_write_to_table: Option<bool>, |
| pub column_categoryies: Option<Vec<i8>>, |
| } |
| |
| impl TSInsertRecordReq { |
| pub fn new<F6, F7, F8>(session_id: i64, prefix_path: String, measurements: Vec<String>, values: Vec<u8>, timestamp: i64, is_aligned: F6, is_write_to_table: F7, column_categoryies: F8) -> TSInsertRecordReq where F6: Into<Option<bool>>, F7: Into<Option<bool>>, F8: Into<Option<Vec<i8>>> { |
| TSInsertRecordReq { |
| session_id, |
| prefix_path, |
| measurements, |
| values, |
| timestamp, |
| is_aligned: is_aligned.into(), |
| is_write_to_table: is_write_to_table.into(), |
| column_categoryies: column_categoryies.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertRecordReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<Vec<String>> = None; |
| let mut f_4: Option<Vec<u8>> = None; |
| let mut f_5: Option<i64> = None; |
| let mut f_6: Option<bool> = None; |
| let mut f_7: Option<bool> = None; |
| let mut f_8: Option<Vec<i8>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_21 = i_prot.read_string()?; |
| val.push(list_elem_21); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_bytes()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i64()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_bool()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_bool()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i8> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_22 = i_prot.read_i8()?; |
| val.push(list_elem_22); |
| } |
| i_prot.read_list_end()?; |
| f_8 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSInsertRecordReq.session_id", &f_1)?; |
| verify_required_field_exists("TSInsertRecordReq.prefix_path", &f_2)?; |
| verify_required_field_exists("TSInsertRecordReq.measurements", &f_3)?; |
| verify_required_field_exists("TSInsertRecordReq.values", &f_4)?; |
| verify_required_field_exists("TSInsertRecordReq.timestamp", &f_5)?; |
| let ret = TSInsertRecordReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_path: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| measurements: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| values: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| timestamp: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| is_aligned: f_6, |
| is_write_to_table: f_7, |
| column_categoryies: f_8, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSInsertRecordReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPath", TType::String, 2))?; |
| o_prot.write_string(&self.prefix_path)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurements", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.measurements.len() as i32))?; |
| for e in &self.measurements { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::String, 4))?; |
| o_prot.write_bytes(&self.values)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timestamp", TType::I64, 5))?; |
| o_prot.write_i64(self.timestamp)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.is_aligned { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAligned", TType::Bool, 6))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.is_write_to_table { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isWriteToTable", TType::Bool, 7))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.column_categoryies { |
| o_prot.write_field_begin(&TFieldIdentifier::new("columnCategoryies", TType::List, 8))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I08, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_i8(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSInsertStringRecordReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSInsertStringRecordReq { |
| pub session_id: i64, |
| pub prefix_path: String, |
| pub measurements: Vec<String>, |
| pub values: Vec<String>, |
| pub timestamp: i64, |
| pub is_aligned: Option<bool>, |
| pub timeout: Option<i64>, |
| } |
| |
| impl TSInsertStringRecordReq { |
| pub fn new<F6, F7>(session_id: i64, prefix_path: String, measurements: Vec<String>, values: Vec<String>, timestamp: i64, is_aligned: F6, timeout: F7) -> TSInsertStringRecordReq where F6: Into<Option<bool>>, F7: Into<Option<i64>> { |
| TSInsertStringRecordReq { |
| session_id, |
| prefix_path, |
| measurements, |
| values, |
| timestamp, |
| is_aligned: is_aligned.into(), |
| timeout: timeout.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertStringRecordReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<Vec<String>> = None; |
| let mut f_4: Option<Vec<String>> = None; |
| let mut f_5: Option<i64> = None; |
| let mut f_6: Option<bool> = None; |
| let mut f_7: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_23 = i_prot.read_string()?; |
| val.push(list_elem_23); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_24 = i_prot.read_string()?; |
| val.push(list_elem_24); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i64()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_bool()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_i64()?; |
| f_7 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSInsertStringRecordReq.session_id", &f_1)?; |
| verify_required_field_exists("TSInsertStringRecordReq.prefix_path", &f_2)?; |
| verify_required_field_exists("TSInsertStringRecordReq.measurements", &f_3)?; |
| verify_required_field_exists("TSInsertStringRecordReq.values", &f_4)?; |
| verify_required_field_exists("TSInsertStringRecordReq.timestamp", &f_5)?; |
| let ret = TSInsertStringRecordReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_path: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| measurements: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| values: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| timestamp: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| is_aligned: f_6, |
| timeout: f_7, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSInsertStringRecordReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPath", TType::String, 2))?; |
| o_prot.write_string(&self.prefix_path)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurements", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.measurements.len() as i32))?; |
| for e in &self.measurements { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.values.len() as i32))?; |
| for e in &self.values { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timestamp", TType::I64, 5))?; |
| o_prot.write_i64(self.timestamp)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.is_aligned { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAligned", TType::Bool, 6))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.timeout { |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeout", TType::I64, 7))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSInsertTabletReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSInsertTabletReq { |
| pub session_id: i64, |
| pub prefix_path: String, |
| pub measurements: Vec<String>, |
| pub values: Vec<u8>, |
| pub timestamps: Vec<u8>, |
| pub types: Vec<i32>, |
| pub size: i32, |
| pub is_aligned: Option<bool>, |
| pub write_to_table: Option<bool>, |
| pub column_categories: Option<Vec<i8>>, |
| pub is_compressed: Option<bool>, |
| pub encoding_types: Option<Vec<i8>>, |
| pub compress_type: Option<i8>, |
| } |
| |
| impl TSInsertTabletReq { |
| pub fn new<F8, F9, F10, F11, F12, F13>(session_id: i64, prefix_path: String, measurements: Vec<String>, values: Vec<u8>, timestamps: Vec<u8>, types: Vec<i32>, size: i32, is_aligned: F8, write_to_table: F9, column_categories: F10, is_compressed: F11, encoding_types: F12, compress_type: F13) -> TSInsertTabletReq where F8: Into<Option<bool>>, F9: Into<Option<bool>>, F10: Into<Option<Vec<i8>>>, F11: Into<Option<bool>>, F12: Into<Option<Vec<i8>>>, F13: Into<Option<i8>> { |
| TSInsertTabletReq { |
| session_id, |
| prefix_path, |
| measurements, |
| values, |
| timestamps, |
| types, |
| size, |
| is_aligned: is_aligned.into(), |
| write_to_table: write_to_table.into(), |
| column_categories: column_categories.into(), |
| is_compressed: is_compressed.into(), |
| encoding_types: encoding_types.into(), |
| compress_type: compress_type.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertTabletReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<Vec<String>> = None; |
| let mut f_4: Option<Vec<u8>> = None; |
| let mut f_5: Option<Vec<u8>> = None; |
| let mut f_6: Option<Vec<i32>> = None; |
| let mut f_7: Option<i32> = None; |
| let mut f_8: Option<bool> = None; |
| let mut f_9: Option<bool> = None; |
| let mut f_10: Option<Vec<i8>> = None; |
| let mut f_11: Option<bool> = None; |
| let mut f_12: Option<Vec<i8>> = None; |
| let mut f_13: Option<i8> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_25 = i_prot.read_string()?; |
| val.push(list_elem_25); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_bytes()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_bytes()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_26 = i_prot.read_i32()?; |
| val.push(list_elem_26); |
| } |
| i_prot.read_list_end()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_i32()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let val = i_prot.read_bool()?; |
| f_8 = Some(val); |
| }, |
| 9 => { |
| let val = i_prot.read_bool()?; |
| f_9 = Some(val); |
| }, |
| 10 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i8> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_27 = i_prot.read_i8()?; |
| val.push(list_elem_27); |
| } |
| i_prot.read_list_end()?; |
| f_10 = Some(val); |
| }, |
| 11 => { |
| let val = i_prot.read_bool()?; |
| f_11 = Some(val); |
| }, |
| 12 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i8> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_28 = i_prot.read_i8()?; |
| val.push(list_elem_28); |
| } |
| i_prot.read_list_end()?; |
| f_12 = Some(val); |
| }, |
| 13 => { |
| let val = i_prot.read_i8()?; |
| f_13 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSInsertTabletReq.session_id", &f_1)?; |
| verify_required_field_exists("TSInsertTabletReq.prefix_path", &f_2)?; |
| verify_required_field_exists("TSInsertTabletReq.measurements", &f_3)?; |
| verify_required_field_exists("TSInsertTabletReq.values", &f_4)?; |
| verify_required_field_exists("TSInsertTabletReq.timestamps", &f_5)?; |
| verify_required_field_exists("TSInsertTabletReq.types", &f_6)?; |
| verify_required_field_exists("TSInsertTabletReq.size", &f_7)?; |
| let ret = TSInsertTabletReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_path: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| measurements: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| values: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| timestamps: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| types: f_6.expect("auto-generated code should have checked for presence of required fields"), |
| size: f_7.expect("auto-generated code should have checked for presence of required fields"), |
| is_aligned: f_8, |
| write_to_table: f_9, |
| column_categories: f_10, |
| is_compressed: f_11, |
| encoding_types: f_12, |
| compress_type: f_13, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSInsertTabletReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPath", TType::String, 2))?; |
| o_prot.write_string(&self.prefix_path)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurements", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.measurements.len() as i32))?; |
| for e in &self.measurements { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("values", TType::String, 4))?; |
| o_prot.write_bytes(&self.values)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timestamps", TType::String, 5))?; |
| o_prot.write_bytes(&self.timestamps)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("types", TType::List, 6))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.types.len() as i32))?; |
| for e in &self.types { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("size", TType::I32, 7))?; |
| o_prot.write_i32(self.size)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.is_aligned { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAligned", TType::Bool, 8))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.write_to_table { |
| o_prot.write_field_begin(&TFieldIdentifier::new("writeToTable", TType::Bool, 9))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.column_categories { |
| o_prot.write_field_begin(&TFieldIdentifier::new("columnCategories", TType::List, 10))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I08, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_i8(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.is_compressed { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isCompressed", TType::Bool, 11))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.encoding_types { |
| o_prot.write_field_begin(&TFieldIdentifier::new("encodingTypes", TType::List, 12))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I08, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_i8(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.compress_type { |
| o_prot.write_field_begin(&TFieldIdentifier::new("compressType", TType::I08, 13))?; |
| o_prot.write_i8(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSInsertTabletsReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSInsertTabletsReq { |
| pub session_id: i64, |
| pub prefix_paths: Vec<String>, |
| pub measurements_list: Vec<Vec<String>>, |
| pub values_list: Vec<Vec<u8>>, |
| pub timestamps_list: Vec<Vec<u8>>, |
| pub types_list: Vec<Vec<i32>>, |
| pub size_list: Vec<i32>, |
| pub is_aligned: Option<bool>, |
| } |
| |
| impl TSInsertTabletsReq { |
| pub fn new<F8>(session_id: i64, prefix_paths: 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>, is_aligned: F8) -> TSInsertTabletsReq where F8: Into<Option<bool>> { |
| TSInsertTabletsReq { |
| session_id, |
| prefix_paths, |
| measurements_list, |
| values_list, |
| timestamps_list, |
| types_list, |
| size_list, |
| is_aligned: is_aligned.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertTabletsReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| let mut f_3: Option<Vec<Vec<String>>> = None; |
| let mut f_4: Option<Vec<Vec<u8>>> = None; |
| let mut f_5: Option<Vec<Vec<u8>>> = None; |
| let mut f_6: Option<Vec<Vec<i32>>> = None; |
| let mut f_7: Option<Vec<i32>> = None; |
| let mut f_8: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_29 = i_prot.read_string()?; |
| val.push(list_elem_29); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut list_elem_30: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_31 = i_prot.read_string()?; |
| list_elem_30.push(list_elem_31); |
| } |
| i_prot.read_list_end()?; |
| val.push(list_elem_30); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_32 = i_prot.read_bytes()?; |
| val.push(list_elem_32); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_33 = i_prot.read_bytes()?; |
| val.push(list_elem_33); |
| } |
| i_prot.read_list_end()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<i32>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut list_elem_34: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_35 = i_prot.read_i32()?; |
| list_elem_34.push(list_elem_35); |
| } |
| i_prot.read_list_end()?; |
| val.push(list_elem_34); |
| } |
| i_prot.read_list_end()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_36 = i_prot.read_i32()?; |
| val.push(list_elem_36); |
| } |
| i_prot.read_list_end()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let val = i_prot.read_bool()?; |
| f_8 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSInsertTabletsReq.session_id", &f_1)?; |
| verify_required_field_exists("TSInsertTabletsReq.prefix_paths", &f_2)?; |
| verify_required_field_exists("TSInsertTabletsReq.measurements_list", &f_3)?; |
| verify_required_field_exists("TSInsertTabletsReq.values_list", &f_4)?; |
| verify_required_field_exists("TSInsertTabletsReq.timestamps_list", &f_5)?; |
| verify_required_field_exists("TSInsertTabletsReq.types_list", &f_6)?; |
| verify_required_field_exists("TSInsertTabletsReq.size_list", &f_7)?; |
| let ret = TSInsertTabletsReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_paths: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| measurements_list: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| values_list: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| timestamps_list: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| types_list: f_6.expect("auto-generated code should have checked for presence of required fields"), |
| size_list: f_7.expect("auto-generated code should have checked for presence of required fields"), |
| is_aligned: f_8, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSInsertTabletsReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPaths", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.prefix_paths.len() as i32))?; |
| for e in &self.prefix_paths { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurementsList", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.measurements_list.len() as i32))?; |
| for e in &self.measurements_list { |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?; |
| for e in e { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("valuesList", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.values_list.len() as i32))?; |
| for e in &self.values_list { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timestampsList", TType::List, 5))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.timestamps_list.len() as i32))?; |
| for e in &self.timestamps_list { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("typesList", TType::List, 6))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.types_list.len() as i32))?; |
| for e in &self.types_list { |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, e.len() as i32))?; |
| for e in e { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sizeList", TType::List, 7))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.size_list.len() as i32))?; |
| for e in &self.size_list { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.is_aligned { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAligned", TType::Bool, 8))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSInsertRecordsReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSInsertRecordsReq { |
| pub session_id: i64, |
| pub prefix_paths: Vec<String>, |
| pub measurements_list: Vec<Vec<String>>, |
| pub values_list: Vec<Vec<u8>>, |
| pub timestamps: Vec<i64>, |
| pub is_aligned: Option<bool>, |
| } |
| |
| impl TSInsertRecordsReq { |
| pub fn new<F6>(session_id: i64, prefix_paths: Vec<String>, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<u8>>, timestamps: Vec<i64>, is_aligned: F6) -> TSInsertRecordsReq where F6: Into<Option<bool>> { |
| TSInsertRecordsReq { |
| session_id, |
| prefix_paths, |
| measurements_list, |
| values_list, |
| timestamps, |
| is_aligned: is_aligned.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertRecordsReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| let mut f_3: Option<Vec<Vec<String>>> = None; |
| let mut f_4: Option<Vec<Vec<u8>>> = None; |
| let mut f_5: Option<Vec<i64>> = None; |
| let mut f_6: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_37 = i_prot.read_string()?; |
| val.push(list_elem_37); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut list_elem_38: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_39 = i_prot.read_string()?; |
| list_elem_38.push(list_elem_39); |
| } |
| i_prot.read_list_end()?; |
| val.push(list_elem_38); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_40 = i_prot.read_bytes()?; |
| val.push(list_elem_40); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i64> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_41 = i_prot.read_i64()?; |
| val.push(list_elem_41); |
| } |
| i_prot.read_list_end()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_bool()?; |
| f_6 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSInsertRecordsReq.session_id", &f_1)?; |
| verify_required_field_exists("TSInsertRecordsReq.prefix_paths", &f_2)?; |
| verify_required_field_exists("TSInsertRecordsReq.measurements_list", &f_3)?; |
| verify_required_field_exists("TSInsertRecordsReq.values_list", &f_4)?; |
| verify_required_field_exists("TSInsertRecordsReq.timestamps", &f_5)?; |
| let ret = TSInsertRecordsReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_paths: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| measurements_list: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| values_list: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| timestamps: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| is_aligned: f_6, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSInsertRecordsReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPaths", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.prefix_paths.len() as i32))?; |
| for e in &self.prefix_paths { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurementsList", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.measurements_list.len() as i32))?; |
| for e in &self.measurements_list { |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?; |
| for e in e { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("valuesList", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.values_list.len() as i32))?; |
| for e in &self.values_list { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timestamps", TType::List, 5))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I64, self.timestamps.len() as i32))?; |
| for e in &self.timestamps { |
| o_prot.write_i64(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.is_aligned { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAligned", TType::Bool, 6))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSInsertRecordsOfOneDeviceReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSInsertRecordsOfOneDeviceReq { |
| pub session_id: i64, |
| pub prefix_path: String, |
| pub measurements_list: Vec<Vec<String>>, |
| pub values_list: Vec<Vec<u8>>, |
| pub timestamps: Vec<i64>, |
| pub is_aligned: Option<bool>, |
| } |
| |
| impl TSInsertRecordsOfOneDeviceReq { |
| pub fn new<F6>(session_id: i64, prefix_path: String, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<u8>>, timestamps: Vec<i64>, is_aligned: F6) -> TSInsertRecordsOfOneDeviceReq where F6: Into<Option<bool>> { |
| TSInsertRecordsOfOneDeviceReq { |
| session_id, |
| prefix_path, |
| measurements_list, |
| values_list, |
| timestamps, |
| is_aligned: is_aligned.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertRecordsOfOneDeviceReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<Vec<Vec<String>>> = None; |
| let mut f_4: Option<Vec<Vec<u8>>> = None; |
| let mut f_5: Option<Vec<i64>> = None; |
| let mut f_6: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut list_elem_42: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_43 = i_prot.read_string()?; |
| list_elem_42.push(list_elem_43); |
| } |
| i_prot.read_list_end()?; |
| val.push(list_elem_42); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_44 = i_prot.read_bytes()?; |
| val.push(list_elem_44); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i64> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_45 = i_prot.read_i64()?; |
| val.push(list_elem_45); |
| } |
| i_prot.read_list_end()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_bool()?; |
| f_6 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSInsertRecordsOfOneDeviceReq.session_id", &f_1)?; |
| verify_required_field_exists("TSInsertRecordsOfOneDeviceReq.prefix_path", &f_2)?; |
| verify_required_field_exists("TSInsertRecordsOfOneDeviceReq.measurements_list", &f_3)?; |
| verify_required_field_exists("TSInsertRecordsOfOneDeviceReq.values_list", &f_4)?; |
| verify_required_field_exists("TSInsertRecordsOfOneDeviceReq.timestamps", &f_5)?; |
| let ret = TSInsertRecordsOfOneDeviceReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_path: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| measurements_list: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| values_list: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| timestamps: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| is_aligned: f_6, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSInsertRecordsOfOneDeviceReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPath", TType::String, 2))?; |
| o_prot.write_string(&self.prefix_path)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurementsList", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.measurements_list.len() as i32))?; |
| for e in &self.measurements_list { |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?; |
| for e in e { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("valuesList", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.values_list.len() as i32))?; |
| for e in &self.values_list { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timestamps", TType::List, 5))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I64, self.timestamps.len() as i32))?; |
| for e in &self.timestamps { |
| o_prot.write_i64(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.is_aligned { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAligned", TType::Bool, 6))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSInsertStringRecordsOfOneDeviceReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSInsertStringRecordsOfOneDeviceReq { |
| pub session_id: i64, |
| pub prefix_path: String, |
| pub measurements_list: Vec<Vec<String>>, |
| pub values_list: Vec<Vec<String>>, |
| pub timestamps: Vec<i64>, |
| pub is_aligned: Option<bool>, |
| } |
| |
| impl TSInsertStringRecordsOfOneDeviceReq { |
| pub fn new<F6>(session_id: i64, prefix_path: String, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<String>>, timestamps: Vec<i64>, is_aligned: F6) -> TSInsertStringRecordsOfOneDeviceReq where F6: Into<Option<bool>> { |
| TSInsertStringRecordsOfOneDeviceReq { |
| session_id, |
| prefix_path, |
| measurements_list, |
| values_list, |
| timestamps, |
| is_aligned: is_aligned.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertStringRecordsOfOneDeviceReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<Vec<Vec<String>>> = None; |
| let mut f_4: Option<Vec<Vec<String>>> = None; |
| let mut f_5: Option<Vec<i64>> = None; |
| let mut f_6: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut list_elem_46: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_47 = i_prot.read_string()?; |
| list_elem_46.push(list_elem_47); |
| } |
| i_prot.read_list_end()?; |
| val.push(list_elem_46); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut list_elem_48: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_49 = i_prot.read_string()?; |
| list_elem_48.push(list_elem_49); |
| } |
| i_prot.read_list_end()?; |
| val.push(list_elem_48); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i64> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_50 = i_prot.read_i64()?; |
| val.push(list_elem_50); |
| } |
| i_prot.read_list_end()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_bool()?; |
| f_6 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSInsertStringRecordsOfOneDeviceReq.session_id", &f_1)?; |
| verify_required_field_exists("TSInsertStringRecordsOfOneDeviceReq.prefix_path", &f_2)?; |
| verify_required_field_exists("TSInsertStringRecordsOfOneDeviceReq.measurements_list", &f_3)?; |
| verify_required_field_exists("TSInsertStringRecordsOfOneDeviceReq.values_list", &f_4)?; |
| verify_required_field_exists("TSInsertStringRecordsOfOneDeviceReq.timestamps", &f_5)?; |
| let ret = TSInsertStringRecordsOfOneDeviceReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_path: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| measurements_list: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| values_list: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| timestamps: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| is_aligned: f_6, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSInsertStringRecordsOfOneDeviceReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPath", TType::String, 2))?; |
| o_prot.write_string(&self.prefix_path)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurementsList", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.measurements_list.len() as i32))?; |
| for e in &self.measurements_list { |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?; |
| for e in e { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("valuesList", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.values_list.len() as i32))?; |
| for e in &self.values_list { |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?; |
| for e in e { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timestamps", TType::List, 5))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I64, self.timestamps.len() as i32))?; |
| for e in &self.timestamps { |
| o_prot.write_i64(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.is_aligned { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAligned", TType::Bool, 6))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSInsertStringRecordsReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSInsertStringRecordsReq { |
| pub session_id: i64, |
| pub prefix_paths: Vec<String>, |
| pub measurements_list: Vec<Vec<String>>, |
| pub values_list: Vec<Vec<String>>, |
| pub timestamps: Vec<i64>, |
| pub is_aligned: Option<bool>, |
| } |
| |
| impl TSInsertStringRecordsReq { |
| pub fn new<F6>(session_id: i64, prefix_paths: Vec<String>, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<String>>, timestamps: Vec<i64>, is_aligned: F6) -> TSInsertStringRecordsReq where F6: Into<Option<bool>> { |
| TSInsertStringRecordsReq { |
| session_id, |
| prefix_paths, |
| measurements_list, |
| values_list, |
| timestamps, |
| is_aligned: is_aligned.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSInsertStringRecordsReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| let mut f_3: Option<Vec<Vec<String>>> = None; |
| let mut f_4: Option<Vec<Vec<String>>> = None; |
| let mut f_5: Option<Vec<i64>> = None; |
| let mut f_6: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_51 = i_prot.read_string()?; |
| val.push(list_elem_51); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut list_elem_52: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_53 = i_prot.read_string()?; |
| list_elem_52.push(list_elem_53); |
| } |
| i_prot.read_list_end()?; |
| val.push(list_elem_52); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut list_elem_54: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_55 = i_prot.read_string()?; |
| list_elem_54.push(list_elem_55); |
| } |
| i_prot.read_list_end()?; |
| val.push(list_elem_54); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i64> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_56 = i_prot.read_i64()?; |
| val.push(list_elem_56); |
| } |
| i_prot.read_list_end()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_bool()?; |
| f_6 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSInsertStringRecordsReq.session_id", &f_1)?; |
| verify_required_field_exists("TSInsertStringRecordsReq.prefix_paths", &f_2)?; |
| verify_required_field_exists("TSInsertStringRecordsReq.measurements_list", &f_3)?; |
| verify_required_field_exists("TSInsertStringRecordsReq.values_list", &f_4)?; |
| verify_required_field_exists("TSInsertStringRecordsReq.timestamps", &f_5)?; |
| let ret = TSInsertStringRecordsReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_paths: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| measurements_list: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| values_list: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| timestamps: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| is_aligned: f_6, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSInsertStringRecordsReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPaths", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.prefix_paths.len() as i32))?; |
| for e in &self.prefix_paths { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurementsList", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.measurements_list.len() as i32))?; |
| for e in &self.measurements_list { |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?; |
| for e in e { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("valuesList", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::List, self.values_list.len() as i32))?; |
| for e in &self.values_list { |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, e.len() as i32))?; |
| for e in e { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timestamps", TType::List, 5))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I64, self.timestamps.len() as i32))?; |
| for e in &self.timestamps { |
| o_prot.write_i64(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.is_aligned { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAligned", TType::Bool, 6))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSDeleteDataReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSDeleteDataReq { |
| pub session_id: i64, |
| pub paths: Vec<String>, |
| pub start_time: i64, |
| pub end_time: i64, |
| } |
| |
| impl TSDeleteDataReq { |
| pub fn new(session_id: i64, paths: Vec<String>, start_time: i64, end_time: i64) -> TSDeleteDataReq { |
| TSDeleteDataReq { |
| session_id, |
| paths, |
| start_time, |
| end_time, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSDeleteDataReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| let mut f_3: Option<i64> = None; |
| let mut f_4: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_57 = i_prot.read_string()?; |
| val.push(list_elem_57); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i64()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i64()?; |
| f_4 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSDeleteDataReq.session_id", &f_1)?; |
| verify_required_field_exists("TSDeleteDataReq.paths", &f_2)?; |
| verify_required_field_exists("TSDeleteDataReq.start_time", &f_3)?; |
| verify_required_field_exists("TSDeleteDataReq.end_time", &f_4)?; |
| let ret = TSDeleteDataReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| paths: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| start_time: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| end_time: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSDeleteDataReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("paths", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.paths.len() as i32))?; |
| for e in &self.paths { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("startTime", TType::I64, 3))?; |
| o_prot.write_i64(self.start_time)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("endTime", TType::I64, 4))?; |
| o_prot.write_i64(self.end_time)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSCreateTimeseriesReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSCreateTimeseriesReq { |
| pub session_id: i64, |
| pub path: String, |
| pub data_type: i32, |
| pub encoding: i32, |
| pub compressor: i32, |
| pub props: Option<BTreeMap<String, String>>, |
| pub tags: Option<BTreeMap<String, String>>, |
| pub attributes: Option<BTreeMap<String, String>>, |
| pub measurement_alias: Option<String>, |
| } |
| |
| impl TSCreateTimeseriesReq { |
| 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>> { |
| TSCreateTimeseriesReq { |
| session_id, |
| path, |
| data_type, |
| encoding, |
| compressor, |
| props: props.into(), |
| tags: tags.into(), |
| attributes: attributes.into(), |
| measurement_alias: measurement_alias.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCreateTimeseriesReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<i32> = None; |
| let mut f_4: Option<i32> = None; |
| let mut f_5: Option<i32> = None; |
| let mut f_6: Option<BTreeMap<String, String>> = None; |
| let mut f_7: Option<BTreeMap<String, String>> = None; |
| let mut f_8: Option<BTreeMap<String, String>> = None; |
| let mut f_9: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i32()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i32()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i32()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut val: BTreeMap<String, String> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_58 = i_prot.read_string()?; |
| let map_val_59 = i_prot.read_string()?; |
| val.insert(map_key_58, map_val_59); |
| } |
| i_prot.read_map_end()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut val: BTreeMap<String, String> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_60 = i_prot.read_string()?; |
| let map_val_61 = i_prot.read_string()?; |
| val.insert(map_key_60, map_val_61); |
| } |
| i_prot.read_map_end()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut val: BTreeMap<String, String> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_62 = i_prot.read_string()?; |
| let map_val_63 = i_prot.read_string()?; |
| val.insert(map_key_62, map_val_63); |
| } |
| i_prot.read_map_end()?; |
| f_8 = Some(val); |
| }, |
| 9 => { |
| let val = i_prot.read_string()?; |
| f_9 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSCreateTimeseriesReq.session_id", &f_1)?; |
| verify_required_field_exists("TSCreateTimeseriesReq.path", &f_2)?; |
| verify_required_field_exists("TSCreateTimeseriesReq.data_type", &f_3)?; |
| verify_required_field_exists("TSCreateTimeseriesReq.encoding", &f_4)?; |
| verify_required_field_exists("TSCreateTimeseriesReq.compressor", &f_5)?; |
| let ret = TSCreateTimeseriesReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| path: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| data_type: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| encoding: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| compressor: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| props: f_6, |
| tags: f_7, |
| attributes: f_8, |
| measurement_alias: f_9, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSCreateTimeseriesReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("path", TType::String, 2))?; |
| o_prot.write_string(&self.path)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("dataType", TType::I32, 3))?; |
| o_prot.write_i32(self.data_type)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("encoding", TType::I32, 4))?; |
| o_prot.write_i32(self.encoding)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("compressor", TType::I32, 5))?; |
| o_prot.write_i32(self.compressor)?; |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.props { |
| o_prot.write_field_begin(&TFieldIdentifier::new("props", TType::Map, 6))?; |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?; |
| for (k, v) in fld_var { |
| o_prot.write_string(k)?; |
| o_prot.write_string(v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.tags { |
| o_prot.write_field_begin(&TFieldIdentifier::new("tags", TType::Map, 7))?; |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?; |
| for (k, v) in fld_var { |
| o_prot.write_string(k)?; |
| o_prot.write_string(v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.attributes { |
| o_prot.write_field_begin(&TFieldIdentifier::new("attributes", TType::Map, 8))?; |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, fld_var.len() as i32))?; |
| for (k, v) in fld_var { |
| o_prot.write_string(k)?; |
| o_prot.write_string(v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.measurement_alias { |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurementAlias", TType::String, 9))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSCreateAlignedTimeseriesReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSCreateAlignedTimeseriesReq { |
| pub session_id: i64, |
| pub prefix_path: String, |
| pub measurements: Vec<String>, |
| pub data_types: Vec<i32>, |
| pub encodings: Vec<i32>, |
| pub compressors: Vec<i32>, |
| pub measurement_alias: Option<Vec<String>>, |
| pub tags_list: Option<Vec<BTreeMap<String, String>>>, |
| pub attributes_list: Option<Vec<BTreeMap<String, String>>>, |
| } |
| |
| impl TSCreateAlignedTimeseriesReq { |
| pub fn new<F7, F8, F9>(session_id: i64, prefix_path: String, measurements: Vec<String>, data_types: Vec<i32>, encodings: Vec<i32>, compressors: Vec<i32>, measurement_alias: F7, tags_list: F8, attributes_list: F9) -> TSCreateAlignedTimeseriesReq where F7: Into<Option<Vec<String>>>, F8: Into<Option<Vec<BTreeMap<String, String>>>>, F9: Into<Option<Vec<BTreeMap<String, String>>>> { |
| TSCreateAlignedTimeseriesReq { |
| session_id, |
| prefix_path, |
| measurements, |
| data_types, |
| encodings, |
| compressors, |
| measurement_alias: measurement_alias.into(), |
| tags_list: tags_list.into(), |
| attributes_list: attributes_list.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCreateAlignedTimeseriesReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<Vec<String>> = None; |
| let mut f_4: Option<Vec<i32>> = None; |
| let mut f_5: Option<Vec<i32>> = None; |
| let mut f_6: Option<Vec<i32>> = None; |
| let mut f_7: Option<Vec<String>> = None; |
| let mut f_8: Option<Vec<BTreeMap<String, String>>> = None; |
| let mut f_9: Option<Vec<BTreeMap<String, String>>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_64 = i_prot.read_string()?; |
| val.push(list_elem_64); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_65 = i_prot.read_i32()?; |
| val.push(list_elem_65); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_66 = i_prot.read_i32()?; |
| val.push(list_elem_66); |
| } |
| i_prot.read_list_end()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_67 = i_prot.read_i32()?; |
| val.push(list_elem_67); |
| } |
| i_prot.read_list_end()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_68 = i_prot.read_string()?; |
| val.push(list_elem_68); |
| } |
| i_prot.read_list_end()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<BTreeMap<String, String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut list_elem_69: BTreeMap<String, String> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_70 = i_prot.read_string()?; |
| let map_val_71 = i_prot.read_string()?; |
| list_elem_69.insert(map_key_70, map_val_71); |
| } |
| i_prot.read_map_end()?; |
| val.push(list_elem_69); |
| } |
| i_prot.read_list_end()?; |
| f_8 = Some(val); |
| }, |
| 9 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<BTreeMap<String, String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut list_elem_72: BTreeMap<String, String> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_73 = i_prot.read_string()?; |
| let map_val_74 = i_prot.read_string()?; |
| list_elem_72.insert(map_key_73, map_val_74); |
| } |
| i_prot.read_map_end()?; |
| val.push(list_elem_72); |
| } |
| i_prot.read_list_end()?; |
| f_9 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSCreateAlignedTimeseriesReq.session_id", &f_1)?; |
| verify_required_field_exists("TSCreateAlignedTimeseriesReq.prefix_path", &f_2)?; |
| verify_required_field_exists("TSCreateAlignedTimeseriesReq.measurements", &f_3)?; |
| verify_required_field_exists("TSCreateAlignedTimeseriesReq.data_types", &f_4)?; |
| verify_required_field_exists("TSCreateAlignedTimeseriesReq.encodings", &f_5)?; |
| verify_required_field_exists("TSCreateAlignedTimeseriesReq.compressors", &f_6)?; |
| let ret = TSCreateAlignedTimeseriesReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_path: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| measurements: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| data_types: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| encodings: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| compressors: f_6.expect("auto-generated code should have checked for presence of required fields"), |
| measurement_alias: f_7, |
| tags_list: f_8, |
| attributes_list: f_9, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSCreateAlignedTimeseriesReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPath", TType::String, 2))?; |
| o_prot.write_string(&self.prefix_path)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurements", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.measurements.len() as i32))?; |
| for e in &self.measurements { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("dataTypes", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.data_types.len() as i32))?; |
| for e in &self.data_types { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("encodings", TType::List, 5))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.encodings.len() as i32))?; |
| for e in &self.encodings { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("compressors", TType::List, 6))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.compressors.len() as i32))?; |
| for e in &self.compressors { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.measurement_alias { |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurementAlias", TType::List, 7))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.tags_list { |
| o_prot.write_field_begin(&TFieldIdentifier::new("tagsList", TType::List, 8))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::Map, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, e.len() as i32))?; |
| for (k, v) in e { |
| o_prot.write_string(k)?; |
| o_prot.write_string(v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.attributes_list { |
| o_prot.write_field_begin(&TFieldIdentifier::new("attributesList", TType::List, 9))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::Map, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, e.len() as i32))?; |
| for (k, v) in e { |
| o_prot.write_string(k)?; |
| o_prot.write_string(v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSRawDataQueryReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSRawDataQueryReq { |
| pub session_id: i64, |
| pub paths: Vec<String>, |
| pub fetch_size: Option<i32>, |
| pub start_time: i64, |
| pub end_time: i64, |
| pub statement_id: i64, |
| pub enable_redirect_query: Option<bool>, |
| pub jdbc_query: Option<bool>, |
| pub timeout: Option<i64>, |
| pub legal_path_nodes: Option<bool>, |
| } |
| |
| impl TSRawDataQueryReq { |
| pub fn new<F3, F7, F8, F9, F10>(session_id: i64, paths: Vec<String>, fetch_size: F3, start_time: i64, end_time: i64, statement_id: i64, enable_redirect_query: F7, jdbc_query: F8, timeout: F9, legal_path_nodes: F10) -> TSRawDataQueryReq where F3: Into<Option<i32>>, F7: Into<Option<bool>>, F8: Into<Option<bool>>, F9: Into<Option<i64>>, F10: Into<Option<bool>> { |
| TSRawDataQueryReq { |
| session_id, |
| paths, |
| fetch_size: fetch_size.into(), |
| start_time, |
| end_time, |
| statement_id, |
| enable_redirect_query: enable_redirect_query.into(), |
| jdbc_query: jdbc_query.into(), |
| timeout: timeout.into(), |
| legal_path_nodes: legal_path_nodes.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSRawDataQueryReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| let mut f_3: Option<i32> = None; |
| let mut f_4: Option<i64> = None; |
| let mut f_5: Option<i64> = None; |
| let mut f_6: Option<i64> = None; |
| let mut f_7: Option<bool> = None; |
| let mut f_8: Option<bool> = None; |
| let mut f_9: Option<i64> = None; |
| let mut f_10: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_75 = i_prot.read_string()?; |
| val.push(list_elem_75); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i32()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i64()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i64()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_i64()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_bool()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let val = i_prot.read_bool()?; |
| f_8 = Some(val); |
| }, |
| 9 => { |
| let val = i_prot.read_i64()?; |
| f_9 = Some(val); |
| }, |
| 10 => { |
| let val = i_prot.read_bool()?; |
| f_10 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSRawDataQueryReq.session_id", &f_1)?; |
| verify_required_field_exists("TSRawDataQueryReq.paths", &f_2)?; |
| verify_required_field_exists("TSRawDataQueryReq.start_time", &f_4)?; |
| verify_required_field_exists("TSRawDataQueryReq.end_time", &f_5)?; |
| verify_required_field_exists("TSRawDataQueryReq.statement_id", &f_6)?; |
| let ret = TSRawDataQueryReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| paths: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| fetch_size: f_3, |
| start_time: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| end_time: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| statement_id: f_6.expect("auto-generated code should have checked for presence of required fields"), |
| enable_redirect_query: f_7, |
| jdbc_query: f_8, |
| timeout: f_9, |
| legal_path_nodes: f_10, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSRawDataQueryReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("paths", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.paths.len() as i32))?; |
| for e in &self.paths { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.fetch_size { |
| o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 3))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_begin(&TFieldIdentifier::new("startTime", TType::I64, 4))?; |
| o_prot.write_i64(self.start_time)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("endTime", TType::I64, 5))?; |
| o_prot.write_i64(self.end_time)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 6))?; |
| o_prot.write_i64(self.statement_id)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.enable_redirect_query { |
| o_prot.write_field_begin(&TFieldIdentifier::new("enableRedirectQuery", TType::Bool, 7))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.jdbc_query { |
| o_prot.write_field_begin(&TFieldIdentifier::new("jdbcQuery", TType::Bool, 8))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.timeout { |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeout", TType::I64, 9))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.legal_path_nodes { |
| o_prot.write_field_begin(&TFieldIdentifier::new("legalPathNodes", TType::Bool, 10))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSLastDataQueryReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSLastDataQueryReq { |
| pub session_id: i64, |
| pub paths: Vec<String>, |
| pub fetch_size: Option<i32>, |
| pub time: i64, |
| pub statement_id: i64, |
| pub enable_redirect_query: Option<bool>, |
| pub jdbc_query: Option<bool>, |
| pub timeout: Option<i64>, |
| pub legal_path_nodes: Option<bool>, |
| } |
| |
| impl TSLastDataQueryReq { |
| pub fn new<F3, F6, F7, F8, F9>(session_id: i64, paths: Vec<String>, fetch_size: F3, time: i64, statement_id: i64, enable_redirect_query: F6, jdbc_query: F7, timeout: F8, legal_path_nodes: F9) -> TSLastDataQueryReq where F3: Into<Option<i32>>, F6: Into<Option<bool>>, F7: Into<Option<bool>>, F8: Into<Option<i64>>, F9: Into<Option<bool>> { |
| TSLastDataQueryReq { |
| session_id, |
| paths, |
| fetch_size: fetch_size.into(), |
| time, |
| statement_id, |
| enable_redirect_query: enable_redirect_query.into(), |
| jdbc_query: jdbc_query.into(), |
| timeout: timeout.into(), |
| legal_path_nodes: legal_path_nodes.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSLastDataQueryReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| let mut f_3: Option<i32> = None; |
| let mut f_4: Option<i64> = None; |
| let mut f_5: Option<i64> = None; |
| let mut f_6: Option<bool> = None; |
| let mut f_7: Option<bool> = None; |
| let mut f_8: Option<i64> = None; |
| let mut f_9: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_76 = i_prot.read_string()?; |
| val.push(list_elem_76); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i32()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i64()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i64()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_bool()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_bool()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let val = i_prot.read_i64()?; |
| f_8 = Some(val); |
| }, |
| 9 => { |
| let val = i_prot.read_bool()?; |
| f_9 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSLastDataQueryReq.session_id", &f_1)?; |
| verify_required_field_exists("TSLastDataQueryReq.paths", &f_2)?; |
| verify_required_field_exists("TSLastDataQueryReq.time", &f_4)?; |
| verify_required_field_exists("TSLastDataQueryReq.statement_id", &f_5)?; |
| let ret = TSLastDataQueryReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| paths: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| fetch_size: f_3, |
| time: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| statement_id: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| enable_redirect_query: f_6, |
| jdbc_query: f_7, |
| timeout: f_8, |
| legal_path_nodes: f_9, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSLastDataQueryReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("paths", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.paths.len() as i32))?; |
| for e in &self.paths { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.fetch_size { |
| o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 3))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_begin(&TFieldIdentifier::new("time", TType::I64, 4))?; |
| o_prot.write_i64(self.time)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 5))?; |
| o_prot.write_i64(self.statement_id)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.enable_redirect_query { |
| o_prot.write_field_begin(&TFieldIdentifier::new("enableRedirectQuery", TType::Bool, 6))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.jdbc_query { |
| o_prot.write_field_begin(&TFieldIdentifier::new("jdbcQuery", TType::Bool, 7))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.timeout { |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeout", TType::I64, 8))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.legal_path_nodes { |
| o_prot.write_field_begin(&TFieldIdentifier::new("legalPathNodes", TType::Bool, 9))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSFastLastDataQueryForOnePrefixPathReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSFastLastDataQueryForOnePrefixPathReq { |
| pub session_id: i64, |
| pub prefixes: Vec<String>, |
| pub fetch_size: Option<i32>, |
| pub statement_id: i64, |
| pub enable_redirect_query: Option<bool>, |
| pub jdbc_query: Option<bool>, |
| pub timeout: Option<i64>, |
| } |
| |
| impl TSFastLastDataQueryForOnePrefixPathReq { |
| pub fn new<F3, F5, F6, F7>(session_id: i64, prefixes: Vec<String>, fetch_size: F3, statement_id: i64, enable_redirect_query: F5, jdbc_query: F6, timeout: F7) -> TSFastLastDataQueryForOnePrefixPathReq where F3: Into<Option<i32>>, F5: Into<Option<bool>>, F6: Into<Option<bool>>, F7: Into<Option<i64>> { |
| TSFastLastDataQueryForOnePrefixPathReq { |
| session_id, |
| prefixes, |
| fetch_size: fetch_size.into(), |
| statement_id, |
| enable_redirect_query: enable_redirect_query.into(), |
| jdbc_query: jdbc_query.into(), |
| timeout: timeout.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSFastLastDataQueryForOnePrefixPathReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| let mut f_3: Option<i32> = None; |
| let mut f_4: Option<i64> = None; |
| let mut f_5: Option<bool> = None; |
| let mut f_6: Option<bool> = None; |
| let mut f_7: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_77 = i_prot.read_string()?; |
| val.push(list_elem_77); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i32()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i64()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_bool()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_bool()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_i64()?; |
| f_7 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSFastLastDataQueryForOnePrefixPathReq.session_id", &f_1)?; |
| verify_required_field_exists("TSFastLastDataQueryForOnePrefixPathReq.prefixes", &f_2)?; |
| verify_required_field_exists("TSFastLastDataQueryForOnePrefixPathReq.statement_id", &f_4)?; |
| let ret = TSFastLastDataQueryForOnePrefixPathReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefixes: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| fetch_size: f_3, |
| statement_id: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| enable_redirect_query: f_5, |
| jdbc_query: f_6, |
| timeout: f_7, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSFastLastDataQueryForOnePrefixPathReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixes", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.prefixes.len() as i32))?; |
| for e in &self.prefixes { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.fetch_size { |
| o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 3))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 4))?; |
| o_prot.write_i64(self.statement_id)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.enable_redirect_query { |
| o_prot.write_field_begin(&TFieldIdentifier::new("enableRedirectQuery", TType::Bool, 5))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.jdbc_query { |
| o_prot.write_field_begin(&TFieldIdentifier::new("jdbcQuery", TType::Bool, 6))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.timeout { |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeout", TType::I64, 7))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSFastLastDataQueryForOneDeviceReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSFastLastDataQueryForOneDeviceReq { |
| pub session_id: i64, |
| pub db: String, |
| pub device_id: String, |
| pub sensors: Vec<String>, |
| pub fetch_size: Option<i32>, |
| pub statement_id: i64, |
| pub enable_redirect_query: Option<bool>, |
| pub jdbc_query: Option<bool>, |
| pub timeout: Option<i64>, |
| pub legal_path_nodes: Option<bool>, |
| } |
| |
| impl TSFastLastDataQueryForOneDeviceReq { |
| pub fn new<F5, F7, F8, F9, F10>(session_id: i64, db: String, device_id: String, sensors: Vec<String>, fetch_size: F5, statement_id: i64, enable_redirect_query: F7, jdbc_query: F8, timeout: F9, legal_path_nodes: F10) -> TSFastLastDataQueryForOneDeviceReq where F5: Into<Option<i32>>, F7: Into<Option<bool>>, F8: Into<Option<bool>>, F9: Into<Option<i64>>, F10: Into<Option<bool>> { |
| TSFastLastDataQueryForOneDeviceReq { |
| session_id, |
| db, |
| device_id, |
| sensors, |
| fetch_size: fetch_size.into(), |
| statement_id, |
| enable_redirect_query: enable_redirect_query.into(), |
| jdbc_query: jdbc_query.into(), |
| timeout: timeout.into(), |
| legal_path_nodes: legal_path_nodes.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSFastLastDataQueryForOneDeviceReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<String> = None; |
| let mut f_4: Option<Vec<String>> = None; |
| let mut f_5: Option<i32> = None; |
| let mut f_6: Option<i64> = None; |
| let mut f_7: Option<bool> = None; |
| let mut f_8: Option<bool> = None; |
| let mut f_9: Option<i64> = None; |
| let mut f_10: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_78 = i_prot.read_string()?; |
| val.push(list_elem_78); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i32()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_i64()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_bool()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let val = i_prot.read_bool()?; |
| f_8 = Some(val); |
| }, |
| 9 => { |
| let val = i_prot.read_i64()?; |
| f_9 = Some(val); |
| }, |
| 10 => { |
| let val = i_prot.read_bool()?; |
| f_10 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSFastLastDataQueryForOneDeviceReq.session_id", &f_1)?; |
| verify_required_field_exists("TSFastLastDataQueryForOneDeviceReq.db", &f_2)?; |
| verify_required_field_exists("TSFastLastDataQueryForOneDeviceReq.device_id", &f_3)?; |
| verify_required_field_exists("TSFastLastDataQueryForOneDeviceReq.sensors", &f_4)?; |
| verify_required_field_exists("TSFastLastDataQueryForOneDeviceReq.statement_id", &f_6)?; |
| let ret = TSFastLastDataQueryForOneDeviceReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| db: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| device_id: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| sensors: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| fetch_size: f_5, |
| statement_id: f_6.expect("auto-generated code should have checked for presence of required fields"), |
| enable_redirect_query: f_7, |
| jdbc_query: f_8, |
| timeout: f_9, |
| legal_path_nodes: f_10, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSFastLastDataQueryForOneDeviceReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("db", TType::String, 2))?; |
| o_prot.write_string(&self.db)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("deviceId", TType::String, 3))?; |
| o_prot.write_string(&self.device_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sensors", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.sensors.len() as i32))?; |
| for e in &self.sensors { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.fetch_size { |
| o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 5))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 6))?; |
| o_prot.write_i64(self.statement_id)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.enable_redirect_query { |
| o_prot.write_field_begin(&TFieldIdentifier::new("enableRedirectQuery", TType::Bool, 7))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.jdbc_query { |
| o_prot.write_field_begin(&TFieldIdentifier::new("jdbcQuery", TType::Bool, 8))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.timeout { |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeout", TType::I64, 9))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.legal_path_nodes { |
| o_prot.write_field_begin(&TFieldIdentifier::new("legalPathNodes", TType::Bool, 10))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSAggregationQueryReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSAggregationQueryReq { |
| pub session_id: i64, |
| pub statement_id: i64, |
| pub paths: Vec<String>, |
| pub aggregations: Vec<common::TAggregationType>, |
| pub start_time: Option<i64>, |
| pub end_time: Option<i64>, |
| pub interval: Option<i64>, |
| pub sliding_step: Option<i64>, |
| pub fetch_size: Option<i32>, |
| pub timeout: Option<i64>, |
| pub legal_path_nodes: Option<bool>, |
| } |
| |
| impl TSAggregationQueryReq { |
| pub fn new<F5, F6, F7, F8, F9, F10, F11>(session_id: i64, statement_id: i64, paths: Vec<String>, aggregations: Vec<common::TAggregationType>, start_time: F5, end_time: F6, interval: F7, sliding_step: F8, fetch_size: F9, timeout: F10, legal_path_nodes: F11) -> TSAggregationQueryReq where F5: Into<Option<i64>>, F6: Into<Option<i64>>, F7: Into<Option<i64>>, F8: Into<Option<i64>>, F9: Into<Option<i32>>, F10: Into<Option<i64>>, F11: Into<Option<bool>> { |
| TSAggregationQueryReq { |
| session_id, |
| statement_id, |
| paths, |
| aggregations, |
| start_time: start_time.into(), |
| end_time: end_time.into(), |
| interval: interval.into(), |
| sliding_step: sliding_step.into(), |
| fetch_size: fetch_size.into(), |
| timeout: timeout.into(), |
| legal_path_nodes: legal_path_nodes.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSAggregationQueryReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<i64> = None; |
| let mut f_3: Option<Vec<String>> = None; |
| let mut f_4: Option<Vec<common::TAggregationType>> = None; |
| let mut f_5: Option<i64> = None; |
| let mut f_6: Option<i64> = None; |
| let mut f_7: Option<i64> = None; |
| let mut f_8: Option<i64> = None; |
| let mut f_9: Option<i32> = None; |
| let mut f_10: Option<i64> = None; |
| let mut f_11: Option<bool> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i64()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_79 = i_prot.read_string()?; |
| val.push(list_elem_79); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<common::TAggregationType> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_80 = common::TAggregationType::read_from_in_protocol(i_prot)?; |
| val.push(list_elem_80); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i64()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_i64()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_i64()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let val = i_prot.read_i64()?; |
| f_8 = Some(val); |
| }, |
| 9 => { |
| let val = i_prot.read_i32()?; |
| f_9 = Some(val); |
| }, |
| 10 => { |
| let val = i_prot.read_i64()?; |
| f_10 = Some(val); |
| }, |
| 11 => { |
| let val = i_prot.read_bool()?; |
| f_11 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSAggregationQueryReq.session_id", &f_1)?; |
| verify_required_field_exists("TSAggregationQueryReq.statement_id", &f_2)?; |
| verify_required_field_exists("TSAggregationQueryReq.paths", &f_3)?; |
| verify_required_field_exists("TSAggregationQueryReq.aggregations", &f_4)?; |
| let ret = TSAggregationQueryReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| statement_id: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| paths: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| aggregations: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| start_time: f_5, |
| end_time: f_6, |
| interval: f_7, |
| sliding_step: f_8, |
| fetch_size: f_9, |
| timeout: f_10, |
| legal_path_nodes: f_11, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSAggregationQueryReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("statementId", TType::I64, 2))?; |
| o_prot.write_i64(self.statement_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("paths", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.paths.len() as i32))?; |
| for e in &self.paths { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("aggregations", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.aggregations.len() as i32))?; |
| for e in &self.aggregations { |
| e.write_to_out_protocol(o_prot)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.start_time { |
| o_prot.write_field_begin(&TFieldIdentifier::new("startTime", TType::I64, 5))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.end_time { |
| o_prot.write_field_begin(&TFieldIdentifier::new("endTime", TType::I64, 6))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.interval { |
| o_prot.write_field_begin(&TFieldIdentifier::new("interval", TType::I64, 7))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.sliding_step { |
| o_prot.write_field_begin(&TFieldIdentifier::new("slidingStep", TType::I64, 8))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.fetch_size { |
| o_prot.write_field_begin(&TFieldIdentifier::new("fetchSize", TType::I32, 9))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.timeout { |
| o_prot.write_field_begin(&TFieldIdentifier::new("timeout", TType::I64, 10))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.legal_path_nodes { |
| o_prot.write_field_begin(&TFieldIdentifier::new("legalPathNodes", TType::Bool, 11))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSCreateMultiTimeseriesReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSCreateMultiTimeseriesReq { |
| pub session_id: i64, |
| pub paths: Vec<String>, |
| pub data_types: Vec<i32>, |
| pub encodings: Vec<i32>, |
| pub compressors: Vec<i32>, |
| pub props_list: Option<Vec<BTreeMap<String, String>>>, |
| pub tags_list: Option<Vec<BTreeMap<String, String>>>, |
| pub attributes_list: Option<Vec<BTreeMap<String, String>>>, |
| pub measurement_alias_list: Option<Vec<String>>, |
| } |
| |
| impl TSCreateMultiTimeseriesReq { |
| 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>>> { |
| TSCreateMultiTimeseriesReq { |
| session_id, |
| paths, |
| data_types, |
| encodings, |
| compressors, |
| props_list: props_list.into(), |
| tags_list: tags_list.into(), |
| attributes_list: attributes_list.into(), |
| measurement_alias_list: measurement_alias_list.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCreateMultiTimeseriesReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| let mut f_3: Option<Vec<i32>> = None; |
| let mut f_4: Option<Vec<i32>> = None; |
| let mut f_5: Option<Vec<i32>> = None; |
| let mut f_6: Option<Vec<BTreeMap<String, String>>> = None; |
| let mut f_7: Option<Vec<BTreeMap<String, String>>> = None; |
| let mut f_8: Option<Vec<BTreeMap<String, String>>> = None; |
| let mut f_9: Option<Vec<String>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_81 = i_prot.read_string()?; |
| val.push(list_elem_81); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_82 = i_prot.read_i32()?; |
| val.push(list_elem_82); |
| } |
| i_prot.read_list_end()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_83 = i_prot.read_i32()?; |
| val.push(list_elem_83); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_84 = i_prot.read_i32()?; |
| val.push(list_elem_84); |
| } |
| i_prot.read_list_end()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<BTreeMap<String, String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut list_elem_85: BTreeMap<String, String> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_86 = i_prot.read_string()?; |
| let map_val_87 = i_prot.read_string()?; |
| list_elem_85.insert(map_key_86, map_val_87); |
| } |
| i_prot.read_map_end()?; |
| val.push(list_elem_85); |
| } |
| i_prot.read_list_end()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<BTreeMap<String, String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut list_elem_88: BTreeMap<String, String> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_89 = i_prot.read_string()?; |
| let map_val_90 = i_prot.read_string()?; |
| list_elem_88.insert(map_key_89, map_val_90); |
| } |
| i_prot.read_map_end()?; |
| val.push(list_elem_88); |
| } |
| i_prot.read_list_end()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<BTreeMap<String, String>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let map_ident = i_prot.read_map_begin()?; |
| let mut list_elem_91: BTreeMap<String, String> = BTreeMap::new(); |
| for _ in 0..map_ident.size { |
| let map_key_92 = i_prot.read_string()?; |
| let map_val_93 = i_prot.read_string()?; |
| list_elem_91.insert(map_key_92, map_val_93); |
| } |
| i_prot.read_map_end()?; |
| val.push(list_elem_91); |
| } |
| i_prot.read_list_end()?; |
| f_8 = Some(val); |
| }, |
| 9 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_94 = i_prot.read_string()?; |
| val.push(list_elem_94); |
| } |
| i_prot.read_list_end()?; |
| f_9 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSCreateMultiTimeseriesReq.session_id", &f_1)?; |
| verify_required_field_exists("TSCreateMultiTimeseriesReq.paths", &f_2)?; |
| verify_required_field_exists("TSCreateMultiTimeseriesReq.data_types", &f_3)?; |
| verify_required_field_exists("TSCreateMultiTimeseriesReq.encodings", &f_4)?; |
| verify_required_field_exists("TSCreateMultiTimeseriesReq.compressors", &f_5)?; |
| let ret = TSCreateMultiTimeseriesReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| paths: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| data_types: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| encodings: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| compressors: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| props_list: f_6, |
| tags_list: f_7, |
| attributes_list: f_8, |
| measurement_alias_list: f_9, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSCreateMultiTimeseriesReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("paths", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.paths.len() as i32))?; |
| for e in &self.paths { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("dataTypes", TType::List, 3))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.data_types.len() as i32))?; |
| for e in &self.data_types { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("encodings", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.encodings.len() as i32))?; |
| for e in &self.encodings { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("compressors", TType::List, 5))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.compressors.len() as i32))?; |
| for e in &self.compressors { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.props_list { |
| o_prot.write_field_begin(&TFieldIdentifier::new("propsList", TType::List, 6))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::Map, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, e.len() as i32))?; |
| for (k, v) in e { |
| o_prot.write_string(k)?; |
| o_prot.write_string(v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.tags_list { |
| o_prot.write_field_begin(&TFieldIdentifier::new("tagsList", TType::List, 7))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::Map, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, e.len() as i32))?; |
| for (k, v) in e { |
| o_prot.write_string(k)?; |
| o_prot.write_string(v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.attributes_list { |
| o_prot.write_field_begin(&TFieldIdentifier::new("attributesList", TType::List, 8))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::Map, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, e.len() as i32))?; |
| for (k, v) in e { |
| o_prot.write_string(k)?; |
| o_prot.write_string(v)?; |
| o_prot.write_map_end()?; |
| } |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.measurement_alias_list { |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurementAliasList", TType::List, 9))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // ServerProperties |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct ServerProperties { |
| pub version: String, |
| pub supported_time_aggregation_operations: Vec<String>, |
| pub timestamp_precision: String, |
| pub max_concurrent_client_num: Option<i32>, |
| pub thrift_max_frame_size: Option<i32>, |
| pub is_read_only: Option<bool>, |
| pub build_info: Option<String>, |
| pub logo: Option<String>, |
| } |
| |
| impl ServerProperties { |
| pub fn new<F4, F5, F6, F7, F8>(version: String, supported_time_aggregation_operations: Vec<String>, timestamp_precision: String, max_concurrent_client_num: F4, thrift_max_frame_size: F5, is_read_only: F6, build_info: F7, logo: F8) -> ServerProperties where F4: Into<Option<i32>>, F5: Into<Option<i32>>, F6: Into<Option<bool>>, F7: Into<Option<String>>, F8: Into<Option<String>> { |
| ServerProperties { |
| version, |
| supported_time_aggregation_operations, |
| timestamp_precision, |
| max_concurrent_client_num: max_concurrent_client_num.into(), |
| thrift_max_frame_size: thrift_max_frame_size.into(), |
| is_read_only: is_read_only.into(), |
| build_info: build_info.into(), |
| logo: logo.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<ServerProperties> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<String> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| let mut f_3: Option<String> = None; |
| let mut f_4: Option<i32> = Some(0); |
| let mut f_5: Option<i32> = None; |
| let mut f_6: Option<bool> = None; |
| let mut f_7: Option<String> = None; |
| let mut f_8: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_string()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_95 = i_prot.read_string()?; |
| val.push(list_elem_95); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i32()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let val = i_prot.read_i32()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let val = i_prot.read_bool()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let val = i_prot.read_string()?; |
| f_7 = Some(val); |
| }, |
| 8 => { |
| let val = i_prot.read_string()?; |
| f_8 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("ServerProperties.version", &f_1)?; |
| verify_required_field_exists("ServerProperties.supported_time_aggregation_operations", &f_2)?; |
| verify_required_field_exists("ServerProperties.timestamp_precision", &f_3)?; |
| let ret = ServerProperties { |
| version: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| supported_time_aggregation_operations: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| timestamp_precision: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| max_concurrent_client_num: f_4, |
| thrift_max_frame_size: f_5, |
| is_read_only: f_6, |
| build_info: f_7, |
| logo: f_8, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("ServerProperties"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("version", TType::String, 1))?; |
| o_prot.write_string(&self.version)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("supportedTimeAggregationOperations", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.supported_time_aggregation_operations.len() as i32))?; |
| for e in &self.supported_time_aggregation_operations { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("timestampPrecision", TType::String, 3))?; |
| o_prot.write_string(&self.timestamp_precision)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.max_concurrent_client_num { |
| o_prot.write_field_begin(&TFieldIdentifier::new("maxConcurrentClientNum", TType::I32, 4))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.thrift_max_frame_size { |
| o_prot.write_field_begin(&TFieldIdentifier::new("thriftMaxFrameSize", TType::I32, 5))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.is_read_only { |
| o_prot.write_field_begin(&TFieldIdentifier::new("isReadOnly", TType::Bool, 6))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.build_info { |
| o_prot.write_field_begin(&TFieldIdentifier::new("buildInfo", TType::String, 7))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.logo { |
| o_prot.write_field_begin(&TFieldIdentifier::new("logo", TType::String, 8))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSSetSchemaTemplateReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSSetSchemaTemplateReq { |
| pub session_id: i64, |
| pub template_name: String, |
| pub prefix_path: String, |
| } |
| |
| impl TSSetSchemaTemplateReq { |
| pub fn new(session_id: i64, template_name: String, prefix_path: String) -> TSSetSchemaTemplateReq { |
| TSSetSchemaTemplateReq { |
| session_id, |
| template_name, |
| prefix_path, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSSetSchemaTemplateReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSSetSchemaTemplateReq.session_id", &f_1)?; |
| verify_required_field_exists("TSSetSchemaTemplateReq.template_name", &f_2)?; |
| verify_required_field_exists("TSSetSchemaTemplateReq.prefix_path", &f_3)?; |
| let ret = TSSetSchemaTemplateReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| template_name: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_path: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSSetSchemaTemplateReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("templateName", TType::String, 2))?; |
| o_prot.write_string(&self.template_name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPath", TType::String, 3))?; |
| o_prot.write_string(&self.prefix_path)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSCreateSchemaTemplateReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSCreateSchemaTemplateReq { |
| pub session_id: i64, |
| pub name: String, |
| pub serialized_template: Vec<u8>, |
| } |
| |
| impl TSCreateSchemaTemplateReq { |
| pub fn new(session_id: i64, name: String, serialized_template: Vec<u8>) -> TSCreateSchemaTemplateReq { |
| TSCreateSchemaTemplateReq { |
| session_id, |
| name, |
| serialized_template, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSCreateSchemaTemplateReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<Vec<u8>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_bytes()?; |
| f_3 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSCreateSchemaTemplateReq.session_id", &f_1)?; |
| verify_required_field_exists("TSCreateSchemaTemplateReq.name", &f_2)?; |
| verify_required_field_exists("TSCreateSchemaTemplateReq.serialized_template", &f_3)?; |
| let ret = TSCreateSchemaTemplateReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| name: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| serialized_template: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSCreateSchemaTemplateReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("name", TType::String, 2))?; |
| o_prot.write_string(&self.name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("serializedTemplate", TType::String, 3))?; |
| o_prot.write_bytes(&self.serialized_template)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSAppendSchemaTemplateReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSAppendSchemaTemplateReq { |
| pub session_id: i64, |
| pub name: String, |
| pub is_aligned: bool, |
| pub measurements: Vec<String>, |
| pub data_types: Vec<i32>, |
| pub encodings: Vec<i32>, |
| pub compressors: Vec<i32>, |
| } |
| |
| impl TSAppendSchemaTemplateReq { |
| pub fn new(session_id: i64, name: String, is_aligned: bool, measurements: Vec<String>, data_types: Vec<i32>, encodings: Vec<i32>, compressors: Vec<i32>) -> TSAppendSchemaTemplateReq { |
| TSAppendSchemaTemplateReq { |
| session_id, |
| name, |
| is_aligned, |
| measurements, |
| data_types, |
| encodings, |
| compressors, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSAppendSchemaTemplateReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<bool> = None; |
| let mut f_4: Option<Vec<String>> = None; |
| let mut f_5: Option<Vec<i32>> = None; |
| let mut f_6: Option<Vec<i32>> = None; |
| let mut f_7: Option<Vec<i32>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_bool()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_96 = i_prot.read_string()?; |
| val.push(list_elem_96); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_97 = i_prot.read_i32()?; |
| val.push(list_elem_97); |
| } |
| i_prot.read_list_end()?; |
| f_5 = Some(val); |
| }, |
| 6 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_98 = i_prot.read_i32()?; |
| val.push(list_elem_98); |
| } |
| i_prot.read_list_end()?; |
| f_6 = Some(val); |
| }, |
| 7 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<i32> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_99 = i_prot.read_i32()?; |
| val.push(list_elem_99); |
| } |
| i_prot.read_list_end()?; |
| f_7 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSAppendSchemaTemplateReq.session_id", &f_1)?; |
| verify_required_field_exists("TSAppendSchemaTemplateReq.name", &f_2)?; |
| verify_required_field_exists("TSAppendSchemaTemplateReq.is_aligned", &f_3)?; |
| verify_required_field_exists("TSAppendSchemaTemplateReq.measurements", &f_4)?; |
| verify_required_field_exists("TSAppendSchemaTemplateReq.data_types", &f_5)?; |
| verify_required_field_exists("TSAppendSchemaTemplateReq.encodings", &f_6)?; |
| verify_required_field_exists("TSAppendSchemaTemplateReq.compressors", &f_7)?; |
| let ret = TSAppendSchemaTemplateReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| name: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| is_aligned: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| measurements: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| data_types: f_5.expect("auto-generated code should have checked for presence of required fields"), |
| encodings: f_6.expect("auto-generated code should have checked for presence of required fields"), |
| compressors: f_7.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSAppendSchemaTemplateReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("name", TType::String, 2))?; |
| o_prot.write_string(&self.name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("isAligned", TType::Bool, 3))?; |
| o_prot.write_bool(self.is_aligned)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurements", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.measurements.len() as i32))?; |
| for e in &self.measurements { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("dataTypes", TType::List, 5))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.data_types.len() as i32))?; |
| for e in &self.data_types { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("encodings", TType::List, 6))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.encodings.len() as i32))?; |
| for e in &self.encodings { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("compressors", TType::List, 7))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::I32, self.compressors.len() as i32))?; |
| for e in &self.compressors { |
| o_prot.write_i32(*e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSPruneSchemaTemplateReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSPruneSchemaTemplateReq { |
| pub session_id: i64, |
| pub name: String, |
| pub path: String, |
| } |
| |
| impl TSPruneSchemaTemplateReq { |
| pub fn new(session_id: i64, name: String, path: String) -> TSPruneSchemaTemplateReq { |
| TSPruneSchemaTemplateReq { |
| session_id, |
| name, |
| path, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSPruneSchemaTemplateReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSPruneSchemaTemplateReq.session_id", &f_1)?; |
| verify_required_field_exists("TSPruneSchemaTemplateReq.name", &f_2)?; |
| verify_required_field_exists("TSPruneSchemaTemplateReq.path", &f_3)?; |
| let ret = TSPruneSchemaTemplateReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| name: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| path: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSPruneSchemaTemplateReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("name", TType::String, 2))?; |
| o_prot.write_string(&self.name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("path", TType::String, 3))?; |
| o_prot.write_string(&self.path)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSQueryTemplateReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSQueryTemplateReq { |
| pub session_id: i64, |
| pub name: String, |
| pub query_type: i32, |
| pub measurement: Option<String>, |
| } |
| |
| impl TSQueryTemplateReq { |
| pub fn new<F4>(session_id: i64, name: String, query_type: i32, measurement: F4) -> TSQueryTemplateReq where F4: Into<Option<String>> { |
| TSQueryTemplateReq { |
| session_id, |
| name, |
| query_type, |
| measurement: measurement.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSQueryTemplateReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<i32> = None; |
| let mut f_4: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i32()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_string()?; |
| f_4 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSQueryTemplateReq.session_id", &f_1)?; |
| verify_required_field_exists("TSQueryTemplateReq.name", &f_2)?; |
| verify_required_field_exists("TSQueryTemplateReq.query_type", &f_3)?; |
| let ret = TSQueryTemplateReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| name: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| query_type: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| measurement: f_4, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSQueryTemplateReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("name", TType::String, 2))?; |
| o_prot.write_string(&self.name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryType", TType::I32, 3))?; |
| o_prot.write_i32(self.query_type)?; |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.measurement { |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurement", TType::String, 4))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSQueryTemplateResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSQueryTemplateResp { |
| pub status: common::TSStatus, |
| pub query_type: i32, |
| pub result: Option<bool>, |
| pub count: Option<i32>, |
| pub measurements: Option<Vec<String>>, |
| } |
| |
| impl TSQueryTemplateResp { |
| pub fn new<F3, F4, F5>(status: common::TSStatus, query_type: i32, result: F3, count: F4, measurements: F5) -> TSQueryTemplateResp where F3: Into<Option<bool>>, F4: Into<Option<i32>>, F5: Into<Option<Vec<String>>> { |
| TSQueryTemplateResp { |
| status, |
| query_type, |
| result: result.into(), |
| count: count.into(), |
| measurements: measurements.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSQueryTemplateResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<common::TSStatus> = None; |
| let mut f_2: Option<i32> = None; |
| let mut f_3: Option<bool> = None; |
| let mut f_4: Option<i32> = None; |
| let mut f_5: Option<Vec<String>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i32()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_bool()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i32()?; |
| f_4 = Some(val); |
| }, |
| 5 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_100 = i_prot.read_string()?; |
| val.push(list_elem_100); |
| } |
| i_prot.read_list_end()?; |
| f_5 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSQueryTemplateResp.status", &f_1)?; |
| verify_required_field_exists("TSQueryTemplateResp.query_type", &f_2)?; |
| let ret = TSQueryTemplateResp { |
| status: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| query_type: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| result: f_3, |
| count: f_4, |
| measurements: f_5, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSQueryTemplateResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?; |
| self.status.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("queryType", TType::I32, 2))?; |
| o_prot.write_i32(self.query_type)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.result { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result", TType::Bool, 3))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.count { |
| o_prot.write_field_begin(&TFieldIdentifier::new("count", TType::I32, 4))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.measurements { |
| o_prot.write_field_begin(&TFieldIdentifier::new("measurements", TType::List, 5))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSUnsetSchemaTemplateReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSUnsetSchemaTemplateReq { |
| pub session_id: i64, |
| pub prefix_path: String, |
| pub template_name: String, |
| } |
| |
| impl TSUnsetSchemaTemplateReq { |
| pub fn new(session_id: i64, prefix_path: String, template_name: String) -> TSUnsetSchemaTemplateReq { |
| TSUnsetSchemaTemplateReq { |
| session_id, |
| prefix_path, |
| template_name, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSUnsetSchemaTemplateReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| let mut f_3: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSUnsetSchemaTemplateReq.session_id", &f_1)?; |
| verify_required_field_exists("TSUnsetSchemaTemplateReq.prefix_path", &f_2)?; |
| verify_required_field_exists("TSUnsetSchemaTemplateReq.template_name", &f_3)?; |
| let ret = TSUnsetSchemaTemplateReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| prefix_path: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| template_name: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSUnsetSchemaTemplateReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("prefixPath", TType::String, 2))?; |
| o_prot.write_string(&self.prefix_path)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("templateName", TType::String, 3))?; |
| o_prot.write_string(&self.template_name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSDropSchemaTemplateReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSDropSchemaTemplateReq { |
| pub session_id: i64, |
| pub template_name: String, |
| } |
| |
| impl TSDropSchemaTemplateReq { |
| pub fn new(session_id: i64, template_name: String) -> TSDropSchemaTemplateReq { |
| TSDropSchemaTemplateReq { |
| session_id, |
| template_name, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSDropSchemaTemplateReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSDropSchemaTemplateReq.session_id", &f_1)?; |
| verify_required_field_exists("TSDropSchemaTemplateReq.template_name", &f_2)?; |
| let ret = TSDropSchemaTemplateReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| template_name: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSDropSchemaTemplateReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("templateName", TType::String, 2))?; |
| o_prot.write_string(&self.template_name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TCreateTimeseriesUsingSchemaTemplateReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TCreateTimeseriesUsingSchemaTemplateReq { |
| pub session_id: i64, |
| pub device_path_list: Vec<String>, |
| } |
| |
| impl TCreateTimeseriesUsingSchemaTemplateReq { |
| pub fn new(session_id: i64, device_path_list: Vec<String>) -> TCreateTimeseriesUsingSchemaTemplateReq { |
| TCreateTimeseriesUsingSchemaTemplateReq { |
| session_id, |
| device_path_list, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TCreateTimeseriesUsingSchemaTemplateReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_101 = i_prot.read_string()?; |
| val.push(list_elem_101); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TCreateTimeseriesUsingSchemaTemplateReq.session_id", &f_1)?; |
| verify_required_field_exists("TCreateTimeseriesUsingSchemaTemplateReq.device_path_list", &f_2)?; |
| let ret = TCreateTimeseriesUsingSchemaTemplateReq { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| device_path_list: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TCreateTimeseriesUsingSchemaTemplateReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("devicePathList", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.device_path_list.len() as i32))?; |
| for e in &self.device_path_list { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSyncIdentityInfo |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSyncIdentityInfo { |
| pub pipe_name: String, |
| pub create_time: i64, |
| pub version: String, |
| pub database: String, |
| } |
| |
| impl TSyncIdentityInfo { |
| pub fn new(pipe_name: String, create_time: i64, version: String, database: String) -> TSyncIdentityInfo { |
| TSyncIdentityInfo { |
| pipe_name, |
| create_time, |
| version, |
| database, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSyncIdentityInfo> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<String> = None; |
| let mut f_2: Option<i64> = None; |
| let mut f_3: Option<String> = None; |
| let mut f_4: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_string()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i64()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_string()?; |
| f_4 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSyncIdentityInfo.pipe_name", &f_1)?; |
| verify_required_field_exists("TSyncIdentityInfo.create_time", &f_2)?; |
| verify_required_field_exists("TSyncIdentityInfo.version", &f_3)?; |
| verify_required_field_exists("TSyncIdentityInfo.database", &f_4)?; |
| let ret = TSyncIdentityInfo { |
| pipe_name: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| create_time: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| version: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| database: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSyncIdentityInfo"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("pipeName", TType::String, 1))?; |
| o_prot.write_string(&self.pipe_name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("createTime", TType::I64, 2))?; |
| o_prot.write_i64(self.create_time)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("version", TType::String, 3))?; |
| o_prot.write_string(&self.version)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("database", TType::String, 4))?; |
| o_prot.write_string(&self.database)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSyncTransportMetaInfo |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSyncTransportMetaInfo { |
| pub file_name: String, |
| pub start_index: i64, |
| } |
| |
| impl TSyncTransportMetaInfo { |
| pub fn new(file_name: String, start_index: i64) -> TSyncTransportMetaInfo { |
| TSyncTransportMetaInfo { |
| file_name, |
| start_index, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSyncTransportMetaInfo> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<String> = None; |
| let mut f_2: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_string()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i64()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSyncTransportMetaInfo.file_name", &f_1)?; |
| verify_required_field_exists("TSyncTransportMetaInfo.start_index", &f_2)?; |
| let ret = TSyncTransportMetaInfo { |
| file_name: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| start_index: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSyncTransportMetaInfo"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("fileName", TType::String, 1))?; |
| o_prot.write_string(&self.file_name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("startIndex", TType::I64, 2))?; |
| o_prot.write_i64(self.start_index)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TPipeTransferReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TPipeTransferReq { |
| pub version: i8, |
| pub type_: i16, |
| pub body: Vec<u8>, |
| } |
| |
| impl TPipeTransferReq { |
| pub fn new(version: i8, type_: i16, body: Vec<u8>) -> TPipeTransferReq { |
| TPipeTransferReq { |
| version, |
| type_, |
| body, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TPipeTransferReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i8> = None; |
| let mut f_2: Option<i16> = None; |
| let mut f_3: Option<Vec<u8>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i8()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i16()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_bytes()?; |
| f_3 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TPipeTransferReq.version", &f_1)?; |
| verify_required_field_exists("TPipeTransferReq.type_", &f_2)?; |
| verify_required_field_exists("TPipeTransferReq.body", &f_3)?; |
| let ret = TPipeTransferReq { |
| version: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| type_: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| body: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TPipeTransferReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("version", TType::I08, 1))?; |
| o_prot.write_i8(self.version)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("type", TType::I16, 2))?; |
| o_prot.write_i16(self.type_)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("body", TType::String, 3))?; |
| o_prot.write_bytes(&self.body)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TPipeTransferResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TPipeTransferResp { |
| pub status: common::TSStatus, |
| pub body: Option<Vec<u8>>, |
| } |
| |
| impl TPipeTransferResp { |
| pub fn new<F2>(status: common::TSStatus, body: F2) -> TPipeTransferResp where F2: Into<Option<Vec<u8>>> { |
| TPipeTransferResp { |
| status, |
| body: body.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TPipeTransferResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<common::TSStatus> = None; |
| let mut f_2: Option<Vec<u8>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_bytes()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TPipeTransferResp.status", &f_1)?; |
| let ret = TPipeTransferResp { |
| status: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| body: f_2, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TPipeTransferResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?; |
| self.status.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.body { |
| o_prot.write_field_begin(&TFieldIdentifier::new("body", TType::String, 2))?; |
| o_prot.write_bytes(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TPipeSubscribeReq |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TPipeSubscribeReq { |
| pub version: i8, |
| pub type_: i16, |
| pub body: Option<Vec<u8>>, |
| } |
| |
| impl TPipeSubscribeReq { |
| pub fn new<F3>(version: i8, type_: i16, body: F3) -> TPipeSubscribeReq where F3: Into<Option<Vec<u8>>> { |
| TPipeSubscribeReq { |
| version, |
| type_, |
| body: body.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TPipeSubscribeReq> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i8> = None; |
| let mut f_2: Option<i16> = None; |
| let mut f_3: Option<Vec<u8>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i8()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i16()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_bytes()?; |
| f_3 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TPipeSubscribeReq.version", &f_1)?; |
| verify_required_field_exists("TPipeSubscribeReq.type_", &f_2)?; |
| let ret = TPipeSubscribeReq { |
| version: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| type_: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| body: f_3, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TPipeSubscribeReq"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("version", TType::I08, 1))?; |
| o_prot.write_i8(self.version)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("type", TType::I16, 2))?; |
| o_prot.write_i16(self.type_)?; |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.body { |
| o_prot.write_field_begin(&TFieldIdentifier::new("body", TType::String, 3))?; |
| o_prot.write_bytes(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TPipeSubscribeResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TPipeSubscribeResp { |
| pub status: common::TSStatus, |
| pub version: i8, |
| pub type_: i16, |
| pub body: Option<Vec<Vec<u8>>>, |
| } |
| |
| impl TPipeSubscribeResp { |
| pub fn new<F4>(status: common::TSStatus, version: i8, type_: i16, body: F4) -> TPipeSubscribeResp where F4: Into<Option<Vec<Vec<u8>>>> { |
| TPipeSubscribeResp { |
| status, |
| version, |
| type_, |
| body: body.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TPipeSubscribeResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<common::TSStatus> = None; |
| let mut f_2: Option<i8> = None; |
| let mut f_3: Option<i16> = None; |
| let mut f_4: Option<Vec<Vec<u8>>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i8()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_i16()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<Vec<u8>> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_102 = i_prot.read_bytes()?; |
| val.push(list_elem_102); |
| } |
| i_prot.read_list_end()?; |
| f_4 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TPipeSubscribeResp.status", &f_1)?; |
| verify_required_field_exists("TPipeSubscribeResp.version", &f_2)?; |
| verify_required_field_exists("TPipeSubscribeResp.type_", &f_3)?; |
| let ret = TPipeSubscribeResp { |
| status: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| version: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| type_: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| body: f_4, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TPipeSubscribeResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?; |
| self.status.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("version", TType::I08, 2))?; |
| o_prot.write_i8(self.version)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("type", TType::I16, 3))?; |
| o_prot.write_i16(self.type_)?; |
| o_prot.write_field_end()?; |
| if let Some(ref fld_var) = self.body { |
| o_prot.write_field_begin(&TFieldIdentifier::new("body", TType::List, 4))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, fld_var.len() as i32))?; |
| for e in fld_var { |
| o_prot.write_bytes(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSBackupConfigurationResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSBackupConfigurationResp { |
| pub status: common::TSStatus, |
| pub enable_operation_sync: Option<bool>, |
| pub secondary_address: Option<String>, |
| pub secondary_port: Option<i32>, |
| } |
| |
| impl TSBackupConfigurationResp { |
| pub fn new<F2, F3, F4>(status: common::TSStatus, enable_operation_sync: F2, secondary_address: F3, secondary_port: F4) -> TSBackupConfigurationResp where F2: Into<Option<bool>>, F3: Into<Option<String>>, F4: Into<Option<i32>> { |
| TSBackupConfigurationResp { |
| status, |
| enable_operation_sync: enable_operation_sync.into(), |
| secondary_address: secondary_address.into(), |
| secondary_port: secondary_port.into(), |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSBackupConfigurationResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<common::TSStatus> = None; |
| let mut f_2: Option<bool> = None; |
| let mut f_3: Option<String> = None; |
| let mut f_4: Option<i32> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_bool()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = i_prot.read_i32()?; |
| f_4 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSBackupConfigurationResp.status", &f_1)?; |
| let ret = TSBackupConfigurationResp { |
| status: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| enable_operation_sync: f_2, |
| secondary_address: f_3, |
| secondary_port: f_4, |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSBackupConfigurationResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("status", TType::Struct, 1))?; |
| self.status.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| if let Some(fld_var) = self.enable_operation_sync { |
| o_prot.write_field_begin(&TFieldIdentifier::new("enableOperationSync", TType::Bool, 2))?; |
| o_prot.write_bool(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(ref fld_var) = self.secondary_address { |
| o_prot.write_field_begin(&TFieldIdentifier::new("secondaryAddress", TType::String, 3))?; |
| o_prot.write_string(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| if let Some(fld_var) = self.secondary_port { |
| o_prot.write_field_begin(&TFieldIdentifier::new("secondaryPort", TType::I32, 4))?; |
| o_prot.write_i32(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSConnectionInfo |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSConnectionInfo { |
| pub user_name: String, |
| pub log_in_time: i64, |
| pub connection_id: String, |
| pub type_: TSConnectionType, |
| } |
| |
| impl TSConnectionInfo { |
| pub fn new(user_name: String, log_in_time: i64, connection_id: String, type_: TSConnectionType) -> TSConnectionInfo { |
| TSConnectionInfo { |
| user_name, |
| log_in_time, |
| connection_id, |
| type_, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSConnectionInfo> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<String> = None; |
| let mut f_2: Option<i64> = None; |
| let mut f_3: Option<String> = None; |
| let mut f_4: Option<TSConnectionType> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_string()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_i64()?; |
| f_2 = Some(val); |
| }, |
| 3 => { |
| let val = i_prot.read_string()?; |
| f_3 = Some(val); |
| }, |
| 4 => { |
| let val = TSConnectionType::read_from_in_protocol(i_prot)?; |
| f_4 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSConnectionInfo.user_name", &f_1)?; |
| verify_required_field_exists("TSConnectionInfo.log_in_time", &f_2)?; |
| verify_required_field_exists("TSConnectionInfo.connection_id", &f_3)?; |
| verify_required_field_exists("TSConnectionInfo.type_", &f_4)?; |
| let ret = TSConnectionInfo { |
| user_name: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| log_in_time: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| connection_id: f_3.expect("auto-generated code should have checked for presence of required fields"), |
| type_: f_4.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSConnectionInfo"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("userName", TType::String, 1))?; |
| o_prot.write_string(&self.user_name)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("logInTime", TType::I64, 2))?; |
| o_prot.write_i64(self.log_in_time)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("connectionId", TType::String, 3))?; |
| o_prot.write_string(&self.connection_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("type", TType::I32, 4))?; |
| self.type_.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // TSConnectionInfoResp |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| pub struct TSConnectionInfoResp { |
| pub connection_info_list: Vec<TSConnectionInfo>, |
| } |
| |
| impl TSConnectionInfoResp { |
| pub fn new(connection_info_list: Vec<TSConnectionInfo>) -> TSConnectionInfoResp { |
| TSConnectionInfoResp { |
| connection_info_list, |
| } |
| } |
| pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<TSConnectionInfoResp> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<Vec<TSConnectionInfo>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<TSConnectionInfo> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_103 = TSConnectionInfo::read_from_in_protocol(i_prot)?; |
| val.push(list_elem_103); |
| } |
| i_prot.read_list_end()?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("TSConnectionInfoResp.connection_info_list", &f_1)?; |
| let ret = TSConnectionInfoResp { |
| connection_info_list: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| pub fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("TSConnectionInfoResp"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("connectionInfoList", TType::List, 1))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::Struct, self.connection_info_list.len() as i32))?; |
| for e in &self.connection_info_list { |
| e.write_to_out_protocol(o_prot)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCService service client |
| // |
| |
| pub trait TIClientRPCServiceSyncClient { |
| fn execute_query_statement_v2(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_update_statement_v2(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_statement_v2(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_raw_data_query_v2(&mut self, req: TSRawDataQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_last_data_query_v2(&mut self, req: TSLastDataQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_fast_last_data_query_for_one_prefix_path(&mut self, req: TSFastLastDataQueryForOnePrefixPathReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_fast_last_data_query_for_one_device_v2(&mut self, req: TSFastLastDataQueryForOneDeviceReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_aggregation_query_v2(&mut self, req: TSAggregationQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn fetch_results_v2(&mut self, req: TSFetchResultsReq) -> thrift::Result<TSFetchResultsResp>; |
| fn open_session(&mut self, req: TSOpenSessionReq) -> thrift::Result<TSOpenSessionResp>; |
| fn close_session(&mut self, req: TSCloseSessionReq) -> thrift::Result<common::TSStatus>; |
| fn execute_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_batch_statement(&mut self, req: TSExecuteBatchStatementReq) -> thrift::Result<common::TSStatus>; |
| fn execute_query_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_update_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn fetch_results(&mut self, req: TSFetchResultsReq) -> thrift::Result<TSFetchResultsResp>; |
| fn fetch_metadata(&mut self, req: TSFetchMetadataReq) -> thrift::Result<TSFetchMetadataResp>; |
| fn cancel_operation(&mut self, req: TSCancelOperationReq) -> thrift::Result<common::TSStatus>; |
| fn close_operation(&mut self, req: TSCloseOperationReq) -> thrift::Result<common::TSStatus>; |
| fn prepare_statement(&mut self, req: TSPrepareReq) -> thrift::Result<TSPrepareResp>; |
| fn execute_prepared_statement(&mut self, req: TSExecutePreparedReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn deallocate_prepared_statement(&mut self, req: TSDeallocatePreparedReq) -> thrift::Result<common::TSStatus>; |
| fn get_time_zone(&mut self, session_id: i64) -> thrift::Result<TSGetTimeZoneResp>; |
| fn set_time_zone(&mut self, req: TSSetTimeZoneReq) -> thrift::Result<common::TSStatus>; |
| fn get_properties(&mut self) -> thrift::Result<ServerProperties>; |
| fn set_storage_group(&mut self, session_id: i64, storage_group: String) -> thrift::Result<common::TSStatus>; |
| fn create_timeseries(&mut self, req: TSCreateTimeseriesReq) -> thrift::Result<common::TSStatus>; |
| fn create_aligned_timeseries(&mut self, req: TSCreateAlignedTimeseriesReq) -> thrift::Result<common::TSStatus>; |
| fn create_multi_timeseries(&mut self, req: TSCreateMultiTimeseriesReq) -> thrift::Result<common::TSStatus>; |
| fn delete_timeseries(&mut self, session_id: i64, path: Vec<String>) -> thrift::Result<common::TSStatus>; |
| fn delete_storage_groups(&mut self, session_id: i64, storage_group: Vec<String>) -> thrift::Result<common::TSStatus>; |
| fn insert_record(&mut self, req: TSInsertRecordReq) -> thrift::Result<common::TSStatus>; |
| fn insert_string_record(&mut self, req: TSInsertStringRecordReq) -> thrift::Result<common::TSStatus>; |
| fn insert_tablet(&mut self, req: TSInsertTabletReq) -> thrift::Result<common::TSStatus>; |
| fn insert_tablets(&mut self, req: TSInsertTabletsReq) -> thrift::Result<common::TSStatus>; |
| fn insert_records(&mut self, req: TSInsertRecordsReq) -> thrift::Result<common::TSStatus>; |
| fn insert_records_of_one_device(&mut self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<common::TSStatus>; |
| fn insert_string_records_of_one_device(&mut self, req: TSInsertStringRecordsOfOneDeviceReq) -> thrift::Result<common::TSStatus>; |
| fn insert_string_records(&mut self, req: TSInsertStringRecordsReq) -> thrift::Result<common::TSStatus>; |
| fn test_insert_tablet(&mut self, req: TSInsertTabletReq) -> thrift::Result<common::TSStatus>; |
| fn test_insert_tablets(&mut self, req: TSInsertTabletsReq) -> thrift::Result<common::TSStatus>; |
| fn test_insert_record(&mut self, req: TSInsertRecordReq) -> thrift::Result<common::TSStatus>; |
| fn test_insert_string_record(&mut self, req: TSInsertStringRecordReq) -> thrift::Result<common::TSStatus>; |
| fn test_insert_records(&mut self, req: TSInsertRecordsReq) -> thrift::Result<common::TSStatus>; |
| fn test_insert_records_of_one_device(&mut self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<common::TSStatus>; |
| fn test_insert_string_records(&mut self, req: TSInsertStringRecordsReq) -> thrift::Result<common::TSStatus>; |
| fn delete_data(&mut self, req: TSDeleteDataReq) -> thrift::Result<common::TSStatus>; |
| fn execute_raw_data_query(&mut self, req: TSRawDataQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_last_data_query(&mut self, req: TSLastDataQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn execute_aggregation_query(&mut self, req: TSAggregationQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn request_statement_id(&mut self, session_id: i64) -> thrift::Result<i64>; |
| fn create_schema_template(&mut self, req: TSCreateSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn append_schema_template(&mut self, req: TSAppendSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn prune_schema_template(&mut self, req: TSPruneSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn query_schema_template(&mut self, req: TSQueryTemplateReq) -> thrift::Result<TSQueryTemplateResp>; |
| fn show_configuration_template(&mut self) -> thrift::Result<common::TShowConfigurationTemplateResp>; |
| fn show_configuration(&mut self, node_id: i32) -> thrift::Result<common::TShowConfigurationResp>; |
| fn set_schema_template(&mut self, req: TSSetSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn unset_schema_template(&mut self, req: TSUnsetSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn drop_schema_template(&mut self, req: TSDropSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn create_timeseries_using_schema_template(&mut self, req: TCreateTimeseriesUsingSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn handshake(&mut self, info: TSyncIdentityInfo) -> thrift::Result<common::TSStatus>; |
| fn send_pipe_data(&mut self, buff: Vec<u8>) -> thrift::Result<common::TSStatus>; |
| fn send_file(&mut self, meta_info: TSyncTransportMetaInfo, buff: Vec<u8>) -> thrift::Result<common::TSStatus>; |
| fn pipe_transfer(&mut self, req: TPipeTransferReq) -> thrift::Result<TPipeTransferResp>; |
| fn pipe_subscribe(&mut self, req: TPipeSubscribeReq) -> thrift::Result<TPipeSubscribeResp>; |
| fn get_backup_configuration(&mut self) -> thrift::Result<TSBackupConfigurationResp>; |
| fn fetch_all_connections_info(&mut self) -> thrift::Result<TSConnectionInfoResp>; |
| /// For other node's call |
| fn test_connection_empty_r_p_c(&mut self) -> thrift::Result<common::TSStatus>; |
| } |
| |
| pub trait TIClientRPCServiceSyncClientMarker {} |
| |
| pub struct IClientRPCServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol { |
| _i_prot: IP, |
| _o_prot: OP, |
| _sequence_number: i32, |
| } |
| |
| impl <IP, OP> IClientRPCServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol { |
| pub fn new(input_protocol: IP, output_protocol: OP) -> IClientRPCServiceSyncClient<IP, OP> { |
| IClientRPCServiceSyncClient { _i_prot: input_protocol, _o_prot: output_protocol, _sequence_number: 0 } |
| } |
| } |
| |
| impl <IP, OP> TThriftClient for IClientRPCServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol { |
| fn i_prot_mut(&mut self) -> &mut dyn TInputProtocol { &mut self._i_prot } |
| fn o_prot_mut(&mut self) -> &mut dyn TOutputProtocol { &mut self._o_prot } |
| fn sequence_number(&self) -> i32 { self._sequence_number } |
| fn increment_sequence_number(&mut self) -> i32 { self._sequence_number += 1; self._sequence_number } |
| } |
| |
| impl <IP, OP> TIClientRPCServiceSyncClientMarker for IClientRPCServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {} |
| |
| impl <C: TThriftClient + TIClientRPCServiceSyncClientMarker> TIClientRPCServiceSyncClient for C { |
| fn execute_query_statement_v2(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeQueryStatementV2", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteQueryStatementV2Args { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeQueryStatementV2", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteQueryStatementV2Result::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_update_statement_v2(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeUpdateStatementV2", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteUpdateStatementV2Args { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeUpdateStatementV2", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteUpdateStatementV2Result::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_statement_v2(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeStatementV2", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteStatementV2Args { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeStatementV2", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteStatementV2Result::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_raw_data_query_v2(&mut self, req: TSRawDataQueryReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeRawDataQueryV2", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteRawDataQueryV2Args { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeRawDataQueryV2", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteRawDataQueryV2Result::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_last_data_query_v2(&mut self, req: TSLastDataQueryReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeLastDataQueryV2", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteLastDataQueryV2Args { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeLastDataQueryV2", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteLastDataQueryV2Result::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_fast_last_data_query_for_one_prefix_path(&mut self, req: TSFastLastDataQueryForOnePrefixPathReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeFastLastDataQueryForOnePrefixPath", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeFastLastDataQueryForOnePrefixPath", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_fast_last_data_query_for_one_device_v2(&mut self, req: TSFastLastDataQueryForOneDeviceReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeFastLastDataQueryForOneDeviceV2", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeFastLastDataQueryForOneDeviceV2", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_aggregation_query_v2(&mut self, req: TSAggregationQueryReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeAggregationQueryV2", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteAggregationQueryV2Args { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeAggregationQueryV2", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteAggregationQueryV2Result::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn fetch_results_v2(&mut self, req: TSFetchResultsReq) -> thrift::Result<TSFetchResultsResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("fetchResultsV2", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceFetchResultsV2Args { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("fetchResultsV2", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceFetchResultsV2Result::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn open_session(&mut self, req: TSOpenSessionReq) -> thrift::Result<TSOpenSessionResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("openSession", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceOpenSessionArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("openSession", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceOpenSessionResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn close_session(&mut self, req: TSCloseSessionReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("closeSession", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceCloseSessionArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("closeSession", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceCloseSessionResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeStatement", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteStatementArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeStatement", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteStatementResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_batch_statement(&mut self, req: TSExecuteBatchStatementReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeBatchStatement", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteBatchStatementArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeBatchStatement", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteBatchStatementResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_query_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeQueryStatement", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteQueryStatementArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeQueryStatement", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteQueryStatementResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_update_statement(&mut self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeUpdateStatement", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteUpdateStatementArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeUpdateStatement", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteUpdateStatementResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn fetch_results(&mut self, req: TSFetchResultsReq) -> thrift::Result<TSFetchResultsResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("fetchResults", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceFetchResultsArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("fetchResults", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceFetchResultsResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn fetch_metadata(&mut self, req: TSFetchMetadataReq) -> thrift::Result<TSFetchMetadataResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("fetchMetadata", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceFetchMetadataArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("fetchMetadata", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceFetchMetadataResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn cancel_operation(&mut self, req: TSCancelOperationReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("cancelOperation", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceCancelOperationArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("cancelOperation", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceCancelOperationResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn close_operation(&mut self, req: TSCloseOperationReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("closeOperation", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceCloseOperationArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("closeOperation", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceCloseOperationResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn prepare_statement(&mut self, req: TSPrepareReq) -> thrift::Result<TSPrepareResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("prepareStatement", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServicePrepareStatementArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("prepareStatement", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServicePrepareStatementResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_prepared_statement(&mut self, req: TSExecutePreparedReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executePreparedStatement", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecutePreparedStatementArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executePreparedStatement", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecutePreparedStatementResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn deallocate_prepared_statement(&mut self, req: TSDeallocatePreparedReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("deallocatePreparedStatement", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceDeallocatePreparedStatementArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("deallocatePreparedStatement", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceDeallocatePreparedStatementResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn get_time_zone(&mut self, session_id: i64) -> thrift::Result<TSGetTimeZoneResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("getTimeZone", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceGetTimeZoneArgs { session_id }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("getTimeZone", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceGetTimeZoneResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn set_time_zone(&mut self, req: TSSetTimeZoneReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("setTimeZone", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceSetTimeZoneArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("setTimeZone", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceSetTimeZoneResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn get_properties(&mut self) -> thrift::Result<ServerProperties> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("getProperties", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceGetPropertiesArgs { }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("getProperties", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceGetPropertiesResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn set_storage_group(&mut self, session_id: i64, storage_group: String) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("setStorageGroup", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceSetStorageGroupArgs { session_id, storage_group }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("setStorageGroup", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceSetStorageGroupResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn create_timeseries(&mut self, req: TSCreateTimeseriesReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("createTimeseries", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceCreateTimeseriesArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("createTimeseries", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceCreateTimeseriesResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn create_aligned_timeseries(&mut self, req: TSCreateAlignedTimeseriesReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("createAlignedTimeseries", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceCreateAlignedTimeseriesArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("createAlignedTimeseries", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceCreateAlignedTimeseriesResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn create_multi_timeseries(&mut self, req: TSCreateMultiTimeseriesReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("createMultiTimeseries", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceCreateMultiTimeseriesArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("createMultiTimeseries", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceCreateMultiTimeseriesResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn delete_timeseries(&mut self, session_id: i64, path: Vec<String>) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("deleteTimeseries", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceDeleteTimeseriesArgs { session_id, path }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("deleteTimeseries", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceDeleteTimeseriesResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn delete_storage_groups(&mut self, session_id: i64, storage_group: Vec<String>) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("deleteStorageGroups", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceDeleteStorageGroupsArgs { session_id, storage_group }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("deleteStorageGroups", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceDeleteStorageGroupsResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn insert_record(&mut self, req: TSInsertRecordReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("insertRecord", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceInsertRecordArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("insertRecord", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceInsertRecordResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn insert_string_record(&mut self, req: TSInsertStringRecordReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("insertStringRecord", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceInsertStringRecordArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("insertStringRecord", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceInsertStringRecordResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn insert_tablet(&mut self, req: TSInsertTabletReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("insertTablet", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceInsertTabletArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("insertTablet", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceInsertTabletResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn insert_tablets(&mut self, req: TSInsertTabletsReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("insertTablets", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceInsertTabletsArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("insertTablets", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceInsertTabletsResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn insert_records(&mut self, req: TSInsertRecordsReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("insertRecords", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceInsertRecordsArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("insertRecords", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceInsertRecordsResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn insert_records_of_one_device(&mut self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("insertRecordsOfOneDevice", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceInsertRecordsOfOneDeviceArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("insertRecordsOfOneDevice", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceInsertRecordsOfOneDeviceResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn insert_string_records_of_one_device(&mut self, req: TSInsertStringRecordsOfOneDeviceReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("insertStringRecordsOfOneDevice", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceInsertStringRecordsOfOneDeviceArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("insertStringRecordsOfOneDevice", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceInsertStringRecordsOfOneDeviceResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn insert_string_records(&mut self, req: TSInsertStringRecordsReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("insertStringRecords", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceInsertStringRecordsArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("insertStringRecords", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceInsertStringRecordsResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn test_insert_tablet(&mut self, req: TSInsertTabletReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("testInsertTablet", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceTestInsertTabletArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("testInsertTablet", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceTestInsertTabletResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn test_insert_tablets(&mut self, req: TSInsertTabletsReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("testInsertTablets", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceTestInsertTabletsArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("testInsertTablets", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceTestInsertTabletsResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn test_insert_record(&mut self, req: TSInsertRecordReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("testInsertRecord", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceTestInsertRecordArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("testInsertRecord", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceTestInsertRecordResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn test_insert_string_record(&mut self, req: TSInsertStringRecordReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("testInsertStringRecord", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceTestInsertStringRecordArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("testInsertStringRecord", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceTestInsertStringRecordResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn test_insert_records(&mut self, req: TSInsertRecordsReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("testInsertRecords", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceTestInsertRecordsArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("testInsertRecords", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceTestInsertRecordsResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn test_insert_records_of_one_device(&mut self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("testInsertRecordsOfOneDevice", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceTestInsertRecordsOfOneDeviceArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("testInsertRecordsOfOneDevice", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceTestInsertRecordsOfOneDeviceResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn test_insert_string_records(&mut self, req: TSInsertStringRecordsReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("testInsertStringRecords", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceTestInsertStringRecordsArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("testInsertStringRecords", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceTestInsertStringRecordsResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn delete_data(&mut self, req: TSDeleteDataReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("deleteData", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceDeleteDataArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("deleteData", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceDeleteDataResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_raw_data_query(&mut self, req: TSRawDataQueryReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeRawDataQuery", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteRawDataQueryArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeRawDataQuery", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteRawDataQueryResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_last_data_query(&mut self, req: TSLastDataQueryReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeLastDataQuery", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteLastDataQueryArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeLastDataQuery", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteLastDataQueryResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn execute_aggregation_query(&mut self, req: TSAggregationQueryReq) -> thrift::Result<TSExecuteStatementResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("executeAggregationQuery", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceExecuteAggregationQueryArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("executeAggregationQuery", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceExecuteAggregationQueryResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn request_statement_id(&mut self, session_id: i64) -> thrift::Result<i64> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("requestStatementId", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceRequestStatementIdArgs { session_id }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("requestStatementId", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceRequestStatementIdResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn create_schema_template(&mut self, req: TSCreateSchemaTemplateReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("createSchemaTemplate", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceCreateSchemaTemplateArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("createSchemaTemplate", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceCreateSchemaTemplateResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn append_schema_template(&mut self, req: TSAppendSchemaTemplateReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("appendSchemaTemplate", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceAppendSchemaTemplateArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("appendSchemaTemplate", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceAppendSchemaTemplateResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn prune_schema_template(&mut self, req: TSPruneSchemaTemplateReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("pruneSchemaTemplate", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServicePruneSchemaTemplateArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("pruneSchemaTemplate", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServicePruneSchemaTemplateResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn query_schema_template(&mut self, req: TSQueryTemplateReq) -> thrift::Result<TSQueryTemplateResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("querySchemaTemplate", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceQuerySchemaTemplateArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("querySchemaTemplate", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceQuerySchemaTemplateResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn show_configuration_template(&mut self) -> thrift::Result<common::TShowConfigurationTemplateResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("showConfigurationTemplate", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceShowConfigurationTemplateArgs { }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("showConfigurationTemplate", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceShowConfigurationTemplateResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn show_configuration(&mut self, node_id: i32) -> thrift::Result<common::TShowConfigurationResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("showConfiguration", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceShowConfigurationArgs { node_id }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("showConfiguration", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceShowConfigurationResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn set_schema_template(&mut self, req: TSSetSchemaTemplateReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("setSchemaTemplate", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceSetSchemaTemplateArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("setSchemaTemplate", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceSetSchemaTemplateResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn unset_schema_template(&mut self, req: TSUnsetSchemaTemplateReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("unsetSchemaTemplate", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceUnsetSchemaTemplateArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("unsetSchemaTemplate", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceUnsetSchemaTemplateResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn drop_schema_template(&mut self, req: TSDropSchemaTemplateReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("dropSchemaTemplate", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceDropSchemaTemplateArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("dropSchemaTemplate", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceDropSchemaTemplateResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn create_timeseries_using_schema_template(&mut self, req: TCreateTimeseriesUsingSchemaTemplateReq) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("createTimeseriesUsingSchemaTemplate", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("createTimeseriesUsingSchemaTemplate", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn handshake(&mut self, info: TSyncIdentityInfo) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("handshake", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceHandshakeArgs { info }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("handshake", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceHandshakeResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn send_pipe_data(&mut self, buff: Vec<u8>) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("sendPipeData", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceSendPipeDataArgs { buff }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("sendPipeData", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceSendPipeDataResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn send_file(&mut self, meta_info: TSyncTransportMetaInfo, buff: Vec<u8>) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("sendFile", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceSendFileArgs { meta_info, buff }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("sendFile", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceSendFileResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn pipe_transfer(&mut self, req: TPipeTransferReq) -> thrift::Result<TPipeTransferResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("pipeTransfer", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServicePipeTransferArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("pipeTransfer", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServicePipeTransferResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn pipe_subscribe(&mut self, req: TPipeSubscribeReq) -> thrift::Result<TPipeSubscribeResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("pipeSubscribe", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServicePipeSubscribeArgs { req }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("pipeSubscribe", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServicePipeSubscribeResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn get_backup_configuration(&mut self) -> thrift::Result<TSBackupConfigurationResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("getBackupConfiguration", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceGetBackupConfigurationArgs { }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("getBackupConfiguration", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceGetBackupConfigurationResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn fetch_all_connections_info(&mut self) -> thrift::Result<TSConnectionInfoResp> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("fetchAllConnectionsInfo", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceFetchAllConnectionsInfoArgs { }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("fetchAllConnectionsInfo", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceFetchAllConnectionsInfoResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| fn test_connection_empty_r_p_c(&mut self) -> thrift::Result<common::TSStatus> { |
| ( |
| { |
| self.increment_sequence_number(); |
| let message_ident = TMessageIdentifier::new("testConnectionEmptyRPC", TMessageType::Call, self.sequence_number()); |
| let call_args = IClientRPCServiceTestConnectionEmptyRPCArgs { }; |
| self.o_prot_mut().write_message_begin(&message_ident)?; |
| call_args.write_to_out_protocol(self.o_prot_mut())?; |
| self.o_prot_mut().write_message_end()?; |
| self.o_prot_mut().flush() |
| } |
| )?; |
| { |
| let message_ident = self.i_prot_mut().read_message_begin()?; |
| verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?; |
| verify_expected_service_call("testConnectionEmptyRPC", &message_ident.name)?; |
| if message_ident.message_type == TMessageType::Exception { |
| let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| return Err(thrift::Error::Application(remote_error)) |
| } |
| verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?; |
| let result = IClientRPCServiceTestConnectionEmptyRPCResult::read_from_in_protocol(self.i_prot_mut())?; |
| self.i_prot_mut().read_message_end()?; |
| result.ok_or() |
| } |
| } |
| } |
| |
| // |
| // IClientRPCService service processor |
| // |
| |
| pub trait IClientRPCServiceSyncHandler { |
| fn handle_execute_query_statement_v2(&self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_update_statement_v2(&self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_statement_v2(&self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_raw_data_query_v2(&self, req: TSRawDataQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_last_data_query_v2(&self, req: TSLastDataQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_fast_last_data_query_for_one_prefix_path(&self, req: TSFastLastDataQueryForOnePrefixPathReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_fast_last_data_query_for_one_device_v2(&self, req: TSFastLastDataQueryForOneDeviceReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_aggregation_query_v2(&self, req: TSAggregationQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_fetch_results_v2(&self, req: TSFetchResultsReq) -> thrift::Result<TSFetchResultsResp>; |
| fn handle_open_session(&self, req: TSOpenSessionReq) -> thrift::Result<TSOpenSessionResp>; |
| fn handle_close_session(&self, req: TSCloseSessionReq) -> thrift::Result<common::TSStatus>; |
| fn handle_execute_statement(&self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_batch_statement(&self, req: TSExecuteBatchStatementReq) -> thrift::Result<common::TSStatus>; |
| fn handle_execute_query_statement(&self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_update_statement(&self, req: TSExecuteStatementReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_fetch_results(&self, req: TSFetchResultsReq) -> thrift::Result<TSFetchResultsResp>; |
| fn handle_fetch_metadata(&self, req: TSFetchMetadataReq) -> thrift::Result<TSFetchMetadataResp>; |
| fn handle_cancel_operation(&self, req: TSCancelOperationReq) -> thrift::Result<common::TSStatus>; |
| fn handle_close_operation(&self, req: TSCloseOperationReq) -> thrift::Result<common::TSStatus>; |
| fn handle_prepare_statement(&self, req: TSPrepareReq) -> thrift::Result<TSPrepareResp>; |
| fn handle_execute_prepared_statement(&self, req: TSExecutePreparedReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_deallocate_prepared_statement(&self, req: TSDeallocatePreparedReq) -> thrift::Result<common::TSStatus>; |
| fn handle_get_time_zone(&self, session_id: i64) -> thrift::Result<TSGetTimeZoneResp>; |
| fn handle_set_time_zone(&self, req: TSSetTimeZoneReq) -> thrift::Result<common::TSStatus>; |
| fn handle_get_properties(&self) -> thrift::Result<ServerProperties>; |
| fn handle_set_storage_group(&self, session_id: i64, storage_group: String) -> thrift::Result<common::TSStatus>; |
| fn handle_create_timeseries(&self, req: TSCreateTimeseriesReq) -> thrift::Result<common::TSStatus>; |
| fn handle_create_aligned_timeseries(&self, req: TSCreateAlignedTimeseriesReq) -> thrift::Result<common::TSStatus>; |
| fn handle_create_multi_timeseries(&self, req: TSCreateMultiTimeseriesReq) -> thrift::Result<common::TSStatus>; |
| fn handle_delete_timeseries(&self, session_id: i64, path: Vec<String>) -> thrift::Result<common::TSStatus>; |
| fn handle_delete_storage_groups(&self, session_id: i64, storage_group: Vec<String>) -> thrift::Result<common::TSStatus>; |
| fn handle_insert_record(&self, req: TSInsertRecordReq) -> thrift::Result<common::TSStatus>; |
| fn handle_insert_string_record(&self, req: TSInsertStringRecordReq) -> thrift::Result<common::TSStatus>; |
| fn handle_insert_tablet(&self, req: TSInsertTabletReq) -> thrift::Result<common::TSStatus>; |
| fn handle_insert_tablets(&self, req: TSInsertTabletsReq) -> thrift::Result<common::TSStatus>; |
| fn handle_insert_records(&self, req: TSInsertRecordsReq) -> thrift::Result<common::TSStatus>; |
| fn handle_insert_records_of_one_device(&self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<common::TSStatus>; |
| fn handle_insert_string_records_of_one_device(&self, req: TSInsertStringRecordsOfOneDeviceReq) -> thrift::Result<common::TSStatus>; |
| fn handle_insert_string_records(&self, req: TSInsertStringRecordsReq) -> thrift::Result<common::TSStatus>; |
| fn handle_test_insert_tablet(&self, req: TSInsertTabletReq) -> thrift::Result<common::TSStatus>; |
| fn handle_test_insert_tablets(&self, req: TSInsertTabletsReq) -> thrift::Result<common::TSStatus>; |
| fn handle_test_insert_record(&self, req: TSInsertRecordReq) -> thrift::Result<common::TSStatus>; |
| fn handle_test_insert_string_record(&self, req: TSInsertStringRecordReq) -> thrift::Result<common::TSStatus>; |
| fn handle_test_insert_records(&self, req: TSInsertRecordsReq) -> thrift::Result<common::TSStatus>; |
| fn handle_test_insert_records_of_one_device(&self, req: TSInsertRecordsOfOneDeviceReq) -> thrift::Result<common::TSStatus>; |
| fn handle_test_insert_string_records(&self, req: TSInsertStringRecordsReq) -> thrift::Result<common::TSStatus>; |
| fn handle_delete_data(&self, req: TSDeleteDataReq) -> thrift::Result<common::TSStatus>; |
| fn handle_execute_raw_data_query(&self, req: TSRawDataQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_last_data_query(&self, req: TSLastDataQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_execute_aggregation_query(&self, req: TSAggregationQueryReq) -> thrift::Result<TSExecuteStatementResp>; |
| fn handle_request_statement_id(&self, session_id: i64) -> thrift::Result<i64>; |
| fn handle_create_schema_template(&self, req: TSCreateSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn handle_append_schema_template(&self, req: TSAppendSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn handle_prune_schema_template(&self, req: TSPruneSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn handle_query_schema_template(&self, req: TSQueryTemplateReq) -> thrift::Result<TSQueryTemplateResp>; |
| fn handle_show_configuration_template(&self) -> thrift::Result<common::TShowConfigurationTemplateResp>; |
| fn handle_show_configuration(&self, node_id: i32) -> thrift::Result<common::TShowConfigurationResp>; |
| fn handle_set_schema_template(&self, req: TSSetSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn handle_unset_schema_template(&self, req: TSUnsetSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn handle_drop_schema_template(&self, req: TSDropSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn handle_create_timeseries_using_schema_template(&self, req: TCreateTimeseriesUsingSchemaTemplateReq) -> thrift::Result<common::TSStatus>; |
| fn handle_handshake(&self, info: TSyncIdentityInfo) -> thrift::Result<common::TSStatus>; |
| fn handle_send_pipe_data(&self, buff: Vec<u8>) -> thrift::Result<common::TSStatus>; |
| fn handle_send_file(&self, meta_info: TSyncTransportMetaInfo, buff: Vec<u8>) -> thrift::Result<common::TSStatus>; |
| fn handle_pipe_transfer(&self, req: TPipeTransferReq) -> thrift::Result<TPipeTransferResp>; |
| fn handle_pipe_subscribe(&self, req: TPipeSubscribeReq) -> thrift::Result<TPipeSubscribeResp>; |
| fn handle_get_backup_configuration(&self) -> thrift::Result<TSBackupConfigurationResp>; |
| fn handle_fetch_all_connections_info(&self) -> thrift::Result<TSConnectionInfoResp>; |
| /// For other node's call |
| fn handle_test_connection_empty_r_p_c(&self) -> thrift::Result<common::TSStatus>; |
| } |
| |
| pub struct IClientRPCServiceSyncProcessor<H: IClientRPCServiceSyncHandler> { |
| handler: H, |
| } |
| |
| impl <H: IClientRPCServiceSyncHandler> IClientRPCServiceSyncProcessor<H> { |
| pub fn new(handler: H) -> IClientRPCServiceSyncProcessor<H> { |
| IClientRPCServiceSyncProcessor { |
| handler, |
| } |
| } |
| fn process_execute_query_statement_v2(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_query_statement_v2(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_update_statement_v2(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_update_statement_v2(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_statement_v2(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_statement_v2(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_raw_data_query_v2(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_raw_data_query_v2(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_last_data_query_v2(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_last_data_query_v2(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_fast_last_data_query_for_one_prefix_path(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_fast_last_data_query_for_one_prefix_path(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_fast_last_data_query_for_one_device_v2(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_fast_last_data_query_for_one_device_v2(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_aggregation_query_v2(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_aggregation_query_v2(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_fetch_results_v2(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_fetch_results_v2(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_open_session(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_open_session(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_close_session(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_close_session(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_statement(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_batch_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_batch_statement(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_query_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_query_statement(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_update_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_update_statement(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_fetch_results(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_fetch_results(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_fetch_metadata(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_fetch_metadata(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_cancel_operation(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_cancel_operation(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_close_operation(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_close_operation(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_prepare_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_prepare_statement(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_prepared_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_prepared_statement(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_deallocate_prepared_statement(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_deallocate_prepared_statement(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_get_time_zone(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_get_time_zone(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_set_time_zone(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_set_time_zone(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_get_properties(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_get_properties(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_set_storage_group(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_set_storage_group(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_create_timeseries(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_create_timeseries(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_create_aligned_timeseries(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_create_aligned_timeseries(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_create_multi_timeseries(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_create_multi_timeseries(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_delete_timeseries(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_delete_timeseries(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_delete_storage_groups(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_delete_storage_groups(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_insert_record(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_insert_record(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_insert_string_record(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_insert_string_record(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_insert_tablet(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_insert_tablet(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_insert_tablets(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_insert_tablets(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_insert_records(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_insert_records(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_insert_records_of_one_device(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_insert_records_of_one_device(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_insert_string_records_of_one_device(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_insert_string_records_of_one_device(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_insert_string_records(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_insert_string_records(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_test_insert_tablet(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_test_insert_tablet(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_test_insert_tablets(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_test_insert_tablets(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_test_insert_record(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_test_insert_record(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_test_insert_string_record(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_test_insert_string_record(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_test_insert_records(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_test_insert_records(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| 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<()> { |
| TIClientRPCServiceProcessFunctions::process_test_insert_records_of_one_device(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_test_insert_string_records(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_test_insert_string_records(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_delete_data(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_delete_data(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_raw_data_query(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_raw_data_query(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_last_data_query(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_last_data_query(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_execute_aggregation_query(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_execute_aggregation_query(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_request_statement_id(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_request_statement_id(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_create_schema_template(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_create_schema_template(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_append_schema_template(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_append_schema_template(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_prune_schema_template(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_prune_schema_template(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_query_schema_template(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_query_schema_template(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_show_configuration_template(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_show_configuration_template(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_show_configuration(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_show_configuration(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_set_schema_template(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_set_schema_template(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_unset_schema_template(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_unset_schema_template(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_drop_schema_template(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_drop_schema_template(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_create_timeseries_using_schema_template(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_create_timeseries_using_schema_template(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_handshake(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_handshake(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_send_pipe_data(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_send_pipe_data(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_send_file(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_send_file(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_pipe_transfer(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_pipe_transfer(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_pipe_subscribe(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_pipe_subscribe(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_get_backup_configuration(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_get_backup_configuration(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_fetch_all_connections_info(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_fetch_all_connections_info(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| fn process_test_connection_empty_r_p_c(&self, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| TIClientRPCServiceProcessFunctions::process_test_connection_empty_r_p_c(&self.handler, incoming_sequence_number, i_prot, o_prot) |
| } |
| } |
| |
| pub struct TIClientRPCServiceProcessFunctions; |
| |
| impl TIClientRPCServiceProcessFunctions { |
| pub fn process_execute_query_statement_v2<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteQueryStatementV2Args::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_query_statement_v2(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeQueryStatementV2", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteQueryStatementV2Result { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeQueryStatementV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeQueryStatementV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_update_statement_v2<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteUpdateStatementV2Args::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_update_statement_v2(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeUpdateStatementV2", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteUpdateStatementV2Result { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeUpdateStatementV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeUpdateStatementV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_statement_v2<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteStatementV2Args::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_statement_v2(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeStatementV2", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteStatementV2Result { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeStatementV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeStatementV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_raw_data_query_v2<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteRawDataQueryV2Args::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_raw_data_query_v2(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeRawDataQueryV2", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteRawDataQueryV2Result { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeRawDataQueryV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeRawDataQueryV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_last_data_query_v2<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteLastDataQueryV2Args::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_last_data_query_v2(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeLastDataQueryV2", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteLastDataQueryV2Result { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeLastDataQueryV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeLastDataQueryV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_fast_last_data_query_for_one_prefix_path<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_fast_last_data_query_for_one_prefix_path(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeFastLastDataQueryForOnePrefixPath", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeFastLastDataQueryForOnePrefixPath", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeFastLastDataQueryForOnePrefixPath", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_fast_last_data_query_for_one_device_v2<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_fast_last_data_query_for_one_device_v2(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeFastLastDataQueryForOneDeviceV2", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeFastLastDataQueryForOneDeviceV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeFastLastDataQueryForOneDeviceV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_aggregation_query_v2<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteAggregationQueryV2Args::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_aggregation_query_v2(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeAggregationQueryV2", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteAggregationQueryV2Result { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeAggregationQueryV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeAggregationQueryV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_fetch_results_v2<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceFetchResultsV2Args::read_from_in_protocol(i_prot)?; |
| match handler.handle_fetch_results_v2(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("fetchResultsV2", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceFetchResultsV2Result { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("fetchResultsV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("fetchResultsV2", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_open_session<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceOpenSessionArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_open_session(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("openSession", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceOpenSessionResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("openSession", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("openSession", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_close_session<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceCloseSessionArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_close_session(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("closeSession", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceCloseSessionResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("closeSession", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("closeSession", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_statement<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteStatementArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_statement(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeStatement", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteStatementResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_batch_statement<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteBatchStatementArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_batch_statement(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeBatchStatement", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteBatchStatementResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeBatchStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeBatchStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_query_statement<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteQueryStatementArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_query_statement(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeQueryStatement", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteQueryStatementResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeQueryStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeQueryStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_update_statement<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteUpdateStatementArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_update_statement(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeUpdateStatement", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteUpdateStatementResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeUpdateStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeUpdateStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_fetch_results<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceFetchResultsArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_fetch_results(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("fetchResults", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceFetchResultsResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("fetchResults", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("fetchResults", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_fetch_metadata<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceFetchMetadataArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_fetch_metadata(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("fetchMetadata", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceFetchMetadataResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("fetchMetadata", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("fetchMetadata", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_cancel_operation<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceCancelOperationArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_cancel_operation(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("cancelOperation", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceCancelOperationResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("cancelOperation", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("cancelOperation", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_close_operation<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceCloseOperationArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_close_operation(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("closeOperation", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceCloseOperationResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("closeOperation", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("closeOperation", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_prepare_statement<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServicePrepareStatementArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_prepare_statement(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("prepareStatement", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServicePrepareStatementResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("prepareStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("prepareStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_prepared_statement<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecutePreparedStatementArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_prepared_statement(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executePreparedStatement", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecutePreparedStatementResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executePreparedStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executePreparedStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_deallocate_prepared_statement<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceDeallocatePreparedStatementArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_deallocate_prepared_statement(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("deallocatePreparedStatement", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceDeallocatePreparedStatementResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("deallocatePreparedStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("deallocatePreparedStatement", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_get_time_zone<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceGetTimeZoneArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_get_time_zone(args.session_id) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("getTimeZone", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceGetTimeZoneResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("getTimeZone", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("getTimeZone", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_set_time_zone<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceSetTimeZoneArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_set_time_zone(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("setTimeZone", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceSetTimeZoneResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("setTimeZone", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("setTimeZone", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_get_properties<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let _ = IClientRPCServiceGetPropertiesArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_get_properties() { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("getProperties", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceGetPropertiesResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("getProperties", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("getProperties", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_set_storage_group<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceSetStorageGroupArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_set_storage_group(args.session_id, args.storage_group) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("setStorageGroup", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceSetStorageGroupResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("setStorageGroup", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("setStorageGroup", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_create_timeseries<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceCreateTimeseriesArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_create_timeseries(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("createTimeseries", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceCreateTimeseriesResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("createTimeseries", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("createTimeseries", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_create_aligned_timeseries<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceCreateAlignedTimeseriesArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_create_aligned_timeseries(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("createAlignedTimeseries", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceCreateAlignedTimeseriesResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("createAlignedTimeseries", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("createAlignedTimeseries", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_create_multi_timeseries<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceCreateMultiTimeseriesArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_create_multi_timeseries(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("createMultiTimeseries", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceCreateMultiTimeseriesResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("createMultiTimeseries", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("createMultiTimeseries", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_delete_timeseries<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceDeleteTimeseriesArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_delete_timeseries(args.session_id, args.path) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("deleteTimeseries", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceDeleteTimeseriesResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("deleteTimeseries", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("deleteTimeseries", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_delete_storage_groups<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceDeleteStorageGroupsArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_delete_storage_groups(args.session_id, args.storage_group) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("deleteStorageGroups", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceDeleteStorageGroupsResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("deleteStorageGroups", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("deleteStorageGroups", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_insert_record<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceInsertRecordArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_insert_record(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("insertRecord", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceInsertRecordResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("insertRecord", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("insertRecord", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_insert_string_record<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceInsertStringRecordArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_insert_string_record(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("insertStringRecord", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceInsertStringRecordResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("insertStringRecord", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("insertStringRecord", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_insert_tablet<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceInsertTabletArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_insert_tablet(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("insertTablet", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceInsertTabletResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("insertTablet", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("insertTablet", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_insert_tablets<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceInsertTabletsArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_insert_tablets(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("insertTablets", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceInsertTabletsResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("insertTablets", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("insertTablets", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_insert_records<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceInsertRecordsArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_insert_records(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("insertRecords", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceInsertRecordsResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("insertRecords", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("insertRecords", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_insert_records_of_one_device<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceInsertRecordsOfOneDeviceArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_insert_records_of_one_device(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("insertRecordsOfOneDevice", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceInsertRecordsOfOneDeviceResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("insertRecordsOfOneDevice", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("insertRecordsOfOneDevice", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_insert_string_records_of_one_device<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceInsertStringRecordsOfOneDeviceArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_insert_string_records_of_one_device(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("insertStringRecordsOfOneDevice", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceInsertStringRecordsOfOneDeviceResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("insertStringRecordsOfOneDevice", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("insertStringRecordsOfOneDevice", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_insert_string_records<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceInsertStringRecordsArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_insert_string_records(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("insertStringRecords", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceInsertStringRecordsResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("insertStringRecords", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("insertStringRecords", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_test_insert_tablet<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceTestInsertTabletArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_test_insert_tablet(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("testInsertTablet", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceTestInsertTabletResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("testInsertTablet", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("testInsertTablet", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_test_insert_tablets<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceTestInsertTabletsArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_test_insert_tablets(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("testInsertTablets", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceTestInsertTabletsResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("testInsertTablets", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("testInsertTablets", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_test_insert_record<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceTestInsertRecordArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_test_insert_record(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("testInsertRecord", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceTestInsertRecordResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("testInsertRecord", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("testInsertRecord", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_test_insert_string_record<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceTestInsertStringRecordArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_test_insert_string_record(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("testInsertStringRecord", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceTestInsertStringRecordResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("testInsertStringRecord", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("testInsertStringRecord", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_test_insert_records<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceTestInsertRecordsArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_test_insert_records(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("testInsertRecords", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceTestInsertRecordsResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("testInsertRecords", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("testInsertRecords", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_test_insert_records_of_one_device<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceTestInsertRecordsOfOneDeviceArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_test_insert_records_of_one_device(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("testInsertRecordsOfOneDevice", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceTestInsertRecordsOfOneDeviceResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("testInsertRecordsOfOneDevice", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("testInsertRecordsOfOneDevice", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_test_insert_string_records<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceTestInsertStringRecordsArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_test_insert_string_records(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("testInsertStringRecords", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceTestInsertStringRecordsResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("testInsertStringRecords", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("testInsertStringRecords", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_delete_data<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceDeleteDataArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_delete_data(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("deleteData", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceDeleteDataResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("deleteData", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("deleteData", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_raw_data_query<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteRawDataQueryArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_raw_data_query(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeRawDataQuery", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteRawDataQueryResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeRawDataQuery", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeRawDataQuery", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_last_data_query<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteLastDataQueryArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_last_data_query(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeLastDataQuery", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteLastDataQueryResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeLastDataQuery", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeLastDataQuery", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_execute_aggregation_query<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceExecuteAggregationQueryArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_execute_aggregation_query(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("executeAggregationQuery", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceExecuteAggregationQueryResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("executeAggregationQuery", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("executeAggregationQuery", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_request_statement_id<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceRequestStatementIdArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_request_statement_id(args.session_id) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("requestStatementId", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceRequestStatementIdResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("requestStatementId", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("requestStatementId", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_create_schema_template<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceCreateSchemaTemplateArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_create_schema_template(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("createSchemaTemplate", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceCreateSchemaTemplateResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("createSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("createSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_append_schema_template<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceAppendSchemaTemplateArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_append_schema_template(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("appendSchemaTemplate", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceAppendSchemaTemplateResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("appendSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("appendSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_prune_schema_template<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServicePruneSchemaTemplateArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_prune_schema_template(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("pruneSchemaTemplate", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServicePruneSchemaTemplateResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("pruneSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("pruneSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_query_schema_template<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceQuerySchemaTemplateArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_query_schema_template(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("querySchemaTemplate", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceQuerySchemaTemplateResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("querySchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("querySchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_show_configuration_template<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let _ = IClientRPCServiceShowConfigurationTemplateArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_show_configuration_template() { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("showConfigurationTemplate", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceShowConfigurationTemplateResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("showConfigurationTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("showConfigurationTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_show_configuration<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceShowConfigurationArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_show_configuration(args.node_id) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("showConfiguration", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceShowConfigurationResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("showConfiguration", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("showConfiguration", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_set_schema_template<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceSetSchemaTemplateArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_set_schema_template(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("setSchemaTemplate", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceSetSchemaTemplateResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("setSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("setSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_unset_schema_template<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceUnsetSchemaTemplateArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_unset_schema_template(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("unsetSchemaTemplate", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceUnsetSchemaTemplateResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("unsetSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("unsetSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_drop_schema_template<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceDropSchemaTemplateArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_drop_schema_template(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("dropSchemaTemplate", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceDropSchemaTemplateResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("dropSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("dropSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_create_timeseries_using_schema_template<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_create_timeseries_using_schema_template(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("createTimeseriesUsingSchemaTemplate", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("createTimeseriesUsingSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("createTimeseriesUsingSchemaTemplate", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_handshake<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceHandshakeArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_handshake(args.info) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("handshake", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceHandshakeResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("handshake", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("handshake", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_send_pipe_data<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceSendPipeDataArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_send_pipe_data(args.buff) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("sendPipeData", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceSendPipeDataResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("sendPipeData", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("sendPipeData", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_send_file<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServiceSendFileArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_send_file(args.meta_info, args.buff) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("sendFile", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceSendFileResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("sendFile", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("sendFile", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_pipe_transfer<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServicePipeTransferArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_pipe_transfer(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("pipeTransfer", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServicePipeTransferResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("pipeTransfer", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("pipeTransfer", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_pipe_subscribe<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let args = IClientRPCServicePipeSubscribeArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_pipe_subscribe(args.req) { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("pipeSubscribe", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServicePipeSubscribeResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("pipeSubscribe", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("pipeSubscribe", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_get_backup_configuration<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let _ = IClientRPCServiceGetBackupConfigurationArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_get_backup_configuration() { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("getBackupConfiguration", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceGetBackupConfigurationResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("getBackupConfiguration", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("getBackupConfiguration", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_fetch_all_connections_info<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let _ = IClientRPCServiceFetchAllConnectionsInfoArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_fetch_all_connections_info() { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("fetchAllConnectionsInfo", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceFetchAllConnectionsInfoResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("fetchAllConnectionsInfo", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("fetchAllConnectionsInfo", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| pub fn process_test_connection_empty_r_p_c<H: IClientRPCServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let _ = IClientRPCServiceTestConnectionEmptyRPCArgs::read_from_in_protocol(i_prot)?; |
| match handler.handle_test_connection_empty_r_p_c() { |
| Ok(handler_return) => { |
| let message_ident = TMessageIdentifier::new("testConnectionEmptyRPC", TMessageType::Reply, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| let ret = IClientRPCServiceTestConnectionEmptyRPCResult { result_value: Some(handler_return) }; |
| ret.write_to_out_protocol(o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| Err(e) => { |
| match e { |
| thrift::Error::Application(app_err) => { |
| let message_ident = TMessageIdentifier::new("testConnectionEmptyRPC", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| _ => { |
| let ret_err = { |
| ApplicationError::new( |
| ApplicationErrorKind::Unknown, |
| e.description() |
| ) |
| }; |
| let message_ident = TMessageIdentifier::new("testConnectionEmptyRPC", TMessageType::Exception, incoming_sequence_number); |
| o_prot.write_message_begin(&message_ident)?; |
| thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?; |
| o_prot.write_message_end()?; |
| o_prot.flush() |
| }, |
| } |
| }, |
| } |
| } |
| } |
| |
| impl <H: IClientRPCServiceSyncHandler> TProcessor for IClientRPCServiceSyncProcessor<H> { |
| fn process(&self, i_prot: &mut dyn TInputProtocol, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let message_ident = i_prot.read_message_begin()?; |
| let res = match &*message_ident.name { |
| "executeQueryStatementV2" => { |
| self.process_execute_query_statement_v2(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeUpdateStatementV2" => { |
| self.process_execute_update_statement_v2(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeStatementV2" => { |
| self.process_execute_statement_v2(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeRawDataQueryV2" => { |
| self.process_execute_raw_data_query_v2(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeLastDataQueryV2" => { |
| self.process_execute_last_data_query_v2(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeFastLastDataQueryForOnePrefixPath" => { |
| self.process_execute_fast_last_data_query_for_one_prefix_path(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeFastLastDataQueryForOneDeviceV2" => { |
| self.process_execute_fast_last_data_query_for_one_device_v2(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeAggregationQueryV2" => { |
| self.process_execute_aggregation_query_v2(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "fetchResultsV2" => { |
| self.process_fetch_results_v2(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "openSession" => { |
| self.process_open_session(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "closeSession" => { |
| self.process_close_session(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeStatement" => { |
| self.process_execute_statement(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeBatchStatement" => { |
| self.process_execute_batch_statement(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeQueryStatement" => { |
| self.process_execute_query_statement(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeUpdateStatement" => { |
| self.process_execute_update_statement(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "fetchResults" => { |
| self.process_fetch_results(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "fetchMetadata" => { |
| self.process_fetch_metadata(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "cancelOperation" => { |
| self.process_cancel_operation(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "closeOperation" => { |
| self.process_close_operation(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "prepareStatement" => { |
| self.process_prepare_statement(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executePreparedStatement" => { |
| self.process_execute_prepared_statement(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "deallocatePreparedStatement" => { |
| self.process_deallocate_prepared_statement(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "getTimeZone" => { |
| self.process_get_time_zone(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "setTimeZone" => { |
| self.process_set_time_zone(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "getProperties" => { |
| self.process_get_properties(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "setStorageGroup" => { |
| self.process_set_storage_group(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "createTimeseries" => { |
| self.process_create_timeseries(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "createAlignedTimeseries" => { |
| self.process_create_aligned_timeseries(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "createMultiTimeseries" => { |
| self.process_create_multi_timeseries(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "deleteTimeseries" => { |
| self.process_delete_timeseries(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "deleteStorageGroups" => { |
| self.process_delete_storage_groups(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "insertRecord" => { |
| self.process_insert_record(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "insertStringRecord" => { |
| self.process_insert_string_record(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "insertTablet" => { |
| self.process_insert_tablet(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "insertTablets" => { |
| self.process_insert_tablets(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "insertRecords" => { |
| self.process_insert_records(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "insertRecordsOfOneDevice" => { |
| self.process_insert_records_of_one_device(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "insertStringRecordsOfOneDevice" => { |
| self.process_insert_string_records_of_one_device(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "insertStringRecords" => { |
| self.process_insert_string_records(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "testInsertTablet" => { |
| self.process_test_insert_tablet(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "testInsertTablets" => { |
| self.process_test_insert_tablets(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "testInsertRecord" => { |
| self.process_test_insert_record(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "testInsertStringRecord" => { |
| self.process_test_insert_string_record(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "testInsertRecords" => { |
| self.process_test_insert_records(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "testInsertRecordsOfOneDevice" => { |
| self.process_test_insert_records_of_one_device(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "testInsertStringRecords" => { |
| self.process_test_insert_string_records(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "deleteData" => { |
| self.process_delete_data(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeRawDataQuery" => { |
| self.process_execute_raw_data_query(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeLastDataQuery" => { |
| self.process_execute_last_data_query(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "executeAggregationQuery" => { |
| self.process_execute_aggregation_query(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "requestStatementId" => { |
| self.process_request_statement_id(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "createSchemaTemplate" => { |
| self.process_create_schema_template(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "appendSchemaTemplate" => { |
| self.process_append_schema_template(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "pruneSchemaTemplate" => { |
| self.process_prune_schema_template(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "querySchemaTemplate" => { |
| self.process_query_schema_template(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "showConfigurationTemplate" => { |
| self.process_show_configuration_template(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "showConfiguration" => { |
| self.process_show_configuration(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "setSchemaTemplate" => { |
| self.process_set_schema_template(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "unsetSchemaTemplate" => { |
| self.process_unset_schema_template(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "dropSchemaTemplate" => { |
| self.process_drop_schema_template(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "createTimeseriesUsingSchemaTemplate" => { |
| self.process_create_timeseries_using_schema_template(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "handshake" => { |
| self.process_handshake(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "sendPipeData" => { |
| self.process_send_pipe_data(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "sendFile" => { |
| self.process_send_file(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "pipeTransfer" => { |
| self.process_pipe_transfer(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "pipeSubscribe" => { |
| self.process_pipe_subscribe(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "getBackupConfiguration" => { |
| self.process_get_backup_configuration(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "fetchAllConnectionsInfo" => { |
| self.process_fetch_all_connections_info(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| "testConnectionEmptyRPC" => { |
| self.process_test_connection_empty_r_p_c(message_ident.sequence_number, i_prot, o_prot) |
| }, |
| method => { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::UnknownMethod, |
| format!("unknown method {}", method) |
| ) |
| ) |
| ) |
| }, |
| }; |
| thrift::server::handle_process_result(&message_ident, res, o_prot) |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteQueryStatementV2Args |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteQueryStatementV2Args { |
| req: TSExecuteStatementReq, |
| } |
| |
| impl IClientRPCServiceExecuteQueryStatementV2Args { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteQueryStatementV2Args> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSExecuteStatementReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSExecuteStatementReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteQueryStatementV2Args.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteQueryStatementV2Args { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeQueryStatementV2_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteQueryStatementV2Result |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteQueryStatementV2Result { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteQueryStatementV2Result { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteQueryStatementV2Result> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteQueryStatementV2Result { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteQueryStatementV2Result"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteQueryStatementV2" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteUpdateStatementV2Args |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteUpdateStatementV2Args { |
| req: TSExecuteStatementReq, |
| } |
| |
| impl IClientRPCServiceExecuteUpdateStatementV2Args { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteUpdateStatementV2Args> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSExecuteStatementReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSExecuteStatementReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteUpdateStatementV2Args.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteUpdateStatementV2Args { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeUpdateStatementV2_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteUpdateStatementV2Result |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteUpdateStatementV2Result { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteUpdateStatementV2Result { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteUpdateStatementV2Result> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteUpdateStatementV2Result { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteUpdateStatementV2Result"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteUpdateStatementV2" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteStatementV2Args |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteStatementV2Args { |
| req: TSExecuteStatementReq, |
| } |
| |
| impl IClientRPCServiceExecuteStatementV2Args { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteStatementV2Args> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSExecuteStatementReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSExecuteStatementReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteStatementV2Args.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteStatementV2Args { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeStatementV2_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteStatementV2Result |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteStatementV2Result { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteStatementV2Result { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteStatementV2Result> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteStatementV2Result { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteStatementV2Result"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteStatementV2" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteRawDataQueryV2Args |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteRawDataQueryV2Args { |
| req: TSRawDataQueryReq, |
| } |
| |
| impl IClientRPCServiceExecuteRawDataQueryV2Args { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteRawDataQueryV2Args> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSRawDataQueryReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSRawDataQueryReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteRawDataQueryV2Args.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteRawDataQueryV2Args { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeRawDataQueryV2_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteRawDataQueryV2Result |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteRawDataQueryV2Result { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteRawDataQueryV2Result { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteRawDataQueryV2Result> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteRawDataQueryV2Result { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteRawDataQueryV2Result"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteRawDataQueryV2" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteLastDataQueryV2Args |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteLastDataQueryV2Args { |
| req: TSLastDataQueryReq, |
| } |
| |
| impl IClientRPCServiceExecuteLastDataQueryV2Args { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteLastDataQueryV2Args> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSLastDataQueryReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSLastDataQueryReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteLastDataQueryV2Args.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteLastDataQueryV2Args { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeLastDataQueryV2_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteLastDataQueryV2Result |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteLastDataQueryV2Result { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteLastDataQueryV2Result { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteLastDataQueryV2Result> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteLastDataQueryV2Result { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteLastDataQueryV2Result"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteLastDataQueryV2" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs { |
| req: TSFastLastDataQueryForOnePrefixPathReq, |
| } |
| |
| impl IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSFastLastDataQueryForOnePrefixPathReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSFastLastDataQueryForOnePrefixPathReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeFastLastDataQueryForOnePrefixPath_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPathResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteFastLastDataQueryForOnePrefixPath" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args { |
| req: TSFastLastDataQueryForOneDeviceReq, |
| } |
| |
| impl IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSFastLastDataQueryForOneDeviceReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSFastLastDataQueryForOneDeviceReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeFastLastDataQueryForOneDeviceV2_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteAggregationQueryV2Args |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteAggregationQueryV2Args { |
| req: TSAggregationQueryReq, |
| } |
| |
| impl IClientRPCServiceExecuteAggregationQueryV2Args { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteAggregationQueryV2Args> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSAggregationQueryReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSAggregationQueryReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteAggregationQueryV2Args.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteAggregationQueryV2Args { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeAggregationQueryV2_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteAggregationQueryV2Result |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteAggregationQueryV2Result { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteAggregationQueryV2Result { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteAggregationQueryV2Result> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteAggregationQueryV2Result { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteAggregationQueryV2Result"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteAggregationQueryV2" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceFetchResultsV2Args |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceFetchResultsV2Args { |
| req: TSFetchResultsReq, |
| } |
| |
| impl IClientRPCServiceFetchResultsV2Args { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceFetchResultsV2Args> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSFetchResultsReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSFetchResultsReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceFetchResultsV2Args.req", &f_1)?; |
| let ret = IClientRPCServiceFetchResultsV2Args { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("fetchResultsV2_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceFetchResultsV2Result |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceFetchResultsV2Result { |
| result_value: Option<TSFetchResultsResp>, |
| } |
| |
| impl IClientRPCServiceFetchResultsV2Result { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceFetchResultsV2Result> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSFetchResultsResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSFetchResultsResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceFetchResultsV2Result { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceFetchResultsV2Result"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSFetchResultsResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceFetchsV2Result" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceOpenSessionArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceOpenSessionArgs { |
| req: TSOpenSessionReq, |
| } |
| |
| impl IClientRPCServiceOpenSessionArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceOpenSessionArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSOpenSessionReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSOpenSessionReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceOpenSessionArgs.req", &f_1)?; |
| let ret = IClientRPCServiceOpenSessionArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("openSession_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceOpenSessionResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceOpenSessionResult { |
| result_value: Option<TSOpenSessionResp>, |
| } |
| |
| impl IClientRPCServiceOpenSessionResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceOpenSessionResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSOpenSessionResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSOpenSessionResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceOpenSessionResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceOpenSessionResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSOpenSessionResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceOpenSession" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceCloseSessionArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCloseSessionArgs { |
| req: TSCloseSessionReq, |
| } |
| |
| impl IClientRPCServiceCloseSessionArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCloseSessionArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSCloseSessionReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSCloseSessionReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceCloseSessionArgs.req", &f_1)?; |
| let ret = IClientRPCServiceCloseSessionArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("closeSession_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceCloseSessionResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCloseSessionResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceCloseSessionResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCloseSessionResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceCloseSessionResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceCloseSessionResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceCloseSession" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteStatementArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteStatementArgs { |
| req: TSExecuteStatementReq, |
| } |
| |
| impl IClientRPCServiceExecuteStatementArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteStatementArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSExecuteStatementReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSExecuteStatementReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteStatementArgs.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteStatementArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeStatement_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteStatementResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteStatementResult { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteStatementResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteStatementResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteStatementResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteStatementResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteStatement" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteBatchStatementArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteBatchStatementArgs { |
| req: TSExecuteBatchStatementReq, |
| } |
| |
| impl IClientRPCServiceExecuteBatchStatementArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteBatchStatementArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSExecuteBatchStatementReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSExecuteBatchStatementReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteBatchStatementArgs.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteBatchStatementArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeBatchStatement_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteBatchStatementResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteBatchStatementResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceExecuteBatchStatementResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteBatchStatementResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteBatchStatementResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteBatchStatementResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteBatchStatement" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteQueryStatementArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteQueryStatementArgs { |
| req: TSExecuteStatementReq, |
| } |
| |
| impl IClientRPCServiceExecuteQueryStatementArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteQueryStatementArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSExecuteStatementReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSExecuteStatementReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteQueryStatementArgs.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteQueryStatementArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeQueryStatement_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteQueryStatementResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteQueryStatementResult { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteQueryStatementResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteQueryStatementResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteQueryStatementResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteQueryStatementResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteQueryStatement" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteUpdateStatementArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteUpdateStatementArgs { |
| req: TSExecuteStatementReq, |
| } |
| |
| impl IClientRPCServiceExecuteUpdateStatementArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteUpdateStatementArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSExecuteStatementReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSExecuteStatementReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteUpdateStatementArgs.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteUpdateStatementArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeUpdateStatement_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteUpdateStatementResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteUpdateStatementResult { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteUpdateStatementResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteUpdateStatementResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteUpdateStatementResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteUpdateStatementResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteUpdateStatement" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceFetchResultsArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceFetchResultsArgs { |
| req: TSFetchResultsReq, |
| } |
| |
| impl IClientRPCServiceFetchResultsArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceFetchResultsArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSFetchResultsReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSFetchResultsReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceFetchResultsArgs.req", &f_1)?; |
| let ret = IClientRPCServiceFetchResultsArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("fetchResults_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceFetchResultsResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceFetchResultsResult { |
| result_value: Option<TSFetchResultsResp>, |
| } |
| |
| impl IClientRPCServiceFetchResultsResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceFetchResultsResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSFetchResultsResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSFetchResultsResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceFetchResultsResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceFetchResultsResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSFetchResultsResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceFetchsResult" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceFetchMetadataArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceFetchMetadataArgs { |
| req: TSFetchMetadataReq, |
| } |
| |
| impl IClientRPCServiceFetchMetadataArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceFetchMetadataArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSFetchMetadataReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSFetchMetadataReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceFetchMetadataArgs.req", &f_1)?; |
| let ret = IClientRPCServiceFetchMetadataArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("fetchMetadata_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceFetchMetadataResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceFetchMetadataResult { |
| result_value: Option<TSFetchMetadataResp>, |
| } |
| |
| impl IClientRPCServiceFetchMetadataResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceFetchMetadataResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSFetchMetadataResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSFetchMetadataResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceFetchMetadataResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceFetchMetadataResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSFetchMetadataResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceFetchMetadata" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceCancelOperationArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCancelOperationArgs { |
| req: TSCancelOperationReq, |
| } |
| |
| impl IClientRPCServiceCancelOperationArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCancelOperationArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSCancelOperationReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSCancelOperationReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceCancelOperationArgs.req", &f_1)?; |
| let ret = IClientRPCServiceCancelOperationArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("cancelOperation_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceCancelOperationResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCancelOperationResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceCancelOperationResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCancelOperationResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceCancelOperationResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceCancelOperationResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceCancelOperation" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceCloseOperationArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCloseOperationArgs { |
| req: TSCloseOperationReq, |
| } |
| |
| impl IClientRPCServiceCloseOperationArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCloseOperationArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSCloseOperationReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSCloseOperationReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceCloseOperationArgs.req", &f_1)?; |
| let ret = IClientRPCServiceCloseOperationArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("closeOperation_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceCloseOperationResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCloseOperationResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceCloseOperationResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCloseOperationResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceCloseOperationResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceCloseOperationResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceCloseOperation" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServicePrepareStatementArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServicePrepareStatementArgs { |
| req: TSPrepareReq, |
| } |
| |
| impl IClientRPCServicePrepareStatementArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServicePrepareStatementArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSPrepareReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSPrepareReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServicePrepareStatementArgs.req", &f_1)?; |
| let ret = IClientRPCServicePrepareStatementArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("prepareStatement_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServicePrepareStatementResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServicePrepareStatementResult { |
| result_value: Option<TSPrepareResp>, |
| } |
| |
| impl IClientRPCServicePrepareStatementResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServicePrepareStatementResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSPrepareResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSPrepareResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServicePrepareStatementResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServicePrepareStatementResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSPrepareResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServicePrepareStatement" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecutePreparedStatementArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecutePreparedStatementArgs { |
| req: TSExecutePreparedReq, |
| } |
| |
| impl IClientRPCServiceExecutePreparedStatementArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecutePreparedStatementArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSExecutePreparedReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSExecutePreparedReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecutePreparedStatementArgs.req", &f_1)?; |
| let ret = IClientRPCServiceExecutePreparedStatementArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executePreparedStatement_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecutePreparedStatementResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecutePreparedStatementResult { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecutePreparedStatementResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecutePreparedStatementResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecutePreparedStatementResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecutePreparedStatementResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecutePreparedStatement" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceDeallocatePreparedStatementArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceDeallocatePreparedStatementArgs { |
| req: TSDeallocatePreparedReq, |
| } |
| |
| impl IClientRPCServiceDeallocatePreparedStatementArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceDeallocatePreparedStatementArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSDeallocatePreparedReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSDeallocatePreparedReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceDeallocatePreparedStatementArgs.req", &f_1)?; |
| let ret = IClientRPCServiceDeallocatePreparedStatementArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("deallocatePreparedStatement_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceDeallocatePreparedStatementResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceDeallocatePreparedStatementResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceDeallocatePreparedStatementResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceDeallocatePreparedStatementResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceDeallocatePreparedStatementResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceDeallocatePreparedStatementResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceDeallocatePreparedStatement" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceGetTimeZoneArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceGetTimeZoneArgs { |
| session_id: i64, |
| } |
| |
| impl IClientRPCServiceGetTimeZoneArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceGetTimeZoneArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceGetTimeZoneArgs.session_id", &f_1)?; |
| let ret = IClientRPCServiceGetTimeZoneArgs { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("getTimeZone_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceGetTimeZoneResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceGetTimeZoneResult { |
| result_value: Option<TSGetTimeZoneResp>, |
| } |
| |
| impl IClientRPCServiceGetTimeZoneResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceGetTimeZoneResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSGetTimeZoneResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSGetTimeZoneResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceGetTimeZoneResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceGetTimeZoneResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSGetTimeZoneResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceGetTimeZone" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceSetTimeZoneArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceSetTimeZoneArgs { |
| req: TSSetTimeZoneReq, |
| } |
| |
| impl IClientRPCServiceSetTimeZoneArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceSetTimeZoneArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSSetTimeZoneReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSSetTimeZoneReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceSetTimeZoneArgs.req", &f_1)?; |
| let ret = IClientRPCServiceSetTimeZoneArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("setTimeZone_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceSetTimeZoneResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceSetTimeZoneResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceSetTimeZoneResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceSetTimeZoneResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceSetTimeZoneResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceSetTimeZoneResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceSetTimeZone" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceGetPropertiesArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceGetPropertiesArgs { |
| } |
| |
| impl IClientRPCServiceGetPropertiesArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceGetPropertiesArgs> { |
| i_prot.read_struct_begin()?; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceGetPropertiesArgs {}; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("getProperties_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceGetPropertiesResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceGetPropertiesResult { |
| result_value: Option<ServerProperties>, |
| } |
| |
| impl IClientRPCServiceGetPropertiesResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceGetPropertiesResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<ServerProperties> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = ServerProperties::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceGetPropertiesResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceGetPropertiesResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<ServerProperties> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceGetProperties" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceSetStorageGroupArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceSetStorageGroupArgs { |
| session_id: i64, |
| storage_group: String, |
| } |
| |
| impl IClientRPCServiceSetStorageGroupArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceSetStorageGroupArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<String> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_string()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceSetStorageGroupArgs.session_id", &f_1)?; |
| verify_required_field_exists("IClientRPCServiceSetStorageGroupArgs.storage_group", &f_2)?; |
| let ret = IClientRPCServiceSetStorageGroupArgs { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| storage_group: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("setStorageGroup_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("storageGroup", TType::String, 2))?; |
| o_prot.write_string(&self.storage_group)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceSetStorageGroupResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceSetStorageGroupResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceSetStorageGroupResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceSetStorageGroupResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceSetStorageGroupResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceSetStorageGroupResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceSetStorageGroup" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceCreateTimeseriesArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCreateTimeseriesArgs { |
| req: TSCreateTimeseriesReq, |
| } |
| |
| impl IClientRPCServiceCreateTimeseriesArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCreateTimeseriesArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSCreateTimeseriesReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSCreateTimeseriesReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceCreateTimeseriesArgs.req", &f_1)?; |
| let ret = IClientRPCServiceCreateTimeseriesArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("createTimeseries_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceCreateTimeseriesResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCreateTimeseriesResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceCreateTimeseriesResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCreateTimeseriesResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceCreateTimeseriesResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceCreateTimeseriesResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceCreateTimeseries" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceCreateAlignedTimeseriesArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCreateAlignedTimeseriesArgs { |
| req: TSCreateAlignedTimeseriesReq, |
| } |
| |
| impl IClientRPCServiceCreateAlignedTimeseriesArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCreateAlignedTimeseriesArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSCreateAlignedTimeseriesReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSCreateAlignedTimeseriesReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceCreateAlignedTimeseriesArgs.req", &f_1)?; |
| let ret = IClientRPCServiceCreateAlignedTimeseriesArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("createAlignedTimeseries_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceCreateAlignedTimeseriesResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCreateAlignedTimeseriesResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceCreateAlignedTimeseriesResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCreateAlignedTimeseriesResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceCreateAlignedTimeseriesResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceCreateAlignedTimeseriesResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceCreateAlignedTimeseries" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceCreateMultiTimeseriesArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCreateMultiTimeseriesArgs { |
| req: TSCreateMultiTimeseriesReq, |
| } |
| |
| impl IClientRPCServiceCreateMultiTimeseriesArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCreateMultiTimeseriesArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSCreateMultiTimeseriesReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSCreateMultiTimeseriesReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceCreateMultiTimeseriesArgs.req", &f_1)?; |
| let ret = IClientRPCServiceCreateMultiTimeseriesArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("createMultiTimeseries_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceCreateMultiTimeseriesResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCreateMultiTimeseriesResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceCreateMultiTimeseriesResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCreateMultiTimeseriesResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceCreateMultiTimeseriesResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceCreateMultiTimeseriesResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceCreateMultiTimeseries" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceDeleteTimeseriesArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceDeleteTimeseriesArgs { |
| session_id: i64, |
| path: Vec<String>, |
| } |
| |
| impl IClientRPCServiceDeleteTimeseriesArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceDeleteTimeseriesArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_104 = i_prot.read_string()?; |
| val.push(list_elem_104); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceDeleteTimeseriesArgs.session_id", &f_1)?; |
| verify_required_field_exists("IClientRPCServiceDeleteTimeseriesArgs.path", &f_2)?; |
| let ret = IClientRPCServiceDeleteTimeseriesArgs { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| path: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("deleteTimeseries_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("path", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.path.len() as i32))?; |
| for e in &self.path { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceDeleteTimeseriesResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceDeleteTimeseriesResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceDeleteTimeseriesResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceDeleteTimeseriesResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceDeleteTimeseriesResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceDeleteTimeseriesResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceDeleteTimeseries" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceDeleteStorageGroupsArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceDeleteStorageGroupsArgs { |
| session_id: i64, |
| storage_group: Vec<String>, |
| } |
| |
| impl IClientRPCServiceDeleteStorageGroupsArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceDeleteStorageGroupsArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| let mut f_2: Option<Vec<String>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let list_ident = i_prot.read_list_begin()?; |
| let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize); |
| for _ in 0..list_ident.size { |
| let list_elem_105 = i_prot.read_string()?; |
| val.push(list_elem_105); |
| } |
| i_prot.read_list_end()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceDeleteStorageGroupsArgs.session_id", &f_1)?; |
| verify_required_field_exists("IClientRPCServiceDeleteStorageGroupsArgs.storage_group", &f_2)?; |
| let ret = IClientRPCServiceDeleteStorageGroupsArgs { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| storage_group: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("deleteStorageGroups_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("storageGroup", TType::List, 2))?; |
| o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.storage_group.len() as i32))?; |
| for e in &self.storage_group { |
| o_prot.write_string(e)?; |
| o_prot.write_list_end()?; |
| } |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceDeleteStorageGroupsResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceDeleteStorageGroupsResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceDeleteStorageGroupsResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceDeleteStorageGroupsResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceDeleteStorageGroupsResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceDeleteStorageGroupsResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceDeleteStorageGroups" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertRecordArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertRecordArgs { |
| req: TSInsertRecordReq, |
| } |
| |
| impl IClientRPCServiceInsertRecordArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertRecordArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertRecordReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertRecordReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceInsertRecordArgs.req", &f_1)?; |
| let ret = IClientRPCServiceInsertRecordArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("insertRecord_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertRecordResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertRecordResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceInsertRecordResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertRecordResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceInsertRecordResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceInsertRecordResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceInsertRecord" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertStringRecordArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertStringRecordArgs { |
| req: TSInsertStringRecordReq, |
| } |
| |
| impl IClientRPCServiceInsertStringRecordArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertStringRecordArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertStringRecordReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertStringRecordReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceInsertStringRecordArgs.req", &f_1)?; |
| let ret = IClientRPCServiceInsertStringRecordArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("insertStringRecord_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertStringRecordResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertStringRecordResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceInsertStringRecordResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertStringRecordResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceInsertStringRecordResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceInsertStringRecordResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceInsertStringRecord" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertTabletArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertTabletArgs { |
| req: TSInsertTabletReq, |
| } |
| |
| impl IClientRPCServiceInsertTabletArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertTabletArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertTabletReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertTabletReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceInsertTabletArgs.req", &f_1)?; |
| let ret = IClientRPCServiceInsertTabletArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("insertTablet_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertTabletResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertTabletResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceInsertTabletResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertTabletResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceInsertTabletResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceInsertTabletResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceInsertTablet" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertTabletsArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertTabletsArgs { |
| req: TSInsertTabletsReq, |
| } |
| |
| impl IClientRPCServiceInsertTabletsArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertTabletsArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertTabletsReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertTabletsReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceInsertTabletsArgs.req", &f_1)?; |
| let ret = IClientRPCServiceInsertTabletsArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("insertTablets_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertTabletsResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertTabletsResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceInsertTabletsResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertTabletsResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceInsertTabletsResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceInsertTabletsResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceInsertTablets" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertRecordsArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertRecordsArgs { |
| req: TSInsertRecordsReq, |
| } |
| |
| impl IClientRPCServiceInsertRecordsArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertRecordsArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertRecordsReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertRecordsReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceInsertRecordsArgs.req", &f_1)?; |
| let ret = IClientRPCServiceInsertRecordsArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("insertRecords_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertRecordsResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertRecordsResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceInsertRecordsResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertRecordsResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceInsertRecordsResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceInsertRecordsResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceInsertRecords" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertRecordsOfOneDeviceArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertRecordsOfOneDeviceArgs { |
| req: TSInsertRecordsOfOneDeviceReq, |
| } |
| |
| impl IClientRPCServiceInsertRecordsOfOneDeviceArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertRecordsOfOneDeviceArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertRecordsOfOneDeviceReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertRecordsOfOneDeviceReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceInsertRecordsOfOneDeviceArgs.req", &f_1)?; |
| let ret = IClientRPCServiceInsertRecordsOfOneDeviceArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("insertRecordsOfOneDevice_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertRecordsOfOneDeviceResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertRecordsOfOneDeviceResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceInsertRecordsOfOneDeviceResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertRecordsOfOneDeviceResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceInsertRecordsOfOneDeviceResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceInsertRecordsOfOneDeviceResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceInsertRecordsOfOneDevice" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertStringRecordsOfOneDeviceArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertStringRecordsOfOneDeviceArgs { |
| req: TSInsertStringRecordsOfOneDeviceReq, |
| } |
| |
| impl IClientRPCServiceInsertStringRecordsOfOneDeviceArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertStringRecordsOfOneDeviceArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertStringRecordsOfOneDeviceReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertStringRecordsOfOneDeviceReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceInsertStringRecordsOfOneDeviceArgs.req", &f_1)?; |
| let ret = IClientRPCServiceInsertStringRecordsOfOneDeviceArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("insertStringRecordsOfOneDevice_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertStringRecordsOfOneDeviceResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertStringRecordsOfOneDeviceResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceInsertStringRecordsOfOneDeviceResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertStringRecordsOfOneDeviceResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceInsertStringRecordsOfOneDeviceResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceInsertStringRecordsOfOneDeviceResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceInsertStringRecordsOfOneDevice" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertStringRecordsArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertStringRecordsArgs { |
| req: TSInsertStringRecordsReq, |
| } |
| |
| impl IClientRPCServiceInsertStringRecordsArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertStringRecordsArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertStringRecordsReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertStringRecordsReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceInsertStringRecordsArgs.req", &f_1)?; |
| let ret = IClientRPCServiceInsertStringRecordsArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("insertStringRecords_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceInsertStringRecordsResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceInsertStringRecordsResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceInsertStringRecordsResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceInsertStringRecordsResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceInsertStringRecordsResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceInsertStringRecordsResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceInsertStringRecords" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertTabletArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertTabletArgs { |
| req: TSInsertTabletReq, |
| } |
| |
| impl IClientRPCServiceTestInsertTabletArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertTabletArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertTabletReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertTabletReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceTestInsertTabletArgs.req", &f_1)?; |
| let ret = IClientRPCServiceTestInsertTabletArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("testInsertTablet_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertTabletResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertTabletResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceTestInsertTabletResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertTabletResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceTestInsertTabletResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceTestInsertTabletResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceTestInsertTablet" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertTabletsArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertTabletsArgs { |
| req: TSInsertTabletsReq, |
| } |
| |
| impl IClientRPCServiceTestInsertTabletsArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertTabletsArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertTabletsReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertTabletsReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceTestInsertTabletsArgs.req", &f_1)?; |
| let ret = IClientRPCServiceTestInsertTabletsArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("testInsertTablets_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertTabletsResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertTabletsResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceTestInsertTabletsResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertTabletsResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceTestInsertTabletsResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceTestInsertTabletsResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceTestInsertTablets" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertRecordArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertRecordArgs { |
| req: TSInsertRecordReq, |
| } |
| |
| impl IClientRPCServiceTestInsertRecordArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertRecordArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertRecordReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertRecordReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceTestInsertRecordArgs.req", &f_1)?; |
| let ret = IClientRPCServiceTestInsertRecordArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("testInsertRecord_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertRecordResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertRecordResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceTestInsertRecordResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertRecordResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceTestInsertRecordResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceTestInsertRecordResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceTestInsertRecord" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertStringRecordArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertStringRecordArgs { |
| req: TSInsertStringRecordReq, |
| } |
| |
| impl IClientRPCServiceTestInsertStringRecordArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertStringRecordArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertStringRecordReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertStringRecordReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceTestInsertStringRecordArgs.req", &f_1)?; |
| let ret = IClientRPCServiceTestInsertStringRecordArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("testInsertStringRecord_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertStringRecordResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertStringRecordResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceTestInsertStringRecordResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertStringRecordResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceTestInsertStringRecordResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceTestInsertStringRecordResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceTestInsertStringRecord" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertRecordsArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertRecordsArgs { |
| req: TSInsertRecordsReq, |
| } |
| |
| impl IClientRPCServiceTestInsertRecordsArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertRecordsArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertRecordsReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertRecordsReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceTestInsertRecordsArgs.req", &f_1)?; |
| let ret = IClientRPCServiceTestInsertRecordsArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("testInsertRecords_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertRecordsResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertRecordsResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceTestInsertRecordsResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertRecordsResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceTestInsertRecordsResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceTestInsertRecordsResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceTestInsertRecords" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertRecordsOfOneDeviceArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertRecordsOfOneDeviceArgs { |
| req: TSInsertRecordsOfOneDeviceReq, |
| } |
| |
| impl IClientRPCServiceTestInsertRecordsOfOneDeviceArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertRecordsOfOneDeviceArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertRecordsOfOneDeviceReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertRecordsOfOneDeviceReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceTestInsertRecordsOfOneDeviceArgs.req", &f_1)?; |
| let ret = IClientRPCServiceTestInsertRecordsOfOneDeviceArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("testInsertRecordsOfOneDevice_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertRecordsOfOneDeviceResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertRecordsOfOneDeviceResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceTestInsertRecordsOfOneDeviceResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertRecordsOfOneDeviceResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceTestInsertRecordsOfOneDeviceResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceTestInsertRecordsOfOneDeviceResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceTestInsertRecordsOfOneDevice" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertStringRecordsArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertStringRecordsArgs { |
| req: TSInsertStringRecordsReq, |
| } |
| |
| impl IClientRPCServiceTestInsertStringRecordsArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertStringRecordsArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSInsertStringRecordsReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSInsertStringRecordsReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceTestInsertStringRecordsArgs.req", &f_1)?; |
| let ret = IClientRPCServiceTestInsertStringRecordsArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("testInsertStringRecords_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestInsertStringRecordsResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestInsertStringRecordsResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceTestInsertStringRecordsResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestInsertStringRecordsResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceTestInsertStringRecordsResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceTestInsertStringRecordsResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceTestInsertStringRecords" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceDeleteDataArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceDeleteDataArgs { |
| req: TSDeleteDataReq, |
| } |
| |
| impl IClientRPCServiceDeleteDataArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceDeleteDataArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSDeleteDataReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSDeleteDataReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceDeleteDataArgs.req", &f_1)?; |
| let ret = IClientRPCServiceDeleteDataArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("deleteData_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceDeleteDataResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceDeleteDataResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceDeleteDataResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceDeleteDataResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceDeleteDataResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceDeleteDataResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceDeleteData" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteRawDataQueryArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteRawDataQueryArgs { |
| req: TSRawDataQueryReq, |
| } |
| |
| impl IClientRPCServiceExecuteRawDataQueryArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteRawDataQueryArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSRawDataQueryReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSRawDataQueryReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteRawDataQueryArgs.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteRawDataQueryArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeRawDataQuery_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteRawDataQueryResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteRawDataQueryResult { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteRawDataQueryResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteRawDataQueryResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteRawDataQueryResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteRawDataQueryResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteRawDataQuery" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteLastDataQueryArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteLastDataQueryArgs { |
| req: TSLastDataQueryReq, |
| } |
| |
| impl IClientRPCServiceExecuteLastDataQueryArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteLastDataQueryArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSLastDataQueryReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSLastDataQueryReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteLastDataQueryArgs.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteLastDataQueryArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeLastDataQuery_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteLastDataQueryResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteLastDataQueryResult { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteLastDataQueryResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteLastDataQueryResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteLastDataQueryResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteLastDataQueryResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteLastDataQuery" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteAggregationQueryArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteAggregationQueryArgs { |
| req: TSAggregationQueryReq, |
| } |
| |
| impl IClientRPCServiceExecuteAggregationQueryArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteAggregationQueryArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSAggregationQueryReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSAggregationQueryReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceExecuteAggregationQueryArgs.req", &f_1)?; |
| let ret = IClientRPCServiceExecuteAggregationQueryArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("executeAggregationQuery_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceExecuteAggregationQueryResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceExecuteAggregationQueryResult { |
| result_value: Option<TSExecuteStatementResp>, |
| } |
| |
| impl IClientRPCServiceExecuteAggregationQueryResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceExecuteAggregationQueryResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSExecuteStatementResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSExecuteStatementResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceExecuteAggregationQueryResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceExecuteAggregationQueryResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSExecuteStatementResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceExecuteAggregationQuery" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceRequestStatementIdArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceRequestStatementIdArgs { |
| session_id: i64, |
| } |
| |
| impl IClientRPCServiceRequestStatementIdArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceRequestStatementIdArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i64()?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceRequestStatementIdArgs.session_id", &f_1)?; |
| let ret = IClientRPCServiceRequestStatementIdArgs { |
| session_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("requestStatementId_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("sessionId", TType::I64, 1))?; |
| o_prot.write_i64(self.session_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceRequestStatementIdResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceRequestStatementIdResult { |
| result_value: Option<i64>, |
| } |
| |
| impl IClientRPCServiceRequestStatementIdResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceRequestStatementIdResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<i64> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = i_prot.read_i64()?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceRequestStatementIdResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceRequestStatementIdResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::I64, 0))?; |
| o_prot.write_i64(fld_var)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<i64> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceRequestStatementId" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceCreateSchemaTemplateArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCreateSchemaTemplateArgs { |
| req: TSCreateSchemaTemplateReq, |
| } |
| |
| impl IClientRPCServiceCreateSchemaTemplateArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCreateSchemaTemplateArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSCreateSchemaTemplateReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSCreateSchemaTemplateReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceCreateSchemaTemplateArgs.req", &f_1)?; |
| let ret = IClientRPCServiceCreateSchemaTemplateArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("createSchemaTemplate_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceCreateSchemaTemplateResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCreateSchemaTemplateResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceCreateSchemaTemplateResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCreateSchemaTemplateResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceCreateSchemaTemplateResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceCreateSchemaTemplateResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceCreateSchemaTemplate" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceAppendSchemaTemplateArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceAppendSchemaTemplateArgs { |
| req: TSAppendSchemaTemplateReq, |
| } |
| |
| impl IClientRPCServiceAppendSchemaTemplateArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceAppendSchemaTemplateArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSAppendSchemaTemplateReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSAppendSchemaTemplateReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceAppendSchemaTemplateArgs.req", &f_1)?; |
| let ret = IClientRPCServiceAppendSchemaTemplateArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("appendSchemaTemplate_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceAppendSchemaTemplateResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceAppendSchemaTemplateResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceAppendSchemaTemplateResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceAppendSchemaTemplateResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceAppendSchemaTemplateResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceAppendSchemaTemplateResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceAppendSchemaTemplate" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServicePruneSchemaTemplateArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServicePruneSchemaTemplateArgs { |
| req: TSPruneSchemaTemplateReq, |
| } |
| |
| impl IClientRPCServicePruneSchemaTemplateArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServicePruneSchemaTemplateArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSPruneSchemaTemplateReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSPruneSchemaTemplateReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServicePruneSchemaTemplateArgs.req", &f_1)?; |
| let ret = IClientRPCServicePruneSchemaTemplateArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("pruneSchemaTemplate_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServicePruneSchemaTemplateResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServicePruneSchemaTemplateResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServicePruneSchemaTemplateResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServicePruneSchemaTemplateResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServicePruneSchemaTemplateResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServicePruneSchemaTemplateResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServicePruneSchemaTemplate" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceQuerySchemaTemplateArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceQuerySchemaTemplateArgs { |
| req: TSQueryTemplateReq, |
| } |
| |
| impl IClientRPCServiceQuerySchemaTemplateArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceQuerySchemaTemplateArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSQueryTemplateReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSQueryTemplateReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceQuerySchemaTemplateArgs.req", &f_1)?; |
| let ret = IClientRPCServiceQuerySchemaTemplateArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("querySchemaTemplate_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceQuerySchemaTemplateResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceQuerySchemaTemplateResult { |
| result_value: Option<TSQueryTemplateResp>, |
| } |
| |
| impl IClientRPCServiceQuerySchemaTemplateResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceQuerySchemaTemplateResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSQueryTemplateResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSQueryTemplateResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceQuerySchemaTemplateResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceQuerySchemaTemplateResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSQueryTemplateResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceQuerySchemaTemplate" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceShowConfigurationTemplateArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceShowConfigurationTemplateArgs { |
| } |
| |
| impl IClientRPCServiceShowConfigurationTemplateArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceShowConfigurationTemplateArgs> { |
| i_prot.read_struct_begin()?; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceShowConfigurationTemplateArgs {}; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("showConfigurationTemplate_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceShowConfigurationTemplateResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceShowConfigurationTemplateResult { |
| result_value: Option<common::TShowConfigurationTemplateResp>, |
| } |
| |
| impl IClientRPCServiceShowConfigurationTemplateResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceShowConfigurationTemplateResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TShowConfigurationTemplateResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TShowConfigurationTemplateResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceShowConfigurationTemplateResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceShowConfigurationTemplateResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TShowConfigurationTemplateResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceShowConfigurationTemplate" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceShowConfigurationArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceShowConfigurationArgs { |
| node_id: i32, |
| } |
| |
| impl IClientRPCServiceShowConfigurationArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceShowConfigurationArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<i32> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_i32()?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceShowConfigurationArgs.node_id", &f_1)?; |
| let ret = IClientRPCServiceShowConfigurationArgs { |
| node_id: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("showConfiguration_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("nodeId", TType::I32, 1))?; |
| o_prot.write_i32(self.node_id)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceShowConfigurationResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceShowConfigurationResult { |
| result_value: Option<common::TShowConfigurationResp>, |
| } |
| |
| impl IClientRPCServiceShowConfigurationResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceShowConfigurationResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TShowConfigurationResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TShowConfigurationResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceShowConfigurationResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceShowConfigurationResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TShowConfigurationResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceShowConfiguration" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceSetSchemaTemplateArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceSetSchemaTemplateArgs { |
| req: TSSetSchemaTemplateReq, |
| } |
| |
| impl IClientRPCServiceSetSchemaTemplateArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceSetSchemaTemplateArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSSetSchemaTemplateReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSSetSchemaTemplateReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceSetSchemaTemplateArgs.req", &f_1)?; |
| let ret = IClientRPCServiceSetSchemaTemplateArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("setSchemaTemplate_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceSetSchemaTemplateResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceSetSchemaTemplateResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceSetSchemaTemplateResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceSetSchemaTemplateResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceSetSchemaTemplateResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceSetSchemaTemplateResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceSetSchemaTemplate" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceUnsetSchemaTemplateArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceUnsetSchemaTemplateArgs { |
| req: TSUnsetSchemaTemplateReq, |
| } |
| |
| impl IClientRPCServiceUnsetSchemaTemplateArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceUnsetSchemaTemplateArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSUnsetSchemaTemplateReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSUnsetSchemaTemplateReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceUnsetSchemaTemplateArgs.req", &f_1)?; |
| let ret = IClientRPCServiceUnsetSchemaTemplateArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("unsetSchemaTemplate_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceUnsetSchemaTemplateResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceUnsetSchemaTemplateResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceUnsetSchemaTemplateResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceUnsetSchemaTemplateResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceUnsetSchemaTemplateResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceUnsetSchemaTemplateResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceUnsetSchemaTemplate" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceDropSchemaTemplateArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceDropSchemaTemplateArgs { |
| req: TSDropSchemaTemplateReq, |
| } |
| |
| impl IClientRPCServiceDropSchemaTemplateArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceDropSchemaTemplateArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSDropSchemaTemplateReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSDropSchemaTemplateReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceDropSchemaTemplateArgs.req", &f_1)?; |
| let ret = IClientRPCServiceDropSchemaTemplateArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("dropSchemaTemplate_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceDropSchemaTemplateResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceDropSchemaTemplateResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceDropSchemaTemplateResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceDropSchemaTemplateResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceDropSchemaTemplateResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceDropSchemaTemplateResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceDropSchemaTemplate" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs { |
| req: TCreateTimeseriesUsingSchemaTemplateReq, |
| } |
| |
| impl IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TCreateTimeseriesUsingSchemaTemplateReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TCreateTimeseriesUsingSchemaTemplateReq::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs.req", &f_1)?; |
| let ret = IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs { |
| req: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("createTimeseriesUsingSchemaTemplate_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, 1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceCreateTimeseriesUsingSchemaTemplate" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceHandshakeArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceHandshakeArgs { |
| info: TSyncIdentityInfo, |
| } |
| |
| impl IClientRPCServiceHandshakeArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceHandshakeArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_neg1: Option<TSyncIdentityInfo> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| neg1 => { |
| let val = TSyncIdentityInfo::read_from_in_protocol(i_prot)?; |
| f_neg1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceHandshakeArgs.info", &f_neg1)?; |
| let ret = IClientRPCServiceHandshakeArgs { |
| info: f_neg1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("handshake_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("info", TType::Struct, -1))?; |
| self.info.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceHandshakeResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceHandshakeResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceHandshakeResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceHandshakeResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceHandshakeResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceHandshakeResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceHandshake" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceSendPipeDataArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceSendPipeDataArgs { |
| buff: Vec<u8>, |
| } |
| |
| impl IClientRPCServiceSendPipeDataArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceSendPipeDataArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<Vec<u8>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = i_prot.read_bytes()?; |
| f_1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceSendPipeDataArgs.buff", &f_1)?; |
| let ret = IClientRPCServiceSendPipeDataArgs { |
| buff: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("sendPipeData_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("buff", TType::String, 1))?; |
| o_prot.write_bytes(&self.buff)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceSendPipeDataResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceSendPipeDataResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceSendPipeDataResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceSendPipeDataResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceSendPipeDataResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceSendPipeDataResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceSendPipeData" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceSendFileArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceSendFileArgs { |
| meta_info: TSyncTransportMetaInfo, |
| buff: Vec<u8>, |
| } |
| |
| impl IClientRPCServiceSendFileArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceSendFileArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_1: Option<TSyncTransportMetaInfo> = None; |
| let mut f_2: Option<Vec<u8>> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 1 => { |
| let val = TSyncTransportMetaInfo::read_from_in_protocol(i_prot)?; |
| f_1 = Some(val); |
| }, |
| 2 => { |
| let val = i_prot.read_bytes()?; |
| f_2 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServiceSendFileArgs.meta_info", &f_1)?; |
| verify_required_field_exists("IClientRPCServiceSendFileArgs.buff", &f_2)?; |
| let ret = IClientRPCServiceSendFileArgs { |
| meta_info: f_1.expect("auto-generated code should have checked for presence of required fields"), |
| buff: f_2.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("sendFile_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("metaInfo", TType::Struct, 1))?; |
| self.meta_info.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("buff", TType::String, 2))?; |
| o_prot.write_bytes(&self.buff)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceSendFileResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceSendFileResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceSendFileResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceSendFileResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceSendFileResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceSendFileResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceSendFile" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServicePipeTransferArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServicePipeTransferArgs { |
| req: TPipeTransferReq, |
| } |
| |
| impl IClientRPCServicePipeTransferArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServicePipeTransferArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_neg1: Option<TPipeTransferReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| neg1 => { |
| let val = TPipeTransferReq::read_from_in_protocol(i_prot)?; |
| f_neg1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServicePipeTransferArgs.req", &f_neg1)?; |
| let ret = IClientRPCServicePipeTransferArgs { |
| req: f_neg1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("pipeTransfer_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, -1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServicePipeTransferResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServicePipeTransferResult { |
| result_value: Option<TPipeTransferResp>, |
| } |
| |
| impl IClientRPCServicePipeTransferResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServicePipeTransferResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TPipeTransferResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TPipeTransferResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServicePipeTransferResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServicePipeTransferResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TPipeTransferResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServicePipeTransfer" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServicePipeSubscribeArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServicePipeSubscribeArgs { |
| req: TPipeSubscribeReq, |
| } |
| |
| impl IClientRPCServicePipeSubscribeArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServicePipeSubscribeArgs> { |
| i_prot.read_struct_begin()?; |
| let mut f_neg1: Option<TPipeSubscribeReq> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| neg1 => { |
| let val = TPipeSubscribeReq::read_from_in_protocol(i_prot)?; |
| f_neg1 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| verify_required_field_exists("IClientRPCServicePipeSubscribeArgs.req", &f_neg1)?; |
| let ret = IClientRPCServicePipeSubscribeArgs { |
| req: f_neg1.expect("auto-generated code should have checked for presence of required fields"), |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("pipeSubscribe_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_begin(&TFieldIdentifier::new("req", TType::Struct, -1))?; |
| self.req.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServicePipeSubscribeResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServicePipeSubscribeResult { |
| result_value: Option<TPipeSubscribeResp>, |
| } |
| |
| impl IClientRPCServicePipeSubscribeResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServicePipeSubscribeResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TPipeSubscribeResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TPipeSubscribeResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServicePipeSubscribeResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServicePipeSubscribeResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TPipeSubscribeResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServicePipeSubscribe" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceGetBackupConfigurationArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceGetBackupConfigurationArgs { |
| } |
| |
| impl IClientRPCServiceGetBackupConfigurationArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceGetBackupConfigurationArgs> { |
| i_prot.read_struct_begin()?; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceGetBackupConfigurationArgs {}; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("getBackupConfiguration_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceGetBackupConfigurationResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceGetBackupConfigurationResult { |
| result_value: Option<TSBackupConfigurationResp>, |
| } |
| |
| impl IClientRPCServiceGetBackupConfigurationResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceGetBackupConfigurationResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSBackupConfigurationResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSBackupConfigurationResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceGetBackupConfigurationResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceGetBackupConfigurationResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSBackupConfigurationResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceGetBackupConfiguration" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceFetchAllConnectionsInfoArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceFetchAllConnectionsInfoArgs { |
| } |
| |
| impl IClientRPCServiceFetchAllConnectionsInfoArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceFetchAllConnectionsInfoArgs> { |
| i_prot.read_struct_begin()?; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceFetchAllConnectionsInfoArgs {}; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("fetchAllConnectionsInfo_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceFetchAllConnectionsInfoResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceFetchAllConnectionsInfoResult { |
| result_value: Option<TSConnectionInfoResp>, |
| } |
| |
| impl IClientRPCServiceFetchAllConnectionsInfoResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceFetchAllConnectionsInfoResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<TSConnectionInfoResp> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = TSConnectionInfoResp::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceFetchAllConnectionsInfoResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceFetchAllConnectionsInfoResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<TSConnectionInfoResp> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceFetchAllConnectionsInfo" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestConnectionEmptyRPCArgs |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestConnectionEmptyRPCArgs { |
| } |
| |
| impl IClientRPCServiceTestConnectionEmptyRPCArgs { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestConnectionEmptyRPCArgs> { |
| i_prot.read_struct_begin()?; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceTestConnectionEmptyRPCArgs {}; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("testConnectionEmptyRPC_args"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| } |
| |
| // |
| // IClientRPCServiceTestConnectionEmptyRPCResult |
| // |
| |
| #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| struct IClientRPCServiceTestConnectionEmptyRPCResult { |
| result_value: Option<common::TSStatus>, |
| } |
| |
| impl IClientRPCServiceTestConnectionEmptyRPCResult { |
| fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> thrift::Result<IClientRPCServiceTestConnectionEmptyRPCResult> { |
| i_prot.read_struct_begin()?; |
| let mut f_0: Option<common::TSStatus> = None; |
| loop { |
| let field_ident = i_prot.read_field_begin()?; |
| if field_ident.field_type == TType::Stop { |
| break; |
| } |
| let field_id = field_id(&field_ident)?; |
| match field_id { |
| 0 => { |
| let val = common::TSStatus::read_from_in_protocol(i_prot)?; |
| f_0 = Some(val); |
| }, |
| _ => { |
| i_prot.skip(field_ident.field_type)?; |
| }, |
| }; |
| i_prot.read_field_end()?; |
| } |
| i_prot.read_struct_end()?; |
| let ret = IClientRPCServiceTestConnectionEmptyRPCResult { |
| result_value: f_0, |
| }; |
| Ok(ret) |
| } |
| fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol) -> thrift::Result<()> { |
| let struct_ident = TStructIdentifier::new("IClientRPCServiceTestConnectionEmptyRPCResult"); |
| o_prot.write_struct_begin(&struct_ident)?; |
| if let Some(ref fld_var) = self.result_value { |
| o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?; |
| fld_var.write_to_out_protocol(o_prot)?; |
| o_prot.write_field_end()? |
| } |
| o_prot.write_field_stop()?; |
| o_prot.write_struct_end() |
| } |
| fn ok_or(self) -> thrift::Result<common::TSStatus> { |
| if self.result_value.is_some() { |
| Ok(self.result_value.unwrap()) |
| } else { |
| Err( |
| thrift::Error::Application( |
| ApplicationError::new( |
| ApplicationErrorKind::MissingResult, |
| "no result received for IClientRPCServiceTestConnectionEmptyRPC" |
| ) |
| ) |
| ) |
| } |
| } |
| } |
| |