zplus/
setting_system_s_d_k_services.rs

1// Autogenerated by Thrift Compiler (0.12.0)
2// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
3
4#![allow(unused_imports)]
5#![allow(unused_extern_crates)]
6#![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments, type_complexity))]
7#![cfg_attr(rustfmt, rustfmt_skip)]
8
9extern crate ordered_float;
10extern crate thrift;
11extern crate try_from;
12
13use ordered_float::OrderedFloat;
14use std::cell::RefCell;
15use std::collections::{BTreeMap, BTreeSet};
16use std::convert::From;
17use std::default::Default;
18use std::error::Error;
19use std::fmt;
20use std::fmt::{Display, Formatter};
21use std::rc::Rc;
22use try_from::TryFrom;
23
24use thrift::{ApplicationError, ApplicationErrorKind, ProtocolError, ProtocolErrorKind, TThriftClient};
25use thrift::protocol::{TFieldIdentifier, TListIdentifier, TMapIdentifier, TMessageIdentifier, TMessageType, TInputProtocol, TOutputProtocol, TSetIdentifier, TStructIdentifier, TType};
26use thrift::protocol::field_id;
27use thrift::protocol::verify_expected_message_type;
28use thrift::protocol::verify_expected_sequence_number;
29use thrift::protocol::verify_expected_service_call;
30use thrift::protocol::verify_required_field_exists;
31use thrift::server::TProcessor;
32
33use common_type_s_d_k_data_types;
34use setting_system_s_d_k_data_types;
35
36//
37// SettingSystemService service client
38//
39
40pub trait TSettingSystemServiceSyncClient {
41  /// Get a setting data of the module.
42  fn get_setting_item(&mut self, id: String) -> thrift::Result<common_type_s_d_k_data_types::SettingItem>;
43  /// Get a list of setting data of the module.
44  fn get_setting_items(&mut self, category: String, include_children: bool) -> thrift::Result<Vec<common_type_s_d_k_data_types::SettingItem>>;
45  /// Search a set of settings using a json format string.
46  /// According to the format of json string your write, searching can be separated to 3 types: simple search, lambda search and complicated search. And each of they can be combined with the other.
47  fn search_setting_items(&mut self, filter_json: String) -> thrift::Result<BTreeMap<String, setting_system_s_d_k_data_types::SettingSearchResult>>;
48  /// Get settings and categories in a tree
49  fn get_category_node(&mut self) -> thrift::Result<setting_system_s_d_k_data_types::SettingTree>;
50  /// Get child nodes of specified setting item or setting category
51  fn get_child_node(&mut self, parent: String, node_type: setting_system_s_d_k_data_types::NodeType, param: String, tags: Vec<String>) -> thrift::Result<setting_system_s_d_k_data_types::NodeList>;
52  /// Set the specified setting's "dataValue" with the new value
53  fn set_setting_item(&mut self, key: String, val: String) -> thrift::Result<bool>;
54  /// Set a set of settings' "dataValue"
55  fn set_setting_items(&mut self, key_values: BTreeMap<String, String>) -> thrift::Result<i32>;
56  /// Restore a module setting to default
57  fn restore_default(&mut self, module_name: String, category: String) -> thrift::Result<bool>;
58  /// @RestoreUserDefault_Summary
59  fn restore_user_default(&mut self, user_id: String, module_name: String, category: String) -> thrift::Result<bool>;
60  /// Update the module settings from an older version to the latest one
61  fn update_module_version(&mut self, module_name: String) -> thrift::Result<bool>;
62  /// @SetUserAppData_Summary
63  fn set_user_app_data(&mut self, user_id: String, category: String, setting_items: BTreeMap<String, common_type_s_d_k_data_types::SettingValue>) -> thrift::Result<i32>;
64  /// @GetUserAppData_Summary
65  fn get_user_app_data(&mut self, user_id: String, category: String, setting_keys: Vec<String>) -> thrift::Result<common_type_s_d_k_data_types::AppData>;
66  /// @RemoveUserAppData_Summary
67  fn remove_user_app_data(&mut self, user_id: String, category: String, setting_keys: Vec<String>) -> thrift::Result<i32>;
68  /// Notify layer0 that a setting item has specific event
69  fn setting_item_notify(&mut self, key: String, contents: setting_system_s_d_k_data_types::JSON) -> thrift::Result<bool>;
70  fn get_network_adapter_settings(&mut self) -> thrift::Result<setting_system_s_d_k_data_types::NetworkSettings>;
71  fn get_lan_network_name(&mut self) -> thrift::Result<String>;
72  fn set_network_settings(&mut self, is_w_lan: bool, enable_d_h_c_p: bool, ip_address: String, sub_mask: String, gateway: String, main_d_n_s: String, sub_d_n_s: String) -> thrift::Result<bool>;
73  fn set_network_proxy(&mut self, proxy_server: String, proxy_port: String) -> thrift::Result<bool>;
74  fn connect_to_wifi(&mut self, profile_name: String, key: String) -> thrift::Result<bool>;
75  fn connect_to_appointed_wifi(&mut self, profile_name: String, auth: String, ciper: String, key_type: String, key: String) -> thrift::Result<bool>;
76  fn get_network_settings(&mut self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkSettings>;
77  fn get_network_status(&mut self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkStatus>;
78  fn ruyi_test_network(&mut self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkTestResult>;
79  fn ruyi_start_network_speed_test(&mut self, userindex: i32) -> thrift::Result<bool>;
80  fn ruyi_stop_network_speed_test(&mut self, userindex: i32) -> thrift::Result<bool>;
81  fn get_available_wifi(&mut self) -> thrift::Result<Vec<setting_system_s_d_k_data_types::WifiEntity>>;
82  fn disconnect_wifi(&mut self) -> thrift::Result<bool>;
83  fn discover_bluetooth_device(&mut self) -> thrift::Result<bool>;
84  fn connect_bluetooth_device(&mut self, device_name: String, device_address: String) -> thrift::Result<bool>;
85  fn disconnect_bluetooth_device(&mut self, device_name: String, device_address: String) -> thrift::Result<bool>;
86  fn remove_bluetooth_device(&mut self, device_name: String, device_address: String) -> thrift::Result<bool>;
87}
88
89pub trait TSettingSystemServiceSyncClientMarker {}
90
91pub struct SettingSystemServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {
92  _i_prot: IP,
93  _o_prot: OP,
94  _sequence_number: i32,
95}
96
97impl <IP, OP> SettingSystemServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {
98  pub fn new(input_protocol: IP, output_protocol: OP) -> SettingSystemServiceSyncClient<IP, OP> {
99    SettingSystemServiceSyncClient { _i_prot: input_protocol, _o_prot: output_protocol, _sequence_number: 0 }
100  }
101}
102
103impl <IP, OP> TThriftClient for SettingSystemServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {
104  fn i_prot_mut(&mut self) -> &mut TInputProtocol { &mut self._i_prot }
105  fn o_prot_mut(&mut self) -> &mut TOutputProtocol { &mut self._o_prot }
106  fn sequence_number(&self) -> i32 { self._sequence_number }
107  fn increment_sequence_number(&mut self) -> i32 { self._sequence_number += 1; self._sequence_number }
108}
109
110impl <IP, OP> TSettingSystemServiceSyncClientMarker for SettingSystemServiceSyncClient<IP, OP> where IP: TInputProtocol, OP: TOutputProtocol {}
111
112impl <C: TThriftClient + TSettingSystemServiceSyncClientMarker> TSettingSystemServiceSyncClient for C {
113  fn get_setting_item(&mut self, id: String) -> thrift::Result<common_type_s_d_k_data_types::SettingItem> {
114    (
115      {
116        self.increment_sequence_number();
117        let message_ident = TMessageIdentifier::new("GetSettingItem", TMessageType::Call, self.sequence_number());
118        let call_args = SettingSystemServiceGetSettingItemArgs { id: id };
119        self.o_prot_mut().write_message_begin(&message_ident)?;
120        call_args.write_to_out_protocol(self.o_prot_mut())?;
121        self.o_prot_mut().write_message_end()?;
122        self.o_prot_mut().flush()
123      }
124    )?;
125    {
126      let message_ident = self.i_prot_mut().read_message_begin()?;
127      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
128      verify_expected_service_call("GetSettingItem", &message_ident.name)?;
129      if message_ident.message_type == TMessageType::Exception {
130        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
131        self.i_prot_mut().read_message_end()?;
132        return Err(thrift::Error::Application(remote_error))
133      }
134      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
135      let result = SettingSystemServiceGetSettingItemResult::read_from_in_protocol(self.i_prot_mut())?;
136      self.i_prot_mut().read_message_end()?;
137      result.ok_or()
138    }
139  }
140  fn get_setting_items(&mut self, category: String, include_children: bool) -> thrift::Result<Vec<common_type_s_d_k_data_types::SettingItem>> {
141    (
142      {
143        self.increment_sequence_number();
144        let message_ident = TMessageIdentifier::new("GetSettingItems", TMessageType::Call, self.sequence_number());
145        let call_args = SettingSystemServiceGetSettingItemsArgs { category: category, include_children: include_children };
146        self.o_prot_mut().write_message_begin(&message_ident)?;
147        call_args.write_to_out_protocol(self.o_prot_mut())?;
148        self.o_prot_mut().write_message_end()?;
149        self.o_prot_mut().flush()
150      }
151    )?;
152    {
153      let message_ident = self.i_prot_mut().read_message_begin()?;
154      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
155      verify_expected_service_call("GetSettingItems", &message_ident.name)?;
156      if message_ident.message_type == TMessageType::Exception {
157        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
158        self.i_prot_mut().read_message_end()?;
159        return Err(thrift::Error::Application(remote_error))
160      }
161      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
162      let result = SettingSystemServiceGetSettingItemsResult::read_from_in_protocol(self.i_prot_mut())?;
163      self.i_prot_mut().read_message_end()?;
164      result.ok_or()
165    }
166  }
167  fn search_setting_items(&mut self, filter_json: String) -> thrift::Result<BTreeMap<String, setting_system_s_d_k_data_types::SettingSearchResult>> {
168    (
169      {
170        self.increment_sequence_number();
171        let message_ident = TMessageIdentifier::new("SearchSettingItems", TMessageType::Call, self.sequence_number());
172        let call_args = SettingSystemServiceSearchSettingItemsArgs { filter_json: filter_json };
173        self.o_prot_mut().write_message_begin(&message_ident)?;
174        call_args.write_to_out_protocol(self.o_prot_mut())?;
175        self.o_prot_mut().write_message_end()?;
176        self.o_prot_mut().flush()
177      }
178    )?;
179    {
180      let message_ident = self.i_prot_mut().read_message_begin()?;
181      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
182      verify_expected_service_call("SearchSettingItems", &message_ident.name)?;
183      if message_ident.message_type == TMessageType::Exception {
184        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
185        self.i_prot_mut().read_message_end()?;
186        return Err(thrift::Error::Application(remote_error))
187      }
188      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
189      let result = SettingSystemServiceSearchSettingItemsResult::read_from_in_protocol(self.i_prot_mut())?;
190      self.i_prot_mut().read_message_end()?;
191      result.ok_or()
192    }
193  }
194  fn get_category_node(&mut self) -> thrift::Result<setting_system_s_d_k_data_types::SettingTree> {
195    (
196      {
197        self.increment_sequence_number();
198        let message_ident = TMessageIdentifier::new("GetCategoryNode", TMessageType::Call, self.sequence_number());
199        let call_args = SettingSystemServiceGetCategoryNodeArgs {  };
200        self.o_prot_mut().write_message_begin(&message_ident)?;
201        call_args.write_to_out_protocol(self.o_prot_mut())?;
202        self.o_prot_mut().write_message_end()?;
203        self.o_prot_mut().flush()
204      }
205    )?;
206    {
207      let message_ident = self.i_prot_mut().read_message_begin()?;
208      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
209      verify_expected_service_call("GetCategoryNode", &message_ident.name)?;
210      if message_ident.message_type == TMessageType::Exception {
211        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
212        self.i_prot_mut().read_message_end()?;
213        return Err(thrift::Error::Application(remote_error))
214      }
215      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
216      let result = SettingSystemServiceGetCategoryNodeResult::read_from_in_protocol(self.i_prot_mut())?;
217      self.i_prot_mut().read_message_end()?;
218      result.ok_or()
219    }
220  }
221  fn get_child_node(&mut self, parent: String, node_type: setting_system_s_d_k_data_types::NodeType, param: String, tags: Vec<String>) -> thrift::Result<setting_system_s_d_k_data_types::NodeList> {
222    (
223      {
224        self.increment_sequence_number();
225        let message_ident = TMessageIdentifier::new("GetChildNode", TMessageType::Call, self.sequence_number());
226        let call_args = SettingSystemServiceGetChildNodeArgs { parent: parent, node_type: node_type, param: param, tags: tags };
227        self.o_prot_mut().write_message_begin(&message_ident)?;
228        call_args.write_to_out_protocol(self.o_prot_mut())?;
229        self.o_prot_mut().write_message_end()?;
230        self.o_prot_mut().flush()
231      }
232    )?;
233    {
234      let message_ident = self.i_prot_mut().read_message_begin()?;
235      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
236      verify_expected_service_call("GetChildNode", &message_ident.name)?;
237      if message_ident.message_type == TMessageType::Exception {
238        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
239        self.i_prot_mut().read_message_end()?;
240        return Err(thrift::Error::Application(remote_error))
241      }
242      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
243      let result = SettingSystemServiceGetChildNodeResult::read_from_in_protocol(self.i_prot_mut())?;
244      self.i_prot_mut().read_message_end()?;
245      result.ok_or()
246    }
247  }
248  fn set_setting_item(&mut self, key: String, val: String) -> thrift::Result<bool> {
249    (
250      {
251        self.increment_sequence_number();
252        let message_ident = TMessageIdentifier::new("SetSettingItem", TMessageType::Call, self.sequence_number());
253        let call_args = SettingSystemServiceSetSettingItemArgs { key: key, val: val };
254        self.o_prot_mut().write_message_begin(&message_ident)?;
255        call_args.write_to_out_protocol(self.o_prot_mut())?;
256        self.o_prot_mut().write_message_end()?;
257        self.o_prot_mut().flush()
258      }
259    )?;
260    {
261      let message_ident = self.i_prot_mut().read_message_begin()?;
262      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
263      verify_expected_service_call("SetSettingItem", &message_ident.name)?;
264      if message_ident.message_type == TMessageType::Exception {
265        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
266        self.i_prot_mut().read_message_end()?;
267        return Err(thrift::Error::Application(remote_error))
268      }
269      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
270      let result = SettingSystemServiceSetSettingItemResult::read_from_in_protocol(self.i_prot_mut())?;
271      self.i_prot_mut().read_message_end()?;
272      result.ok_or()
273    }
274  }
275  fn set_setting_items(&mut self, key_values: BTreeMap<String, String>) -> thrift::Result<i32> {
276    (
277      {
278        self.increment_sequence_number();
279        let message_ident = TMessageIdentifier::new("SetSettingItems", TMessageType::Call, self.sequence_number());
280        let call_args = SettingSystemServiceSetSettingItemsArgs { key_values: key_values };
281        self.o_prot_mut().write_message_begin(&message_ident)?;
282        call_args.write_to_out_protocol(self.o_prot_mut())?;
283        self.o_prot_mut().write_message_end()?;
284        self.o_prot_mut().flush()
285      }
286    )?;
287    {
288      let message_ident = self.i_prot_mut().read_message_begin()?;
289      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
290      verify_expected_service_call("SetSettingItems", &message_ident.name)?;
291      if message_ident.message_type == TMessageType::Exception {
292        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
293        self.i_prot_mut().read_message_end()?;
294        return Err(thrift::Error::Application(remote_error))
295      }
296      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
297      let result = SettingSystemServiceSetSettingItemsResult::read_from_in_protocol(self.i_prot_mut())?;
298      self.i_prot_mut().read_message_end()?;
299      result.ok_or()
300    }
301  }
302  fn restore_default(&mut self, module_name: String, category: String) -> thrift::Result<bool> {
303    (
304      {
305        self.increment_sequence_number();
306        let message_ident = TMessageIdentifier::new("RestoreDefault", TMessageType::Call, self.sequence_number());
307        let call_args = SettingSystemServiceRestoreDefaultArgs { module_name: module_name, category: category };
308        self.o_prot_mut().write_message_begin(&message_ident)?;
309        call_args.write_to_out_protocol(self.o_prot_mut())?;
310        self.o_prot_mut().write_message_end()?;
311        self.o_prot_mut().flush()
312      }
313    )?;
314    {
315      let message_ident = self.i_prot_mut().read_message_begin()?;
316      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
317      verify_expected_service_call("RestoreDefault", &message_ident.name)?;
318      if message_ident.message_type == TMessageType::Exception {
319        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
320        self.i_prot_mut().read_message_end()?;
321        return Err(thrift::Error::Application(remote_error))
322      }
323      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
324      let result = SettingSystemServiceRestoreDefaultResult::read_from_in_protocol(self.i_prot_mut())?;
325      self.i_prot_mut().read_message_end()?;
326      result.ok_or()
327    }
328  }
329  fn restore_user_default(&mut self, user_id: String, module_name: String, category: String) -> thrift::Result<bool> {
330    (
331      {
332        self.increment_sequence_number();
333        let message_ident = TMessageIdentifier::new("RestoreUserDefault", TMessageType::Call, self.sequence_number());
334        let call_args = SettingSystemServiceRestoreUserDefaultArgs { user_id: user_id, module_name: module_name, category: category };
335        self.o_prot_mut().write_message_begin(&message_ident)?;
336        call_args.write_to_out_protocol(self.o_prot_mut())?;
337        self.o_prot_mut().write_message_end()?;
338        self.o_prot_mut().flush()
339      }
340    )?;
341    {
342      let message_ident = self.i_prot_mut().read_message_begin()?;
343      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
344      verify_expected_service_call("RestoreUserDefault", &message_ident.name)?;
345      if message_ident.message_type == TMessageType::Exception {
346        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
347        self.i_prot_mut().read_message_end()?;
348        return Err(thrift::Error::Application(remote_error))
349      }
350      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
351      let result = SettingSystemServiceRestoreUserDefaultResult::read_from_in_protocol(self.i_prot_mut())?;
352      self.i_prot_mut().read_message_end()?;
353      result.ok_or()
354    }
355  }
356  fn update_module_version(&mut self, module_name: String) -> thrift::Result<bool> {
357    (
358      {
359        self.increment_sequence_number();
360        let message_ident = TMessageIdentifier::new("UpdateModuleVersion", TMessageType::Call, self.sequence_number());
361        let call_args = SettingSystemServiceUpdateModuleVersionArgs { module_name: module_name };
362        self.o_prot_mut().write_message_begin(&message_ident)?;
363        call_args.write_to_out_protocol(self.o_prot_mut())?;
364        self.o_prot_mut().write_message_end()?;
365        self.o_prot_mut().flush()
366      }
367    )?;
368    {
369      let message_ident = self.i_prot_mut().read_message_begin()?;
370      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
371      verify_expected_service_call("UpdateModuleVersion", &message_ident.name)?;
372      if message_ident.message_type == TMessageType::Exception {
373        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
374        self.i_prot_mut().read_message_end()?;
375        return Err(thrift::Error::Application(remote_error))
376      }
377      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
378      let result = SettingSystemServiceUpdateModuleVersionResult::read_from_in_protocol(self.i_prot_mut())?;
379      self.i_prot_mut().read_message_end()?;
380      result.ok_or()
381    }
382  }
383  fn set_user_app_data(&mut self, user_id: String, category: String, setting_items: BTreeMap<String, common_type_s_d_k_data_types::SettingValue>) -> thrift::Result<i32> {
384    (
385      {
386        self.increment_sequence_number();
387        let message_ident = TMessageIdentifier::new("SetUserAppData", TMessageType::Call, self.sequence_number());
388        let call_args = SettingSystemServiceSetUserAppDataArgs { user_id: user_id, category: category, setting_items: setting_items };
389        self.o_prot_mut().write_message_begin(&message_ident)?;
390        call_args.write_to_out_protocol(self.o_prot_mut())?;
391        self.o_prot_mut().write_message_end()?;
392        self.o_prot_mut().flush()
393      }
394    )?;
395    {
396      let message_ident = self.i_prot_mut().read_message_begin()?;
397      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
398      verify_expected_service_call("SetUserAppData", &message_ident.name)?;
399      if message_ident.message_type == TMessageType::Exception {
400        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
401        self.i_prot_mut().read_message_end()?;
402        return Err(thrift::Error::Application(remote_error))
403      }
404      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
405      let result = SettingSystemServiceSetUserAppDataResult::read_from_in_protocol(self.i_prot_mut())?;
406      self.i_prot_mut().read_message_end()?;
407      result.ok_or()
408    }
409  }
410  fn get_user_app_data(&mut self, user_id: String, category: String, setting_keys: Vec<String>) -> thrift::Result<common_type_s_d_k_data_types::AppData> {
411    (
412      {
413        self.increment_sequence_number();
414        let message_ident = TMessageIdentifier::new("GetUserAppData", TMessageType::Call, self.sequence_number());
415        let call_args = SettingSystemServiceGetUserAppDataArgs { user_id: user_id, category: category, setting_keys: setting_keys };
416        self.o_prot_mut().write_message_begin(&message_ident)?;
417        call_args.write_to_out_protocol(self.o_prot_mut())?;
418        self.o_prot_mut().write_message_end()?;
419        self.o_prot_mut().flush()
420      }
421    )?;
422    {
423      let message_ident = self.i_prot_mut().read_message_begin()?;
424      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
425      verify_expected_service_call("GetUserAppData", &message_ident.name)?;
426      if message_ident.message_type == TMessageType::Exception {
427        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
428        self.i_prot_mut().read_message_end()?;
429        return Err(thrift::Error::Application(remote_error))
430      }
431      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
432      let result = SettingSystemServiceGetUserAppDataResult::read_from_in_protocol(self.i_prot_mut())?;
433      self.i_prot_mut().read_message_end()?;
434      result.ok_or()
435    }
436  }
437  fn remove_user_app_data(&mut self, user_id: String, category: String, setting_keys: Vec<String>) -> thrift::Result<i32> {
438    (
439      {
440        self.increment_sequence_number();
441        let message_ident = TMessageIdentifier::new("RemoveUserAppData", TMessageType::Call, self.sequence_number());
442        let call_args = SettingSystemServiceRemoveUserAppDataArgs { user_id: user_id, category: category, setting_keys: setting_keys };
443        self.o_prot_mut().write_message_begin(&message_ident)?;
444        call_args.write_to_out_protocol(self.o_prot_mut())?;
445        self.o_prot_mut().write_message_end()?;
446        self.o_prot_mut().flush()
447      }
448    )?;
449    {
450      let message_ident = self.i_prot_mut().read_message_begin()?;
451      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
452      verify_expected_service_call("RemoveUserAppData", &message_ident.name)?;
453      if message_ident.message_type == TMessageType::Exception {
454        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
455        self.i_prot_mut().read_message_end()?;
456        return Err(thrift::Error::Application(remote_error))
457      }
458      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
459      let result = SettingSystemServiceRemoveUserAppDataResult::read_from_in_protocol(self.i_prot_mut())?;
460      self.i_prot_mut().read_message_end()?;
461      result.ok_or()
462    }
463  }
464  fn setting_item_notify(&mut self, key: String, contents: setting_system_s_d_k_data_types::JSON) -> thrift::Result<bool> {
465    (
466      {
467        self.increment_sequence_number();
468        let message_ident = TMessageIdentifier::new("SettingItemNotify", TMessageType::Call, self.sequence_number());
469        let call_args = SettingSystemServiceSettingItemNotifyArgs { key: key, contents: contents };
470        self.o_prot_mut().write_message_begin(&message_ident)?;
471        call_args.write_to_out_protocol(self.o_prot_mut())?;
472        self.o_prot_mut().write_message_end()?;
473        self.o_prot_mut().flush()
474      }
475    )?;
476    {
477      let message_ident = self.i_prot_mut().read_message_begin()?;
478      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
479      verify_expected_service_call("SettingItemNotify", &message_ident.name)?;
480      if message_ident.message_type == TMessageType::Exception {
481        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
482        self.i_prot_mut().read_message_end()?;
483        return Err(thrift::Error::Application(remote_error))
484      }
485      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
486      let result = SettingSystemServiceSettingItemNotifyResult::read_from_in_protocol(self.i_prot_mut())?;
487      self.i_prot_mut().read_message_end()?;
488      result.ok_or()
489    }
490  }
491  fn get_network_adapter_settings(&mut self) -> thrift::Result<setting_system_s_d_k_data_types::NetworkSettings> {
492    (
493      {
494        self.increment_sequence_number();
495        let message_ident = TMessageIdentifier::new("GetNetworkAdapterSettings", TMessageType::Call, self.sequence_number());
496        let call_args = SettingSystemServiceGetNetworkAdapterSettingsArgs {  };
497        self.o_prot_mut().write_message_begin(&message_ident)?;
498        call_args.write_to_out_protocol(self.o_prot_mut())?;
499        self.o_prot_mut().write_message_end()?;
500        self.o_prot_mut().flush()
501      }
502    )?;
503    {
504      let message_ident = self.i_prot_mut().read_message_begin()?;
505      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
506      verify_expected_service_call("GetNetworkAdapterSettings", &message_ident.name)?;
507      if message_ident.message_type == TMessageType::Exception {
508        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
509        self.i_prot_mut().read_message_end()?;
510        return Err(thrift::Error::Application(remote_error))
511      }
512      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
513      let result = SettingSystemServiceGetNetworkAdapterSettingsResult::read_from_in_protocol(self.i_prot_mut())?;
514      self.i_prot_mut().read_message_end()?;
515      result.ok_or()
516    }
517  }
518  fn get_lan_network_name(&mut self) -> thrift::Result<String> {
519    (
520      {
521        self.increment_sequence_number();
522        let message_ident = TMessageIdentifier::new("GetLanNetworkName", TMessageType::Call, self.sequence_number());
523        let call_args = SettingSystemServiceGetLanNetworkNameArgs {  };
524        self.o_prot_mut().write_message_begin(&message_ident)?;
525        call_args.write_to_out_protocol(self.o_prot_mut())?;
526        self.o_prot_mut().write_message_end()?;
527        self.o_prot_mut().flush()
528      }
529    )?;
530    {
531      let message_ident = self.i_prot_mut().read_message_begin()?;
532      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
533      verify_expected_service_call("GetLanNetworkName", &message_ident.name)?;
534      if message_ident.message_type == TMessageType::Exception {
535        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
536        self.i_prot_mut().read_message_end()?;
537        return Err(thrift::Error::Application(remote_error))
538      }
539      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
540      let result = SettingSystemServiceGetLanNetworkNameResult::read_from_in_protocol(self.i_prot_mut())?;
541      self.i_prot_mut().read_message_end()?;
542      result.ok_or()
543    }
544  }
545  fn set_network_settings(&mut self, is_w_lan: bool, enable_d_h_c_p: bool, ip_address: String, sub_mask: String, gateway: String, main_d_n_s: String, sub_d_n_s: String) -> thrift::Result<bool> {
546    (
547      {
548        self.increment_sequence_number();
549        let message_ident = TMessageIdentifier::new("SetNetworkSettings", TMessageType::Call, self.sequence_number());
550        let call_args = SettingSystemServiceSetNetworkSettingsArgs { is_w_lan: is_w_lan, enable_d_h_c_p: enable_d_h_c_p, ip_address: ip_address, sub_mask: sub_mask, gateway: gateway, main_d_n_s: main_d_n_s, sub_d_n_s: sub_d_n_s };
551        self.o_prot_mut().write_message_begin(&message_ident)?;
552        call_args.write_to_out_protocol(self.o_prot_mut())?;
553        self.o_prot_mut().write_message_end()?;
554        self.o_prot_mut().flush()
555      }
556    )?;
557    {
558      let message_ident = self.i_prot_mut().read_message_begin()?;
559      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
560      verify_expected_service_call("SetNetworkSettings", &message_ident.name)?;
561      if message_ident.message_type == TMessageType::Exception {
562        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
563        self.i_prot_mut().read_message_end()?;
564        return Err(thrift::Error::Application(remote_error))
565      }
566      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
567      let result = SettingSystemServiceSetNetworkSettingsResult::read_from_in_protocol(self.i_prot_mut())?;
568      self.i_prot_mut().read_message_end()?;
569      result.ok_or()
570    }
571  }
572  fn set_network_proxy(&mut self, proxy_server: String, proxy_port: String) -> thrift::Result<bool> {
573    (
574      {
575        self.increment_sequence_number();
576        let message_ident = TMessageIdentifier::new("SetNetworkProxy", TMessageType::Call, self.sequence_number());
577        let call_args = SettingSystemServiceSetNetworkProxyArgs { proxy_server: proxy_server, proxy_port: proxy_port };
578        self.o_prot_mut().write_message_begin(&message_ident)?;
579        call_args.write_to_out_protocol(self.o_prot_mut())?;
580        self.o_prot_mut().write_message_end()?;
581        self.o_prot_mut().flush()
582      }
583    )?;
584    {
585      let message_ident = self.i_prot_mut().read_message_begin()?;
586      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
587      verify_expected_service_call("SetNetworkProxy", &message_ident.name)?;
588      if message_ident.message_type == TMessageType::Exception {
589        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
590        self.i_prot_mut().read_message_end()?;
591        return Err(thrift::Error::Application(remote_error))
592      }
593      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
594      let result = SettingSystemServiceSetNetworkProxyResult::read_from_in_protocol(self.i_prot_mut())?;
595      self.i_prot_mut().read_message_end()?;
596      result.ok_or()
597    }
598  }
599  fn connect_to_wifi(&mut self, profile_name: String, key: String) -> thrift::Result<bool> {
600    (
601      {
602        self.increment_sequence_number();
603        let message_ident = TMessageIdentifier::new("ConnectToWifi", TMessageType::Call, self.sequence_number());
604        let call_args = SettingSystemServiceConnectToWifiArgs { profile_name: profile_name, key: key };
605        self.o_prot_mut().write_message_begin(&message_ident)?;
606        call_args.write_to_out_protocol(self.o_prot_mut())?;
607        self.o_prot_mut().write_message_end()?;
608        self.o_prot_mut().flush()
609      }
610    )?;
611    {
612      let message_ident = self.i_prot_mut().read_message_begin()?;
613      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
614      verify_expected_service_call("ConnectToWifi", &message_ident.name)?;
615      if message_ident.message_type == TMessageType::Exception {
616        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
617        self.i_prot_mut().read_message_end()?;
618        return Err(thrift::Error::Application(remote_error))
619      }
620      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
621      let result = SettingSystemServiceConnectToWifiResult::read_from_in_protocol(self.i_prot_mut())?;
622      self.i_prot_mut().read_message_end()?;
623      result.ok_or()
624    }
625  }
626  fn connect_to_appointed_wifi(&mut self, profile_name: String, auth: String, ciper: String, key_type: String, key: String) -> thrift::Result<bool> {
627    (
628      {
629        self.increment_sequence_number();
630        let message_ident = TMessageIdentifier::new("ConnectToAppointedWifi", TMessageType::Call, self.sequence_number());
631        let call_args = SettingSystemServiceConnectToAppointedWifiArgs { profile_name: profile_name, auth: auth, ciper: ciper, key_type: key_type, key: key };
632        self.o_prot_mut().write_message_begin(&message_ident)?;
633        call_args.write_to_out_protocol(self.o_prot_mut())?;
634        self.o_prot_mut().write_message_end()?;
635        self.o_prot_mut().flush()
636      }
637    )?;
638    {
639      let message_ident = self.i_prot_mut().read_message_begin()?;
640      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
641      verify_expected_service_call("ConnectToAppointedWifi", &message_ident.name)?;
642      if message_ident.message_type == TMessageType::Exception {
643        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
644        self.i_prot_mut().read_message_end()?;
645        return Err(thrift::Error::Application(remote_error))
646      }
647      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
648      let result = SettingSystemServiceConnectToAppointedWifiResult::read_from_in_protocol(self.i_prot_mut())?;
649      self.i_prot_mut().read_message_end()?;
650      result.ok_or()
651    }
652  }
653  fn get_network_settings(&mut self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkSettings> {
654    (
655      {
656        self.increment_sequence_number();
657        let message_ident = TMessageIdentifier::new("GetNetworkSettings", TMessageType::Call, self.sequence_number());
658        let call_args = SettingSystemServiceGetNetworkSettingsArgs {  };
659        self.o_prot_mut().write_message_begin(&message_ident)?;
660        call_args.write_to_out_protocol(self.o_prot_mut())?;
661        self.o_prot_mut().write_message_end()?;
662        self.o_prot_mut().flush()
663      }
664    )?;
665    {
666      let message_ident = self.i_prot_mut().read_message_begin()?;
667      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
668      verify_expected_service_call("GetNetworkSettings", &message_ident.name)?;
669      if message_ident.message_type == TMessageType::Exception {
670        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
671        self.i_prot_mut().read_message_end()?;
672        return Err(thrift::Error::Application(remote_error))
673      }
674      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
675      let result = SettingSystemServiceGetNetworkSettingsResult::read_from_in_protocol(self.i_prot_mut())?;
676      self.i_prot_mut().read_message_end()?;
677      result.ok_or()
678    }
679  }
680  fn get_network_status(&mut self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkStatus> {
681    (
682      {
683        self.increment_sequence_number();
684        let message_ident = TMessageIdentifier::new("GetNetworkStatus", TMessageType::Call, self.sequence_number());
685        let call_args = SettingSystemServiceGetNetworkStatusArgs {  };
686        self.o_prot_mut().write_message_begin(&message_ident)?;
687        call_args.write_to_out_protocol(self.o_prot_mut())?;
688        self.o_prot_mut().write_message_end()?;
689        self.o_prot_mut().flush()
690      }
691    )?;
692    {
693      let message_ident = self.i_prot_mut().read_message_begin()?;
694      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
695      verify_expected_service_call("GetNetworkStatus", &message_ident.name)?;
696      if message_ident.message_type == TMessageType::Exception {
697        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
698        self.i_prot_mut().read_message_end()?;
699        return Err(thrift::Error::Application(remote_error))
700      }
701      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
702      let result = SettingSystemServiceGetNetworkStatusResult::read_from_in_protocol(self.i_prot_mut())?;
703      self.i_prot_mut().read_message_end()?;
704      result.ok_or()
705    }
706  }
707  fn ruyi_test_network(&mut self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkTestResult> {
708    (
709      {
710        self.increment_sequence_number();
711        let message_ident = TMessageIdentifier::new("RuyiTestNetwork", TMessageType::Call, self.sequence_number());
712        let call_args = SettingSystemServiceRuyiTestNetworkArgs {  };
713        self.o_prot_mut().write_message_begin(&message_ident)?;
714        call_args.write_to_out_protocol(self.o_prot_mut())?;
715        self.o_prot_mut().write_message_end()?;
716        self.o_prot_mut().flush()
717      }
718    )?;
719    {
720      let message_ident = self.i_prot_mut().read_message_begin()?;
721      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
722      verify_expected_service_call("RuyiTestNetwork", &message_ident.name)?;
723      if message_ident.message_type == TMessageType::Exception {
724        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
725        self.i_prot_mut().read_message_end()?;
726        return Err(thrift::Error::Application(remote_error))
727      }
728      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
729      let result = SettingSystemServiceRuyiTestNetworkResult::read_from_in_protocol(self.i_prot_mut())?;
730      self.i_prot_mut().read_message_end()?;
731      result.ok_or()
732    }
733  }
734  fn ruyi_start_network_speed_test(&mut self, userindex: i32) -> thrift::Result<bool> {
735    (
736      {
737        self.increment_sequence_number();
738        let message_ident = TMessageIdentifier::new("RuyiStartNetworkSpeedTest", TMessageType::Call, self.sequence_number());
739        let call_args = SettingSystemServiceRuyiStartNetworkSpeedTestArgs { userindex: userindex };
740        self.o_prot_mut().write_message_begin(&message_ident)?;
741        call_args.write_to_out_protocol(self.o_prot_mut())?;
742        self.o_prot_mut().write_message_end()?;
743        self.o_prot_mut().flush()
744      }
745    )?;
746    {
747      let message_ident = self.i_prot_mut().read_message_begin()?;
748      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
749      verify_expected_service_call("RuyiStartNetworkSpeedTest", &message_ident.name)?;
750      if message_ident.message_type == TMessageType::Exception {
751        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
752        self.i_prot_mut().read_message_end()?;
753        return Err(thrift::Error::Application(remote_error))
754      }
755      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
756      let result = SettingSystemServiceRuyiStartNetworkSpeedTestResult::read_from_in_protocol(self.i_prot_mut())?;
757      self.i_prot_mut().read_message_end()?;
758      result.ok_or()
759    }
760  }
761  fn ruyi_stop_network_speed_test(&mut self, userindex: i32) -> thrift::Result<bool> {
762    (
763      {
764        self.increment_sequence_number();
765        let message_ident = TMessageIdentifier::new("RuyiStopNetworkSpeedTest", TMessageType::Call, self.sequence_number());
766        let call_args = SettingSystemServiceRuyiStopNetworkSpeedTestArgs { userindex: userindex };
767        self.o_prot_mut().write_message_begin(&message_ident)?;
768        call_args.write_to_out_protocol(self.o_prot_mut())?;
769        self.o_prot_mut().write_message_end()?;
770        self.o_prot_mut().flush()
771      }
772    )?;
773    {
774      let message_ident = self.i_prot_mut().read_message_begin()?;
775      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
776      verify_expected_service_call("RuyiStopNetworkSpeedTest", &message_ident.name)?;
777      if message_ident.message_type == TMessageType::Exception {
778        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
779        self.i_prot_mut().read_message_end()?;
780        return Err(thrift::Error::Application(remote_error))
781      }
782      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
783      let result = SettingSystemServiceRuyiStopNetworkSpeedTestResult::read_from_in_protocol(self.i_prot_mut())?;
784      self.i_prot_mut().read_message_end()?;
785      result.ok_or()
786    }
787  }
788  fn get_available_wifi(&mut self) -> thrift::Result<Vec<setting_system_s_d_k_data_types::WifiEntity>> {
789    (
790      {
791        self.increment_sequence_number();
792        let message_ident = TMessageIdentifier::new("GetAvailableWifi", TMessageType::Call, self.sequence_number());
793        let call_args = SettingSystemServiceGetAvailableWifiArgs {  };
794        self.o_prot_mut().write_message_begin(&message_ident)?;
795        call_args.write_to_out_protocol(self.o_prot_mut())?;
796        self.o_prot_mut().write_message_end()?;
797        self.o_prot_mut().flush()
798      }
799    )?;
800    {
801      let message_ident = self.i_prot_mut().read_message_begin()?;
802      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
803      verify_expected_service_call("GetAvailableWifi", &message_ident.name)?;
804      if message_ident.message_type == TMessageType::Exception {
805        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
806        self.i_prot_mut().read_message_end()?;
807        return Err(thrift::Error::Application(remote_error))
808      }
809      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
810      let result = SettingSystemServiceGetAvailableWifiResult::read_from_in_protocol(self.i_prot_mut())?;
811      self.i_prot_mut().read_message_end()?;
812      result.ok_or()
813    }
814  }
815  fn disconnect_wifi(&mut self) -> thrift::Result<bool> {
816    (
817      {
818        self.increment_sequence_number();
819        let message_ident = TMessageIdentifier::new("DisconnectWifi", TMessageType::Call, self.sequence_number());
820        let call_args = SettingSystemServiceDisconnectWifiArgs {  };
821        self.o_prot_mut().write_message_begin(&message_ident)?;
822        call_args.write_to_out_protocol(self.o_prot_mut())?;
823        self.o_prot_mut().write_message_end()?;
824        self.o_prot_mut().flush()
825      }
826    )?;
827    {
828      let message_ident = self.i_prot_mut().read_message_begin()?;
829      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
830      verify_expected_service_call("DisconnectWifi", &message_ident.name)?;
831      if message_ident.message_type == TMessageType::Exception {
832        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
833        self.i_prot_mut().read_message_end()?;
834        return Err(thrift::Error::Application(remote_error))
835      }
836      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
837      let result = SettingSystemServiceDisconnectWifiResult::read_from_in_protocol(self.i_prot_mut())?;
838      self.i_prot_mut().read_message_end()?;
839      result.ok_or()
840    }
841  }
842  fn discover_bluetooth_device(&mut self) -> thrift::Result<bool> {
843    (
844      {
845        self.increment_sequence_number();
846        let message_ident = TMessageIdentifier::new("DiscoverBluetoothDevice", TMessageType::Call, self.sequence_number());
847        let call_args = SettingSystemServiceDiscoverBluetoothDeviceArgs {  };
848        self.o_prot_mut().write_message_begin(&message_ident)?;
849        call_args.write_to_out_protocol(self.o_prot_mut())?;
850        self.o_prot_mut().write_message_end()?;
851        self.o_prot_mut().flush()
852      }
853    )?;
854    {
855      let message_ident = self.i_prot_mut().read_message_begin()?;
856      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
857      verify_expected_service_call("DiscoverBluetoothDevice", &message_ident.name)?;
858      if message_ident.message_type == TMessageType::Exception {
859        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
860        self.i_prot_mut().read_message_end()?;
861        return Err(thrift::Error::Application(remote_error))
862      }
863      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
864      let result = SettingSystemServiceDiscoverBluetoothDeviceResult::read_from_in_protocol(self.i_prot_mut())?;
865      self.i_prot_mut().read_message_end()?;
866      result.ok_or()
867    }
868  }
869  fn connect_bluetooth_device(&mut self, device_name: String, device_address: String) -> thrift::Result<bool> {
870    (
871      {
872        self.increment_sequence_number();
873        let message_ident = TMessageIdentifier::new("ConnectBluetoothDevice", TMessageType::Call, self.sequence_number());
874        let call_args = SettingSystemServiceConnectBluetoothDeviceArgs { device_name: device_name, device_address: device_address };
875        self.o_prot_mut().write_message_begin(&message_ident)?;
876        call_args.write_to_out_protocol(self.o_prot_mut())?;
877        self.o_prot_mut().write_message_end()?;
878        self.o_prot_mut().flush()
879      }
880    )?;
881    {
882      let message_ident = self.i_prot_mut().read_message_begin()?;
883      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
884      verify_expected_service_call("ConnectBluetoothDevice", &message_ident.name)?;
885      if message_ident.message_type == TMessageType::Exception {
886        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
887        self.i_prot_mut().read_message_end()?;
888        return Err(thrift::Error::Application(remote_error))
889      }
890      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
891      let result = SettingSystemServiceConnectBluetoothDeviceResult::read_from_in_protocol(self.i_prot_mut())?;
892      self.i_prot_mut().read_message_end()?;
893      result.ok_or()
894    }
895  }
896  fn disconnect_bluetooth_device(&mut self, device_name: String, device_address: String) -> thrift::Result<bool> {
897    (
898      {
899        self.increment_sequence_number();
900        let message_ident = TMessageIdentifier::new("DisconnectBluetoothDevice", TMessageType::Call, self.sequence_number());
901        let call_args = SettingSystemServiceDisconnectBluetoothDeviceArgs { device_name: device_name, device_address: device_address };
902        self.o_prot_mut().write_message_begin(&message_ident)?;
903        call_args.write_to_out_protocol(self.o_prot_mut())?;
904        self.o_prot_mut().write_message_end()?;
905        self.o_prot_mut().flush()
906      }
907    )?;
908    {
909      let message_ident = self.i_prot_mut().read_message_begin()?;
910      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
911      verify_expected_service_call("DisconnectBluetoothDevice", &message_ident.name)?;
912      if message_ident.message_type == TMessageType::Exception {
913        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
914        self.i_prot_mut().read_message_end()?;
915        return Err(thrift::Error::Application(remote_error))
916      }
917      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
918      let result = SettingSystemServiceDisconnectBluetoothDeviceResult::read_from_in_protocol(self.i_prot_mut())?;
919      self.i_prot_mut().read_message_end()?;
920      result.ok_or()
921    }
922  }
923  fn remove_bluetooth_device(&mut self, device_name: String, device_address: String) -> thrift::Result<bool> {
924    (
925      {
926        self.increment_sequence_number();
927        let message_ident = TMessageIdentifier::new("RemoveBluetoothDevice", TMessageType::Call, self.sequence_number());
928        let call_args = SettingSystemServiceRemoveBluetoothDeviceArgs { device_name: device_name, device_address: device_address };
929        self.o_prot_mut().write_message_begin(&message_ident)?;
930        call_args.write_to_out_protocol(self.o_prot_mut())?;
931        self.o_prot_mut().write_message_end()?;
932        self.o_prot_mut().flush()
933      }
934    )?;
935    {
936      let message_ident = self.i_prot_mut().read_message_begin()?;
937      verify_expected_sequence_number(self.sequence_number(), message_ident.sequence_number)?;
938      verify_expected_service_call("RemoveBluetoothDevice", &message_ident.name)?;
939      if message_ident.message_type == TMessageType::Exception {
940        let remote_error = thrift::Error::read_application_error_from_in_protocol(self.i_prot_mut())?;
941        self.i_prot_mut().read_message_end()?;
942        return Err(thrift::Error::Application(remote_error))
943      }
944      verify_expected_message_type(TMessageType::Reply, message_ident.message_type)?;
945      let result = SettingSystemServiceRemoveBluetoothDeviceResult::read_from_in_protocol(self.i_prot_mut())?;
946      self.i_prot_mut().read_message_end()?;
947      result.ok_or()
948    }
949  }
950}
951
952//
953// SettingSystemService service processor
954//
955
956pub trait SettingSystemServiceSyncHandler {
957  /// Get a setting data of the module.
958  fn handle_get_setting_item(&self, id: String) -> thrift::Result<common_type_s_d_k_data_types::SettingItem>;
959  /// Get a list of setting data of the module.
960  fn handle_get_setting_items(&self, category: String, include_children: bool) -> thrift::Result<Vec<common_type_s_d_k_data_types::SettingItem>>;
961  /// Search a set of settings using a json format string.
962  /// According to the format of json string your write, searching can be separated to 3 types: simple search, lambda search and complicated search. And each of they can be combined with the other.
963  fn handle_search_setting_items(&self, filter_json: String) -> thrift::Result<BTreeMap<String, setting_system_s_d_k_data_types::SettingSearchResult>>;
964  /// Get settings and categories in a tree
965  fn handle_get_category_node(&self) -> thrift::Result<setting_system_s_d_k_data_types::SettingTree>;
966  /// Get child nodes of specified setting item or setting category
967  fn handle_get_child_node(&self, parent: String, node_type: setting_system_s_d_k_data_types::NodeType, param: String, tags: Vec<String>) -> thrift::Result<setting_system_s_d_k_data_types::NodeList>;
968  /// Set the specified setting's "dataValue" with the new value
969  fn handle_set_setting_item(&self, key: String, val: String) -> thrift::Result<bool>;
970  /// Set a set of settings' "dataValue"
971  fn handle_set_setting_items(&self, key_values: BTreeMap<String, String>) -> thrift::Result<i32>;
972  /// Restore a module setting to default
973  fn handle_restore_default(&self, module_name: String, category: String) -> thrift::Result<bool>;
974  /// @RestoreUserDefault_Summary
975  fn handle_restore_user_default(&self, user_id: String, module_name: String, category: String) -> thrift::Result<bool>;
976  /// Update the module settings from an older version to the latest one
977  fn handle_update_module_version(&self, module_name: String) -> thrift::Result<bool>;
978  /// @SetUserAppData_Summary
979  fn handle_set_user_app_data(&self, user_id: String, category: String, setting_items: BTreeMap<String, common_type_s_d_k_data_types::SettingValue>) -> thrift::Result<i32>;
980  /// @GetUserAppData_Summary
981  fn handle_get_user_app_data(&self, user_id: String, category: String, setting_keys: Vec<String>) -> thrift::Result<common_type_s_d_k_data_types::AppData>;
982  /// @RemoveUserAppData_Summary
983  fn handle_remove_user_app_data(&self, user_id: String, category: String, setting_keys: Vec<String>) -> thrift::Result<i32>;
984  /// Notify layer0 that a setting item has specific event
985  fn handle_setting_item_notify(&self, key: String, contents: setting_system_s_d_k_data_types::JSON) -> thrift::Result<bool>;
986  fn handle_get_network_adapter_settings(&self) -> thrift::Result<setting_system_s_d_k_data_types::NetworkSettings>;
987  fn handle_get_lan_network_name(&self) -> thrift::Result<String>;
988  fn handle_set_network_settings(&self, is_w_lan: bool, enable_d_h_c_p: bool, ip_address: String, sub_mask: String, gateway: String, main_d_n_s: String, sub_d_n_s: String) -> thrift::Result<bool>;
989  fn handle_set_network_proxy(&self, proxy_server: String, proxy_port: String) -> thrift::Result<bool>;
990  fn handle_connect_to_wifi(&self, profile_name: String, key: String) -> thrift::Result<bool>;
991  fn handle_connect_to_appointed_wifi(&self, profile_name: String, auth: String, ciper: String, key_type: String, key: String) -> thrift::Result<bool>;
992  fn handle_get_network_settings(&self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkSettings>;
993  fn handle_get_network_status(&self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkStatus>;
994  fn handle_ruyi_test_network(&self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkTestResult>;
995  fn handle_ruyi_start_network_speed_test(&self, userindex: i32) -> thrift::Result<bool>;
996  fn handle_ruyi_stop_network_speed_test(&self, userindex: i32) -> thrift::Result<bool>;
997  fn handle_get_available_wifi(&self) -> thrift::Result<Vec<setting_system_s_d_k_data_types::WifiEntity>>;
998  fn handle_disconnect_wifi(&self) -> thrift::Result<bool>;
999  fn handle_discover_bluetooth_device(&self) -> thrift::Result<bool>;
1000  fn handle_connect_bluetooth_device(&self, device_name: String, device_address: String) -> thrift::Result<bool>;
1001  fn handle_disconnect_bluetooth_device(&self, device_name: String, device_address: String) -> thrift::Result<bool>;
1002  fn handle_remove_bluetooth_device(&self, device_name: String, device_address: String) -> thrift::Result<bool>;
1003}
1004
1005pub struct SettingSystemServiceSyncProcessor<H: SettingSystemServiceSyncHandler> {
1006  handler: H,
1007}
1008
1009impl <H: SettingSystemServiceSyncHandler> SettingSystemServiceSyncProcessor<H> {
1010  pub fn new(handler: H) -> SettingSystemServiceSyncProcessor<H> {
1011    SettingSystemServiceSyncProcessor {
1012      handler,
1013    }
1014  }
1015  fn process_get_setting_item(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1016    TSettingSystemServiceProcessFunctions::process_get_setting_item(&self.handler, incoming_sequence_number, i_prot, o_prot)
1017  }
1018  fn process_get_setting_items(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1019    TSettingSystemServiceProcessFunctions::process_get_setting_items(&self.handler, incoming_sequence_number, i_prot, o_prot)
1020  }
1021  fn process_search_setting_items(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1022    TSettingSystemServiceProcessFunctions::process_search_setting_items(&self.handler, incoming_sequence_number, i_prot, o_prot)
1023  }
1024  fn process_get_category_node(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1025    TSettingSystemServiceProcessFunctions::process_get_category_node(&self.handler, incoming_sequence_number, i_prot, o_prot)
1026  }
1027  fn process_get_child_node(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1028    TSettingSystemServiceProcessFunctions::process_get_child_node(&self.handler, incoming_sequence_number, i_prot, o_prot)
1029  }
1030  fn process_set_setting_item(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1031    TSettingSystemServiceProcessFunctions::process_set_setting_item(&self.handler, incoming_sequence_number, i_prot, o_prot)
1032  }
1033  fn process_set_setting_items(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1034    TSettingSystemServiceProcessFunctions::process_set_setting_items(&self.handler, incoming_sequence_number, i_prot, o_prot)
1035  }
1036  fn process_restore_default(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1037    TSettingSystemServiceProcessFunctions::process_restore_default(&self.handler, incoming_sequence_number, i_prot, o_prot)
1038  }
1039  fn process_restore_user_default(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1040    TSettingSystemServiceProcessFunctions::process_restore_user_default(&self.handler, incoming_sequence_number, i_prot, o_prot)
1041  }
1042  fn process_update_module_version(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1043    TSettingSystemServiceProcessFunctions::process_update_module_version(&self.handler, incoming_sequence_number, i_prot, o_prot)
1044  }
1045  fn process_set_user_app_data(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1046    TSettingSystemServiceProcessFunctions::process_set_user_app_data(&self.handler, incoming_sequence_number, i_prot, o_prot)
1047  }
1048  fn process_get_user_app_data(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1049    TSettingSystemServiceProcessFunctions::process_get_user_app_data(&self.handler, incoming_sequence_number, i_prot, o_prot)
1050  }
1051  fn process_remove_user_app_data(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1052    TSettingSystemServiceProcessFunctions::process_remove_user_app_data(&self.handler, incoming_sequence_number, i_prot, o_prot)
1053  }
1054  fn process_setting_item_notify(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1055    TSettingSystemServiceProcessFunctions::process_setting_item_notify(&self.handler, incoming_sequence_number, i_prot, o_prot)
1056  }
1057  fn process_get_network_adapter_settings(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1058    TSettingSystemServiceProcessFunctions::process_get_network_adapter_settings(&self.handler, incoming_sequence_number, i_prot, o_prot)
1059  }
1060  fn process_get_lan_network_name(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1061    TSettingSystemServiceProcessFunctions::process_get_lan_network_name(&self.handler, incoming_sequence_number, i_prot, o_prot)
1062  }
1063  fn process_set_network_settings(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1064    TSettingSystemServiceProcessFunctions::process_set_network_settings(&self.handler, incoming_sequence_number, i_prot, o_prot)
1065  }
1066  fn process_set_network_proxy(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1067    TSettingSystemServiceProcessFunctions::process_set_network_proxy(&self.handler, incoming_sequence_number, i_prot, o_prot)
1068  }
1069  fn process_connect_to_wifi(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1070    TSettingSystemServiceProcessFunctions::process_connect_to_wifi(&self.handler, incoming_sequence_number, i_prot, o_prot)
1071  }
1072  fn process_connect_to_appointed_wifi(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1073    TSettingSystemServiceProcessFunctions::process_connect_to_appointed_wifi(&self.handler, incoming_sequence_number, i_prot, o_prot)
1074  }
1075  fn process_get_network_settings(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1076    TSettingSystemServiceProcessFunctions::process_get_network_settings(&self.handler, incoming_sequence_number, i_prot, o_prot)
1077  }
1078  fn process_get_network_status(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1079    TSettingSystemServiceProcessFunctions::process_get_network_status(&self.handler, incoming_sequence_number, i_prot, o_prot)
1080  }
1081  fn process_ruyi_test_network(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1082    TSettingSystemServiceProcessFunctions::process_ruyi_test_network(&self.handler, incoming_sequence_number, i_prot, o_prot)
1083  }
1084  fn process_ruyi_start_network_speed_test(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1085    TSettingSystemServiceProcessFunctions::process_ruyi_start_network_speed_test(&self.handler, incoming_sequence_number, i_prot, o_prot)
1086  }
1087  fn process_ruyi_stop_network_speed_test(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1088    TSettingSystemServiceProcessFunctions::process_ruyi_stop_network_speed_test(&self.handler, incoming_sequence_number, i_prot, o_prot)
1089  }
1090  fn process_get_available_wifi(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1091    TSettingSystemServiceProcessFunctions::process_get_available_wifi(&self.handler, incoming_sequence_number, i_prot, o_prot)
1092  }
1093  fn process_disconnect_wifi(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1094    TSettingSystemServiceProcessFunctions::process_disconnect_wifi(&self.handler, incoming_sequence_number, i_prot, o_prot)
1095  }
1096  fn process_discover_bluetooth_device(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1097    TSettingSystemServiceProcessFunctions::process_discover_bluetooth_device(&self.handler, incoming_sequence_number, i_prot, o_prot)
1098  }
1099  fn process_connect_bluetooth_device(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1100    TSettingSystemServiceProcessFunctions::process_connect_bluetooth_device(&self.handler, incoming_sequence_number, i_prot, o_prot)
1101  }
1102  fn process_disconnect_bluetooth_device(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1103    TSettingSystemServiceProcessFunctions::process_disconnect_bluetooth_device(&self.handler, incoming_sequence_number, i_prot, o_prot)
1104  }
1105  fn process_remove_bluetooth_device(&self, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1106    TSettingSystemServiceProcessFunctions::process_remove_bluetooth_device(&self.handler, incoming_sequence_number, i_prot, o_prot)
1107  }
1108}
1109
1110pub struct TSettingSystemServiceProcessFunctions;
1111
1112impl TSettingSystemServiceProcessFunctions {
1113  pub fn process_get_setting_item<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1114    let args = SettingSystemServiceGetSettingItemArgs::read_from_in_protocol(i_prot)?;
1115    match handler.handle_get_setting_item(args.id) {
1116      Ok(handler_return) => {
1117        let message_ident = TMessageIdentifier::new("GetSettingItem", TMessageType::Reply, incoming_sequence_number);
1118        o_prot.write_message_begin(&message_ident)?;
1119        let ret = SettingSystemServiceGetSettingItemResult { result_value: Some(handler_return), error1: None };
1120        ret.write_to_out_protocol(o_prot)?;
1121        o_prot.write_message_end()?;
1122        o_prot.flush()
1123      },
1124      Err(e) => {
1125        match e {
1126          thrift::Error::User(usr_err) => {
1127            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1128              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1129              let ret_err = SettingSystemServiceGetSettingItemResult{ result_value: None, error1: Some(*err) };
1130              let message_ident = TMessageIdentifier::new("GetSettingItem", TMessageType::Reply, incoming_sequence_number);
1131              o_prot.write_message_begin(&message_ident)?;
1132              ret_err.write_to_out_protocol(o_prot)?;
1133              o_prot.write_message_end()?;
1134              o_prot.flush()
1135            } else {
1136              let ret_err = {
1137                ApplicationError::new(
1138                  ApplicationErrorKind::Unknown,
1139                  usr_err.description()
1140                )
1141              };
1142              let message_ident = TMessageIdentifier::new("GetSettingItem", TMessageType::Exception, incoming_sequence_number);
1143              o_prot.write_message_begin(&message_ident)?;
1144              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1145              o_prot.write_message_end()?;
1146              o_prot.flush()
1147            }
1148          },
1149          thrift::Error::Application(app_err) => {
1150            let message_ident = TMessageIdentifier::new("GetSettingItem", TMessageType::Exception, incoming_sequence_number);
1151            o_prot.write_message_begin(&message_ident)?;
1152            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1153            o_prot.write_message_end()?;
1154            o_prot.flush()
1155          },
1156          _ => {
1157            let ret_err = {
1158              ApplicationError::new(
1159                ApplicationErrorKind::Unknown,
1160                e.description()
1161              )
1162            };
1163            let message_ident = TMessageIdentifier::new("GetSettingItem", TMessageType::Exception, incoming_sequence_number);
1164            o_prot.write_message_begin(&message_ident)?;
1165            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1166            o_prot.write_message_end()?;
1167            o_prot.flush()
1168          },
1169        }
1170      },
1171    }
1172  }
1173  pub fn process_get_setting_items<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1174    let args = SettingSystemServiceGetSettingItemsArgs::read_from_in_protocol(i_prot)?;
1175    match handler.handle_get_setting_items(args.category, args.include_children) {
1176      Ok(handler_return) => {
1177        let message_ident = TMessageIdentifier::new("GetSettingItems", TMessageType::Reply, incoming_sequence_number);
1178        o_prot.write_message_begin(&message_ident)?;
1179        let ret = SettingSystemServiceGetSettingItemsResult { result_value: Some(handler_return), error1: None };
1180        ret.write_to_out_protocol(o_prot)?;
1181        o_prot.write_message_end()?;
1182        o_prot.flush()
1183      },
1184      Err(e) => {
1185        match e {
1186          thrift::Error::User(usr_err) => {
1187            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1188              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1189              let ret_err = SettingSystemServiceGetSettingItemsResult{ result_value: None, error1: Some(*err) };
1190              let message_ident = TMessageIdentifier::new("GetSettingItems", TMessageType::Reply, incoming_sequence_number);
1191              o_prot.write_message_begin(&message_ident)?;
1192              ret_err.write_to_out_protocol(o_prot)?;
1193              o_prot.write_message_end()?;
1194              o_prot.flush()
1195            } else {
1196              let ret_err = {
1197                ApplicationError::new(
1198                  ApplicationErrorKind::Unknown,
1199                  usr_err.description()
1200                )
1201              };
1202              let message_ident = TMessageIdentifier::new("GetSettingItems", TMessageType::Exception, incoming_sequence_number);
1203              o_prot.write_message_begin(&message_ident)?;
1204              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1205              o_prot.write_message_end()?;
1206              o_prot.flush()
1207            }
1208          },
1209          thrift::Error::Application(app_err) => {
1210            let message_ident = TMessageIdentifier::new("GetSettingItems", TMessageType::Exception, incoming_sequence_number);
1211            o_prot.write_message_begin(&message_ident)?;
1212            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1213            o_prot.write_message_end()?;
1214            o_prot.flush()
1215          },
1216          _ => {
1217            let ret_err = {
1218              ApplicationError::new(
1219                ApplicationErrorKind::Unknown,
1220                e.description()
1221              )
1222            };
1223            let message_ident = TMessageIdentifier::new("GetSettingItems", TMessageType::Exception, incoming_sequence_number);
1224            o_prot.write_message_begin(&message_ident)?;
1225            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1226            o_prot.write_message_end()?;
1227            o_prot.flush()
1228          },
1229        }
1230      },
1231    }
1232  }
1233  pub fn process_search_setting_items<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1234    let args = SettingSystemServiceSearchSettingItemsArgs::read_from_in_protocol(i_prot)?;
1235    match handler.handle_search_setting_items(args.filter_json) {
1236      Ok(handler_return) => {
1237        let message_ident = TMessageIdentifier::new("SearchSettingItems", TMessageType::Reply, incoming_sequence_number);
1238        o_prot.write_message_begin(&message_ident)?;
1239        let ret = SettingSystemServiceSearchSettingItemsResult { result_value: Some(handler_return), error1: None };
1240        ret.write_to_out_protocol(o_prot)?;
1241        o_prot.write_message_end()?;
1242        o_prot.flush()
1243      },
1244      Err(e) => {
1245        match e {
1246          thrift::Error::User(usr_err) => {
1247            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1248              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1249              let ret_err = SettingSystemServiceSearchSettingItemsResult{ result_value: None, error1: Some(*err) };
1250              let message_ident = TMessageIdentifier::new("SearchSettingItems", TMessageType::Reply, incoming_sequence_number);
1251              o_prot.write_message_begin(&message_ident)?;
1252              ret_err.write_to_out_protocol(o_prot)?;
1253              o_prot.write_message_end()?;
1254              o_prot.flush()
1255            } else {
1256              let ret_err = {
1257                ApplicationError::new(
1258                  ApplicationErrorKind::Unknown,
1259                  usr_err.description()
1260                )
1261              };
1262              let message_ident = TMessageIdentifier::new("SearchSettingItems", TMessageType::Exception, incoming_sequence_number);
1263              o_prot.write_message_begin(&message_ident)?;
1264              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1265              o_prot.write_message_end()?;
1266              o_prot.flush()
1267            }
1268          },
1269          thrift::Error::Application(app_err) => {
1270            let message_ident = TMessageIdentifier::new("SearchSettingItems", TMessageType::Exception, incoming_sequence_number);
1271            o_prot.write_message_begin(&message_ident)?;
1272            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1273            o_prot.write_message_end()?;
1274            o_prot.flush()
1275          },
1276          _ => {
1277            let ret_err = {
1278              ApplicationError::new(
1279                ApplicationErrorKind::Unknown,
1280                e.description()
1281              )
1282            };
1283            let message_ident = TMessageIdentifier::new("SearchSettingItems", TMessageType::Exception, incoming_sequence_number);
1284            o_prot.write_message_begin(&message_ident)?;
1285            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1286            o_prot.write_message_end()?;
1287            o_prot.flush()
1288          },
1289        }
1290      },
1291    }
1292  }
1293  pub fn process_get_category_node<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1294    let _ = SettingSystemServiceGetCategoryNodeArgs::read_from_in_protocol(i_prot)?;
1295    match handler.handle_get_category_node() {
1296      Ok(handler_return) => {
1297        let message_ident = TMessageIdentifier::new("GetCategoryNode", TMessageType::Reply, incoming_sequence_number);
1298        o_prot.write_message_begin(&message_ident)?;
1299        let ret = SettingSystemServiceGetCategoryNodeResult { result_value: Some(handler_return), error1: None };
1300        ret.write_to_out_protocol(o_prot)?;
1301        o_prot.write_message_end()?;
1302        o_prot.flush()
1303      },
1304      Err(e) => {
1305        match e {
1306          thrift::Error::User(usr_err) => {
1307            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1308              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1309              let ret_err = SettingSystemServiceGetCategoryNodeResult{ result_value: None, error1: Some(*err) };
1310              let message_ident = TMessageIdentifier::new("GetCategoryNode", TMessageType::Reply, incoming_sequence_number);
1311              o_prot.write_message_begin(&message_ident)?;
1312              ret_err.write_to_out_protocol(o_prot)?;
1313              o_prot.write_message_end()?;
1314              o_prot.flush()
1315            } else {
1316              let ret_err = {
1317                ApplicationError::new(
1318                  ApplicationErrorKind::Unknown,
1319                  usr_err.description()
1320                )
1321              };
1322              let message_ident = TMessageIdentifier::new("GetCategoryNode", TMessageType::Exception, incoming_sequence_number);
1323              o_prot.write_message_begin(&message_ident)?;
1324              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1325              o_prot.write_message_end()?;
1326              o_prot.flush()
1327            }
1328          },
1329          thrift::Error::Application(app_err) => {
1330            let message_ident = TMessageIdentifier::new("GetCategoryNode", TMessageType::Exception, incoming_sequence_number);
1331            o_prot.write_message_begin(&message_ident)?;
1332            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1333            o_prot.write_message_end()?;
1334            o_prot.flush()
1335          },
1336          _ => {
1337            let ret_err = {
1338              ApplicationError::new(
1339                ApplicationErrorKind::Unknown,
1340                e.description()
1341              )
1342            };
1343            let message_ident = TMessageIdentifier::new("GetCategoryNode", TMessageType::Exception, incoming_sequence_number);
1344            o_prot.write_message_begin(&message_ident)?;
1345            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1346            o_prot.write_message_end()?;
1347            o_prot.flush()
1348          },
1349        }
1350      },
1351    }
1352  }
1353  pub fn process_get_child_node<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1354    let args = SettingSystemServiceGetChildNodeArgs::read_from_in_protocol(i_prot)?;
1355    match handler.handle_get_child_node(args.parent, args.node_type, args.param, args.tags) {
1356      Ok(handler_return) => {
1357        let message_ident = TMessageIdentifier::new("GetChildNode", TMessageType::Reply, incoming_sequence_number);
1358        o_prot.write_message_begin(&message_ident)?;
1359        let ret = SettingSystemServiceGetChildNodeResult { result_value: Some(handler_return), error1: None };
1360        ret.write_to_out_protocol(o_prot)?;
1361        o_prot.write_message_end()?;
1362        o_prot.flush()
1363      },
1364      Err(e) => {
1365        match e {
1366          thrift::Error::User(usr_err) => {
1367            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1368              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1369              let ret_err = SettingSystemServiceGetChildNodeResult{ result_value: None, error1: Some(*err) };
1370              let message_ident = TMessageIdentifier::new("GetChildNode", TMessageType::Reply, incoming_sequence_number);
1371              o_prot.write_message_begin(&message_ident)?;
1372              ret_err.write_to_out_protocol(o_prot)?;
1373              o_prot.write_message_end()?;
1374              o_prot.flush()
1375            } else {
1376              let ret_err = {
1377                ApplicationError::new(
1378                  ApplicationErrorKind::Unknown,
1379                  usr_err.description()
1380                )
1381              };
1382              let message_ident = TMessageIdentifier::new("GetChildNode", TMessageType::Exception, incoming_sequence_number);
1383              o_prot.write_message_begin(&message_ident)?;
1384              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1385              o_prot.write_message_end()?;
1386              o_prot.flush()
1387            }
1388          },
1389          thrift::Error::Application(app_err) => {
1390            let message_ident = TMessageIdentifier::new("GetChildNode", TMessageType::Exception, incoming_sequence_number);
1391            o_prot.write_message_begin(&message_ident)?;
1392            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1393            o_prot.write_message_end()?;
1394            o_prot.flush()
1395          },
1396          _ => {
1397            let ret_err = {
1398              ApplicationError::new(
1399                ApplicationErrorKind::Unknown,
1400                e.description()
1401              )
1402            };
1403            let message_ident = TMessageIdentifier::new("GetChildNode", TMessageType::Exception, incoming_sequence_number);
1404            o_prot.write_message_begin(&message_ident)?;
1405            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1406            o_prot.write_message_end()?;
1407            o_prot.flush()
1408          },
1409        }
1410      },
1411    }
1412  }
1413  pub fn process_set_setting_item<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1414    let args = SettingSystemServiceSetSettingItemArgs::read_from_in_protocol(i_prot)?;
1415    match handler.handle_set_setting_item(args.key, args.val) {
1416      Ok(handler_return) => {
1417        let message_ident = TMessageIdentifier::new("SetSettingItem", TMessageType::Reply, incoming_sequence_number);
1418        o_prot.write_message_begin(&message_ident)?;
1419        let ret = SettingSystemServiceSetSettingItemResult { result_value: Some(handler_return), error1: None };
1420        ret.write_to_out_protocol(o_prot)?;
1421        o_prot.write_message_end()?;
1422        o_prot.flush()
1423      },
1424      Err(e) => {
1425        match e {
1426          thrift::Error::User(usr_err) => {
1427            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1428              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1429              let ret_err = SettingSystemServiceSetSettingItemResult{ result_value: None, error1: Some(*err) };
1430              let message_ident = TMessageIdentifier::new("SetSettingItem", TMessageType::Reply, incoming_sequence_number);
1431              o_prot.write_message_begin(&message_ident)?;
1432              ret_err.write_to_out_protocol(o_prot)?;
1433              o_prot.write_message_end()?;
1434              o_prot.flush()
1435            } else {
1436              let ret_err = {
1437                ApplicationError::new(
1438                  ApplicationErrorKind::Unknown,
1439                  usr_err.description()
1440                )
1441              };
1442              let message_ident = TMessageIdentifier::new("SetSettingItem", TMessageType::Exception, incoming_sequence_number);
1443              o_prot.write_message_begin(&message_ident)?;
1444              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1445              o_prot.write_message_end()?;
1446              o_prot.flush()
1447            }
1448          },
1449          thrift::Error::Application(app_err) => {
1450            let message_ident = TMessageIdentifier::new("SetSettingItem", TMessageType::Exception, incoming_sequence_number);
1451            o_prot.write_message_begin(&message_ident)?;
1452            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1453            o_prot.write_message_end()?;
1454            o_prot.flush()
1455          },
1456          _ => {
1457            let ret_err = {
1458              ApplicationError::new(
1459                ApplicationErrorKind::Unknown,
1460                e.description()
1461              )
1462            };
1463            let message_ident = TMessageIdentifier::new("SetSettingItem", TMessageType::Exception, incoming_sequence_number);
1464            o_prot.write_message_begin(&message_ident)?;
1465            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1466            o_prot.write_message_end()?;
1467            o_prot.flush()
1468          },
1469        }
1470      },
1471    }
1472  }
1473  pub fn process_set_setting_items<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1474    let args = SettingSystemServiceSetSettingItemsArgs::read_from_in_protocol(i_prot)?;
1475    match handler.handle_set_setting_items(args.key_values) {
1476      Ok(handler_return) => {
1477        let message_ident = TMessageIdentifier::new("SetSettingItems", TMessageType::Reply, incoming_sequence_number);
1478        o_prot.write_message_begin(&message_ident)?;
1479        let ret = SettingSystemServiceSetSettingItemsResult { result_value: Some(handler_return), error1: None };
1480        ret.write_to_out_protocol(o_prot)?;
1481        o_prot.write_message_end()?;
1482        o_prot.flush()
1483      },
1484      Err(e) => {
1485        match e {
1486          thrift::Error::User(usr_err) => {
1487            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1488              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1489              let ret_err = SettingSystemServiceSetSettingItemsResult{ result_value: None, error1: Some(*err) };
1490              let message_ident = TMessageIdentifier::new("SetSettingItems", TMessageType::Reply, incoming_sequence_number);
1491              o_prot.write_message_begin(&message_ident)?;
1492              ret_err.write_to_out_protocol(o_prot)?;
1493              o_prot.write_message_end()?;
1494              o_prot.flush()
1495            } else {
1496              let ret_err = {
1497                ApplicationError::new(
1498                  ApplicationErrorKind::Unknown,
1499                  usr_err.description()
1500                )
1501              };
1502              let message_ident = TMessageIdentifier::new("SetSettingItems", TMessageType::Exception, incoming_sequence_number);
1503              o_prot.write_message_begin(&message_ident)?;
1504              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1505              o_prot.write_message_end()?;
1506              o_prot.flush()
1507            }
1508          },
1509          thrift::Error::Application(app_err) => {
1510            let message_ident = TMessageIdentifier::new("SetSettingItems", TMessageType::Exception, incoming_sequence_number);
1511            o_prot.write_message_begin(&message_ident)?;
1512            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1513            o_prot.write_message_end()?;
1514            o_prot.flush()
1515          },
1516          _ => {
1517            let ret_err = {
1518              ApplicationError::new(
1519                ApplicationErrorKind::Unknown,
1520                e.description()
1521              )
1522            };
1523            let message_ident = TMessageIdentifier::new("SetSettingItems", TMessageType::Exception, incoming_sequence_number);
1524            o_prot.write_message_begin(&message_ident)?;
1525            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1526            o_prot.write_message_end()?;
1527            o_prot.flush()
1528          },
1529        }
1530      },
1531    }
1532  }
1533  pub fn process_restore_default<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1534    let args = SettingSystemServiceRestoreDefaultArgs::read_from_in_protocol(i_prot)?;
1535    match handler.handle_restore_default(args.module_name, args.category) {
1536      Ok(handler_return) => {
1537        let message_ident = TMessageIdentifier::new("RestoreDefault", TMessageType::Reply, incoming_sequence_number);
1538        o_prot.write_message_begin(&message_ident)?;
1539        let ret = SettingSystemServiceRestoreDefaultResult { result_value: Some(handler_return), error1: None };
1540        ret.write_to_out_protocol(o_prot)?;
1541        o_prot.write_message_end()?;
1542        o_prot.flush()
1543      },
1544      Err(e) => {
1545        match e {
1546          thrift::Error::User(usr_err) => {
1547            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1548              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1549              let ret_err = SettingSystemServiceRestoreDefaultResult{ result_value: None, error1: Some(*err) };
1550              let message_ident = TMessageIdentifier::new("RestoreDefault", TMessageType::Reply, incoming_sequence_number);
1551              o_prot.write_message_begin(&message_ident)?;
1552              ret_err.write_to_out_protocol(o_prot)?;
1553              o_prot.write_message_end()?;
1554              o_prot.flush()
1555            } else {
1556              let ret_err = {
1557                ApplicationError::new(
1558                  ApplicationErrorKind::Unknown,
1559                  usr_err.description()
1560                )
1561              };
1562              let message_ident = TMessageIdentifier::new("RestoreDefault", TMessageType::Exception, incoming_sequence_number);
1563              o_prot.write_message_begin(&message_ident)?;
1564              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1565              o_prot.write_message_end()?;
1566              o_prot.flush()
1567            }
1568          },
1569          thrift::Error::Application(app_err) => {
1570            let message_ident = TMessageIdentifier::new("RestoreDefault", TMessageType::Exception, incoming_sequence_number);
1571            o_prot.write_message_begin(&message_ident)?;
1572            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1573            o_prot.write_message_end()?;
1574            o_prot.flush()
1575          },
1576          _ => {
1577            let ret_err = {
1578              ApplicationError::new(
1579                ApplicationErrorKind::Unknown,
1580                e.description()
1581              )
1582            };
1583            let message_ident = TMessageIdentifier::new("RestoreDefault", TMessageType::Exception, incoming_sequence_number);
1584            o_prot.write_message_begin(&message_ident)?;
1585            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1586            o_prot.write_message_end()?;
1587            o_prot.flush()
1588          },
1589        }
1590      },
1591    }
1592  }
1593  pub fn process_restore_user_default<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1594    let args = SettingSystemServiceRestoreUserDefaultArgs::read_from_in_protocol(i_prot)?;
1595    match handler.handle_restore_user_default(args.user_id, args.module_name, args.category) {
1596      Ok(handler_return) => {
1597        let message_ident = TMessageIdentifier::new("RestoreUserDefault", TMessageType::Reply, incoming_sequence_number);
1598        o_prot.write_message_begin(&message_ident)?;
1599        let ret = SettingSystemServiceRestoreUserDefaultResult { result_value: Some(handler_return), error1: None };
1600        ret.write_to_out_protocol(o_prot)?;
1601        o_prot.write_message_end()?;
1602        o_prot.flush()
1603      },
1604      Err(e) => {
1605        match e {
1606          thrift::Error::User(usr_err) => {
1607            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1608              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1609              let ret_err = SettingSystemServiceRestoreUserDefaultResult{ result_value: None, error1: Some(*err) };
1610              let message_ident = TMessageIdentifier::new("RestoreUserDefault", TMessageType::Reply, incoming_sequence_number);
1611              o_prot.write_message_begin(&message_ident)?;
1612              ret_err.write_to_out_protocol(o_prot)?;
1613              o_prot.write_message_end()?;
1614              o_prot.flush()
1615            } else {
1616              let ret_err = {
1617                ApplicationError::new(
1618                  ApplicationErrorKind::Unknown,
1619                  usr_err.description()
1620                )
1621              };
1622              let message_ident = TMessageIdentifier::new("RestoreUserDefault", TMessageType::Exception, incoming_sequence_number);
1623              o_prot.write_message_begin(&message_ident)?;
1624              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1625              o_prot.write_message_end()?;
1626              o_prot.flush()
1627            }
1628          },
1629          thrift::Error::Application(app_err) => {
1630            let message_ident = TMessageIdentifier::new("RestoreUserDefault", TMessageType::Exception, incoming_sequence_number);
1631            o_prot.write_message_begin(&message_ident)?;
1632            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1633            o_prot.write_message_end()?;
1634            o_prot.flush()
1635          },
1636          _ => {
1637            let ret_err = {
1638              ApplicationError::new(
1639                ApplicationErrorKind::Unknown,
1640                e.description()
1641              )
1642            };
1643            let message_ident = TMessageIdentifier::new("RestoreUserDefault", TMessageType::Exception, incoming_sequence_number);
1644            o_prot.write_message_begin(&message_ident)?;
1645            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1646            o_prot.write_message_end()?;
1647            o_prot.flush()
1648          },
1649        }
1650      },
1651    }
1652  }
1653  pub fn process_update_module_version<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1654    let args = SettingSystemServiceUpdateModuleVersionArgs::read_from_in_protocol(i_prot)?;
1655    match handler.handle_update_module_version(args.module_name) {
1656      Ok(handler_return) => {
1657        let message_ident = TMessageIdentifier::new("UpdateModuleVersion", TMessageType::Reply, incoming_sequence_number);
1658        o_prot.write_message_begin(&message_ident)?;
1659        let ret = SettingSystemServiceUpdateModuleVersionResult { result_value: Some(handler_return), error1: None };
1660        ret.write_to_out_protocol(o_prot)?;
1661        o_prot.write_message_end()?;
1662        o_prot.flush()
1663      },
1664      Err(e) => {
1665        match e {
1666          thrift::Error::User(usr_err) => {
1667            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1668              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1669              let ret_err = SettingSystemServiceUpdateModuleVersionResult{ result_value: None, error1: Some(*err) };
1670              let message_ident = TMessageIdentifier::new("UpdateModuleVersion", TMessageType::Reply, incoming_sequence_number);
1671              o_prot.write_message_begin(&message_ident)?;
1672              ret_err.write_to_out_protocol(o_prot)?;
1673              o_prot.write_message_end()?;
1674              o_prot.flush()
1675            } else {
1676              let ret_err = {
1677                ApplicationError::new(
1678                  ApplicationErrorKind::Unknown,
1679                  usr_err.description()
1680                )
1681              };
1682              let message_ident = TMessageIdentifier::new("UpdateModuleVersion", TMessageType::Exception, incoming_sequence_number);
1683              o_prot.write_message_begin(&message_ident)?;
1684              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1685              o_prot.write_message_end()?;
1686              o_prot.flush()
1687            }
1688          },
1689          thrift::Error::Application(app_err) => {
1690            let message_ident = TMessageIdentifier::new("UpdateModuleVersion", TMessageType::Exception, incoming_sequence_number);
1691            o_prot.write_message_begin(&message_ident)?;
1692            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1693            o_prot.write_message_end()?;
1694            o_prot.flush()
1695          },
1696          _ => {
1697            let ret_err = {
1698              ApplicationError::new(
1699                ApplicationErrorKind::Unknown,
1700                e.description()
1701              )
1702            };
1703            let message_ident = TMessageIdentifier::new("UpdateModuleVersion", TMessageType::Exception, incoming_sequence_number);
1704            o_prot.write_message_begin(&message_ident)?;
1705            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1706            o_prot.write_message_end()?;
1707            o_prot.flush()
1708          },
1709        }
1710      },
1711    }
1712  }
1713  pub fn process_set_user_app_data<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1714    let args = SettingSystemServiceSetUserAppDataArgs::read_from_in_protocol(i_prot)?;
1715    match handler.handle_set_user_app_data(args.user_id, args.category, args.setting_items) {
1716      Ok(handler_return) => {
1717        let message_ident = TMessageIdentifier::new("SetUserAppData", TMessageType::Reply, incoming_sequence_number);
1718        o_prot.write_message_begin(&message_ident)?;
1719        let ret = SettingSystemServiceSetUserAppDataResult { result_value: Some(handler_return), error1: None };
1720        ret.write_to_out_protocol(o_prot)?;
1721        o_prot.write_message_end()?;
1722        o_prot.flush()
1723      },
1724      Err(e) => {
1725        match e {
1726          thrift::Error::User(usr_err) => {
1727            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1728              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1729              let ret_err = SettingSystemServiceSetUserAppDataResult{ result_value: None, error1: Some(*err) };
1730              let message_ident = TMessageIdentifier::new("SetUserAppData", TMessageType::Reply, incoming_sequence_number);
1731              o_prot.write_message_begin(&message_ident)?;
1732              ret_err.write_to_out_protocol(o_prot)?;
1733              o_prot.write_message_end()?;
1734              o_prot.flush()
1735            } else {
1736              let ret_err = {
1737                ApplicationError::new(
1738                  ApplicationErrorKind::Unknown,
1739                  usr_err.description()
1740                )
1741              };
1742              let message_ident = TMessageIdentifier::new("SetUserAppData", TMessageType::Exception, incoming_sequence_number);
1743              o_prot.write_message_begin(&message_ident)?;
1744              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1745              o_prot.write_message_end()?;
1746              o_prot.flush()
1747            }
1748          },
1749          thrift::Error::Application(app_err) => {
1750            let message_ident = TMessageIdentifier::new("SetUserAppData", TMessageType::Exception, incoming_sequence_number);
1751            o_prot.write_message_begin(&message_ident)?;
1752            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1753            o_prot.write_message_end()?;
1754            o_prot.flush()
1755          },
1756          _ => {
1757            let ret_err = {
1758              ApplicationError::new(
1759                ApplicationErrorKind::Unknown,
1760                e.description()
1761              )
1762            };
1763            let message_ident = TMessageIdentifier::new("SetUserAppData", TMessageType::Exception, incoming_sequence_number);
1764            o_prot.write_message_begin(&message_ident)?;
1765            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1766            o_prot.write_message_end()?;
1767            o_prot.flush()
1768          },
1769        }
1770      },
1771    }
1772  }
1773  pub fn process_get_user_app_data<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1774    let args = SettingSystemServiceGetUserAppDataArgs::read_from_in_protocol(i_prot)?;
1775    match handler.handle_get_user_app_data(args.user_id, args.category, args.setting_keys) {
1776      Ok(handler_return) => {
1777        let message_ident = TMessageIdentifier::new("GetUserAppData", TMessageType::Reply, incoming_sequence_number);
1778        o_prot.write_message_begin(&message_ident)?;
1779        let ret = SettingSystemServiceGetUserAppDataResult { result_value: Some(handler_return), error1: None };
1780        ret.write_to_out_protocol(o_prot)?;
1781        o_prot.write_message_end()?;
1782        o_prot.flush()
1783      },
1784      Err(e) => {
1785        match e {
1786          thrift::Error::User(usr_err) => {
1787            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1788              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1789              let ret_err = SettingSystemServiceGetUserAppDataResult{ result_value: None, error1: Some(*err) };
1790              let message_ident = TMessageIdentifier::new("GetUserAppData", TMessageType::Reply, incoming_sequence_number);
1791              o_prot.write_message_begin(&message_ident)?;
1792              ret_err.write_to_out_protocol(o_prot)?;
1793              o_prot.write_message_end()?;
1794              o_prot.flush()
1795            } else {
1796              let ret_err = {
1797                ApplicationError::new(
1798                  ApplicationErrorKind::Unknown,
1799                  usr_err.description()
1800                )
1801              };
1802              let message_ident = TMessageIdentifier::new("GetUserAppData", TMessageType::Exception, incoming_sequence_number);
1803              o_prot.write_message_begin(&message_ident)?;
1804              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1805              o_prot.write_message_end()?;
1806              o_prot.flush()
1807            }
1808          },
1809          thrift::Error::Application(app_err) => {
1810            let message_ident = TMessageIdentifier::new("GetUserAppData", TMessageType::Exception, incoming_sequence_number);
1811            o_prot.write_message_begin(&message_ident)?;
1812            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1813            o_prot.write_message_end()?;
1814            o_prot.flush()
1815          },
1816          _ => {
1817            let ret_err = {
1818              ApplicationError::new(
1819                ApplicationErrorKind::Unknown,
1820                e.description()
1821              )
1822            };
1823            let message_ident = TMessageIdentifier::new("GetUserAppData", TMessageType::Exception, incoming_sequence_number);
1824            o_prot.write_message_begin(&message_ident)?;
1825            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1826            o_prot.write_message_end()?;
1827            o_prot.flush()
1828          },
1829        }
1830      },
1831    }
1832  }
1833  pub fn process_remove_user_app_data<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1834    let args = SettingSystemServiceRemoveUserAppDataArgs::read_from_in_protocol(i_prot)?;
1835    match handler.handle_remove_user_app_data(args.user_id, args.category, args.setting_keys) {
1836      Ok(handler_return) => {
1837        let message_ident = TMessageIdentifier::new("RemoveUserAppData", TMessageType::Reply, incoming_sequence_number);
1838        o_prot.write_message_begin(&message_ident)?;
1839        let ret = SettingSystemServiceRemoveUserAppDataResult { result_value: Some(handler_return), error1: None };
1840        ret.write_to_out_protocol(o_prot)?;
1841        o_prot.write_message_end()?;
1842        o_prot.flush()
1843      },
1844      Err(e) => {
1845        match e {
1846          thrift::Error::User(usr_err) => {
1847            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1848              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1849              let ret_err = SettingSystemServiceRemoveUserAppDataResult{ result_value: None, error1: Some(*err) };
1850              let message_ident = TMessageIdentifier::new("RemoveUserAppData", TMessageType::Reply, incoming_sequence_number);
1851              o_prot.write_message_begin(&message_ident)?;
1852              ret_err.write_to_out_protocol(o_prot)?;
1853              o_prot.write_message_end()?;
1854              o_prot.flush()
1855            } else {
1856              let ret_err = {
1857                ApplicationError::new(
1858                  ApplicationErrorKind::Unknown,
1859                  usr_err.description()
1860                )
1861              };
1862              let message_ident = TMessageIdentifier::new("RemoveUserAppData", TMessageType::Exception, incoming_sequence_number);
1863              o_prot.write_message_begin(&message_ident)?;
1864              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1865              o_prot.write_message_end()?;
1866              o_prot.flush()
1867            }
1868          },
1869          thrift::Error::Application(app_err) => {
1870            let message_ident = TMessageIdentifier::new("RemoveUserAppData", TMessageType::Exception, incoming_sequence_number);
1871            o_prot.write_message_begin(&message_ident)?;
1872            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1873            o_prot.write_message_end()?;
1874            o_prot.flush()
1875          },
1876          _ => {
1877            let ret_err = {
1878              ApplicationError::new(
1879                ApplicationErrorKind::Unknown,
1880                e.description()
1881              )
1882            };
1883            let message_ident = TMessageIdentifier::new("RemoveUserAppData", TMessageType::Exception, incoming_sequence_number);
1884            o_prot.write_message_begin(&message_ident)?;
1885            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1886            o_prot.write_message_end()?;
1887            o_prot.flush()
1888          },
1889        }
1890      },
1891    }
1892  }
1893  pub fn process_setting_item_notify<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1894    let args = SettingSystemServiceSettingItemNotifyArgs::read_from_in_protocol(i_prot)?;
1895    match handler.handle_setting_item_notify(args.key, args.contents) {
1896      Ok(handler_return) => {
1897        let message_ident = TMessageIdentifier::new("SettingItemNotify", TMessageType::Reply, incoming_sequence_number);
1898        o_prot.write_message_begin(&message_ident)?;
1899        let ret = SettingSystemServiceSettingItemNotifyResult { result_value: Some(handler_return), error1: None };
1900        ret.write_to_out_protocol(o_prot)?;
1901        o_prot.write_message_end()?;
1902        o_prot.flush()
1903      },
1904      Err(e) => {
1905        match e {
1906          thrift::Error::User(usr_err) => {
1907            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
1908              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
1909              let ret_err = SettingSystemServiceSettingItemNotifyResult{ result_value: None, error1: Some(*err) };
1910              let message_ident = TMessageIdentifier::new("SettingItemNotify", TMessageType::Reply, incoming_sequence_number);
1911              o_prot.write_message_begin(&message_ident)?;
1912              ret_err.write_to_out_protocol(o_prot)?;
1913              o_prot.write_message_end()?;
1914              o_prot.flush()
1915            } else {
1916              let ret_err = {
1917                ApplicationError::new(
1918                  ApplicationErrorKind::Unknown,
1919                  usr_err.description()
1920                )
1921              };
1922              let message_ident = TMessageIdentifier::new("SettingItemNotify", TMessageType::Exception, incoming_sequence_number);
1923              o_prot.write_message_begin(&message_ident)?;
1924              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1925              o_prot.write_message_end()?;
1926              o_prot.flush()
1927            }
1928          },
1929          thrift::Error::Application(app_err) => {
1930            let message_ident = TMessageIdentifier::new("SettingItemNotify", TMessageType::Exception, incoming_sequence_number);
1931            o_prot.write_message_begin(&message_ident)?;
1932            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1933            o_prot.write_message_end()?;
1934            o_prot.flush()
1935          },
1936          _ => {
1937            let ret_err = {
1938              ApplicationError::new(
1939                ApplicationErrorKind::Unknown,
1940                e.description()
1941              )
1942            };
1943            let message_ident = TMessageIdentifier::new("SettingItemNotify", TMessageType::Exception, incoming_sequence_number);
1944            o_prot.write_message_begin(&message_ident)?;
1945            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1946            o_prot.write_message_end()?;
1947            o_prot.flush()
1948          },
1949        }
1950      },
1951    }
1952  }
1953  pub fn process_get_network_adapter_settings<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1954    let _ = SettingSystemServiceGetNetworkAdapterSettingsArgs::read_from_in_protocol(i_prot)?;
1955    match handler.handle_get_network_adapter_settings() {
1956      Ok(handler_return) => {
1957        let message_ident = TMessageIdentifier::new("GetNetworkAdapterSettings", TMessageType::Reply, incoming_sequence_number);
1958        o_prot.write_message_begin(&message_ident)?;
1959        let ret = SettingSystemServiceGetNetworkAdapterSettingsResult { result_value: Some(handler_return) };
1960        ret.write_to_out_protocol(o_prot)?;
1961        o_prot.write_message_end()?;
1962        o_prot.flush()
1963      },
1964      Err(e) => {
1965        match e {
1966          thrift::Error::Application(app_err) => {
1967            let message_ident = TMessageIdentifier::new("GetNetworkAdapterSettings", TMessageType::Exception, incoming_sequence_number);
1968            o_prot.write_message_begin(&message_ident)?;
1969            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
1970            o_prot.write_message_end()?;
1971            o_prot.flush()
1972          },
1973          _ => {
1974            let ret_err = {
1975              ApplicationError::new(
1976                ApplicationErrorKind::Unknown,
1977                e.description()
1978              )
1979            };
1980            let message_ident = TMessageIdentifier::new("GetNetworkAdapterSettings", TMessageType::Exception, incoming_sequence_number);
1981            o_prot.write_message_begin(&message_ident)?;
1982            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
1983            o_prot.write_message_end()?;
1984            o_prot.flush()
1985          },
1986        }
1987      },
1988    }
1989  }
1990  pub fn process_get_lan_network_name<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
1991    let _ = SettingSystemServiceGetLanNetworkNameArgs::read_from_in_protocol(i_prot)?;
1992    match handler.handle_get_lan_network_name() {
1993      Ok(handler_return) => {
1994        let message_ident = TMessageIdentifier::new("GetLanNetworkName", TMessageType::Reply, incoming_sequence_number);
1995        o_prot.write_message_begin(&message_ident)?;
1996        let ret = SettingSystemServiceGetLanNetworkNameResult { result_value: Some(handler_return) };
1997        ret.write_to_out_protocol(o_prot)?;
1998        o_prot.write_message_end()?;
1999        o_prot.flush()
2000      },
2001      Err(e) => {
2002        match e {
2003          thrift::Error::Application(app_err) => {
2004            let message_ident = TMessageIdentifier::new("GetLanNetworkName", TMessageType::Exception, incoming_sequence_number);
2005            o_prot.write_message_begin(&message_ident)?;
2006            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2007            o_prot.write_message_end()?;
2008            o_prot.flush()
2009          },
2010          _ => {
2011            let ret_err = {
2012              ApplicationError::new(
2013                ApplicationErrorKind::Unknown,
2014                e.description()
2015              )
2016            };
2017            let message_ident = TMessageIdentifier::new("GetLanNetworkName", TMessageType::Exception, incoming_sequence_number);
2018            o_prot.write_message_begin(&message_ident)?;
2019            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2020            o_prot.write_message_end()?;
2021            o_prot.flush()
2022          },
2023        }
2024      },
2025    }
2026  }
2027  pub fn process_set_network_settings<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2028    let args = SettingSystemServiceSetNetworkSettingsArgs::read_from_in_protocol(i_prot)?;
2029    match handler.handle_set_network_settings(args.is_w_lan, args.enable_d_h_c_p, args.ip_address, args.sub_mask, args.gateway, args.main_d_n_s, args.sub_d_n_s) {
2030      Ok(handler_return) => {
2031        let message_ident = TMessageIdentifier::new("SetNetworkSettings", TMessageType::Reply, incoming_sequence_number);
2032        o_prot.write_message_begin(&message_ident)?;
2033        let ret = SettingSystemServiceSetNetworkSettingsResult { result_value: Some(handler_return) };
2034        ret.write_to_out_protocol(o_prot)?;
2035        o_prot.write_message_end()?;
2036        o_prot.flush()
2037      },
2038      Err(e) => {
2039        match e {
2040          thrift::Error::Application(app_err) => {
2041            let message_ident = TMessageIdentifier::new("SetNetworkSettings", TMessageType::Exception, incoming_sequence_number);
2042            o_prot.write_message_begin(&message_ident)?;
2043            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2044            o_prot.write_message_end()?;
2045            o_prot.flush()
2046          },
2047          _ => {
2048            let ret_err = {
2049              ApplicationError::new(
2050                ApplicationErrorKind::Unknown,
2051                e.description()
2052              )
2053            };
2054            let message_ident = TMessageIdentifier::new("SetNetworkSettings", TMessageType::Exception, incoming_sequence_number);
2055            o_prot.write_message_begin(&message_ident)?;
2056            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2057            o_prot.write_message_end()?;
2058            o_prot.flush()
2059          },
2060        }
2061      },
2062    }
2063  }
2064  pub fn process_set_network_proxy<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2065    let args = SettingSystemServiceSetNetworkProxyArgs::read_from_in_protocol(i_prot)?;
2066    match handler.handle_set_network_proxy(args.proxy_server, args.proxy_port) {
2067      Ok(handler_return) => {
2068        let message_ident = TMessageIdentifier::new("SetNetworkProxy", TMessageType::Reply, incoming_sequence_number);
2069        o_prot.write_message_begin(&message_ident)?;
2070        let ret = SettingSystemServiceSetNetworkProxyResult { result_value: Some(handler_return) };
2071        ret.write_to_out_protocol(o_prot)?;
2072        o_prot.write_message_end()?;
2073        o_prot.flush()
2074      },
2075      Err(e) => {
2076        match e {
2077          thrift::Error::Application(app_err) => {
2078            let message_ident = TMessageIdentifier::new("SetNetworkProxy", TMessageType::Exception, incoming_sequence_number);
2079            o_prot.write_message_begin(&message_ident)?;
2080            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2081            o_prot.write_message_end()?;
2082            o_prot.flush()
2083          },
2084          _ => {
2085            let ret_err = {
2086              ApplicationError::new(
2087                ApplicationErrorKind::Unknown,
2088                e.description()
2089              )
2090            };
2091            let message_ident = TMessageIdentifier::new("SetNetworkProxy", TMessageType::Exception, incoming_sequence_number);
2092            o_prot.write_message_begin(&message_ident)?;
2093            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2094            o_prot.write_message_end()?;
2095            o_prot.flush()
2096          },
2097        }
2098      },
2099    }
2100  }
2101  pub fn process_connect_to_wifi<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2102    let args = SettingSystemServiceConnectToWifiArgs::read_from_in_protocol(i_prot)?;
2103    match handler.handle_connect_to_wifi(args.profile_name, args.key) {
2104      Ok(handler_return) => {
2105        let message_ident = TMessageIdentifier::new("ConnectToWifi", TMessageType::Reply, incoming_sequence_number);
2106        o_prot.write_message_begin(&message_ident)?;
2107        let ret = SettingSystemServiceConnectToWifiResult { result_value: Some(handler_return), error1: None };
2108        ret.write_to_out_protocol(o_prot)?;
2109        o_prot.write_message_end()?;
2110        o_prot.flush()
2111      },
2112      Err(e) => {
2113        match e {
2114          thrift::Error::User(usr_err) => {
2115            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2116              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2117              let ret_err = SettingSystemServiceConnectToWifiResult{ result_value: None, error1: Some(*err) };
2118              let message_ident = TMessageIdentifier::new("ConnectToWifi", TMessageType::Reply, incoming_sequence_number);
2119              o_prot.write_message_begin(&message_ident)?;
2120              ret_err.write_to_out_protocol(o_prot)?;
2121              o_prot.write_message_end()?;
2122              o_prot.flush()
2123            } else {
2124              let ret_err = {
2125                ApplicationError::new(
2126                  ApplicationErrorKind::Unknown,
2127                  usr_err.description()
2128                )
2129              };
2130              let message_ident = TMessageIdentifier::new("ConnectToWifi", TMessageType::Exception, incoming_sequence_number);
2131              o_prot.write_message_begin(&message_ident)?;
2132              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2133              o_prot.write_message_end()?;
2134              o_prot.flush()
2135            }
2136          },
2137          thrift::Error::Application(app_err) => {
2138            let message_ident = TMessageIdentifier::new("ConnectToWifi", TMessageType::Exception, incoming_sequence_number);
2139            o_prot.write_message_begin(&message_ident)?;
2140            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2141            o_prot.write_message_end()?;
2142            o_prot.flush()
2143          },
2144          _ => {
2145            let ret_err = {
2146              ApplicationError::new(
2147                ApplicationErrorKind::Unknown,
2148                e.description()
2149              )
2150            };
2151            let message_ident = TMessageIdentifier::new("ConnectToWifi", TMessageType::Exception, incoming_sequence_number);
2152            o_prot.write_message_begin(&message_ident)?;
2153            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2154            o_prot.write_message_end()?;
2155            o_prot.flush()
2156          },
2157        }
2158      },
2159    }
2160  }
2161  pub fn process_connect_to_appointed_wifi<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2162    let args = SettingSystemServiceConnectToAppointedWifiArgs::read_from_in_protocol(i_prot)?;
2163    match handler.handle_connect_to_appointed_wifi(args.profile_name, args.auth, args.ciper, args.key_type, args.key) {
2164      Ok(handler_return) => {
2165        let message_ident = TMessageIdentifier::new("ConnectToAppointedWifi", TMessageType::Reply, incoming_sequence_number);
2166        o_prot.write_message_begin(&message_ident)?;
2167        let ret = SettingSystemServiceConnectToAppointedWifiResult { result_value: Some(handler_return), error1: None };
2168        ret.write_to_out_protocol(o_prot)?;
2169        o_prot.write_message_end()?;
2170        o_prot.flush()
2171      },
2172      Err(e) => {
2173        match e {
2174          thrift::Error::User(usr_err) => {
2175            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2176              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2177              let ret_err = SettingSystemServiceConnectToAppointedWifiResult{ result_value: None, error1: Some(*err) };
2178              let message_ident = TMessageIdentifier::new("ConnectToAppointedWifi", TMessageType::Reply, incoming_sequence_number);
2179              o_prot.write_message_begin(&message_ident)?;
2180              ret_err.write_to_out_protocol(o_prot)?;
2181              o_prot.write_message_end()?;
2182              o_prot.flush()
2183            } else {
2184              let ret_err = {
2185                ApplicationError::new(
2186                  ApplicationErrorKind::Unknown,
2187                  usr_err.description()
2188                )
2189              };
2190              let message_ident = TMessageIdentifier::new("ConnectToAppointedWifi", TMessageType::Exception, incoming_sequence_number);
2191              o_prot.write_message_begin(&message_ident)?;
2192              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2193              o_prot.write_message_end()?;
2194              o_prot.flush()
2195            }
2196          },
2197          thrift::Error::Application(app_err) => {
2198            let message_ident = TMessageIdentifier::new("ConnectToAppointedWifi", TMessageType::Exception, incoming_sequence_number);
2199            o_prot.write_message_begin(&message_ident)?;
2200            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2201            o_prot.write_message_end()?;
2202            o_prot.flush()
2203          },
2204          _ => {
2205            let ret_err = {
2206              ApplicationError::new(
2207                ApplicationErrorKind::Unknown,
2208                e.description()
2209              )
2210            };
2211            let message_ident = TMessageIdentifier::new("ConnectToAppointedWifi", TMessageType::Exception, incoming_sequence_number);
2212            o_prot.write_message_begin(&message_ident)?;
2213            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2214            o_prot.write_message_end()?;
2215            o_prot.flush()
2216          },
2217        }
2218      },
2219    }
2220  }
2221  pub fn process_get_network_settings<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2222    let _ = SettingSystemServiceGetNetworkSettingsArgs::read_from_in_protocol(i_prot)?;
2223    match handler.handle_get_network_settings() {
2224      Ok(handler_return) => {
2225        let message_ident = TMessageIdentifier::new("GetNetworkSettings", TMessageType::Reply, incoming_sequence_number);
2226        o_prot.write_message_begin(&message_ident)?;
2227        let ret = SettingSystemServiceGetNetworkSettingsResult { result_value: Some(handler_return), error1: None };
2228        ret.write_to_out_protocol(o_prot)?;
2229        o_prot.write_message_end()?;
2230        o_prot.flush()
2231      },
2232      Err(e) => {
2233        match e {
2234          thrift::Error::User(usr_err) => {
2235            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2236              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2237              let ret_err = SettingSystemServiceGetNetworkSettingsResult{ result_value: None, error1: Some(*err) };
2238              let message_ident = TMessageIdentifier::new("GetNetworkSettings", TMessageType::Reply, incoming_sequence_number);
2239              o_prot.write_message_begin(&message_ident)?;
2240              ret_err.write_to_out_protocol(o_prot)?;
2241              o_prot.write_message_end()?;
2242              o_prot.flush()
2243            } else {
2244              let ret_err = {
2245                ApplicationError::new(
2246                  ApplicationErrorKind::Unknown,
2247                  usr_err.description()
2248                )
2249              };
2250              let message_ident = TMessageIdentifier::new("GetNetworkSettings", TMessageType::Exception, incoming_sequence_number);
2251              o_prot.write_message_begin(&message_ident)?;
2252              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2253              o_prot.write_message_end()?;
2254              o_prot.flush()
2255            }
2256          },
2257          thrift::Error::Application(app_err) => {
2258            let message_ident = TMessageIdentifier::new("GetNetworkSettings", TMessageType::Exception, incoming_sequence_number);
2259            o_prot.write_message_begin(&message_ident)?;
2260            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2261            o_prot.write_message_end()?;
2262            o_prot.flush()
2263          },
2264          _ => {
2265            let ret_err = {
2266              ApplicationError::new(
2267                ApplicationErrorKind::Unknown,
2268                e.description()
2269              )
2270            };
2271            let message_ident = TMessageIdentifier::new("GetNetworkSettings", TMessageType::Exception, incoming_sequence_number);
2272            o_prot.write_message_begin(&message_ident)?;
2273            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2274            o_prot.write_message_end()?;
2275            o_prot.flush()
2276          },
2277        }
2278      },
2279    }
2280  }
2281  pub fn process_get_network_status<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2282    let _ = SettingSystemServiceGetNetworkStatusArgs::read_from_in_protocol(i_prot)?;
2283    match handler.handle_get_network_status() {
2284      Ok(handler_return) => {
2285        let message_ident = TMessageIdentifier::new("GetNetworkStatus", TMessageType::Reply, incoming_sequence_number);
2286        o_prot.write_message_begin(&message_ident)?;
2287        let ret = SettingSystemServiceGetNetworkStatusResult { result_value: Some(handler_return), error1: None };
2288        ret.write_to_out_protocol(o_prot)?;
2289        o_prot.write_message_end()?;
2290        o_prot.flush()
2291      },
2292      Err(e) => {
2293        match e {
2294          thrift::Error::User(usr_err) => {
2295            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2296              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2297              let ret_err = SettingSystemServiceGetNetworkStatusResult{ result_value: None, error1: Some(*err) };
2298              let message_ident = TMessageIdentifier::new("GetNetworkStatus", TMessageType::Reply, incoming_sequence_number);
2299              o_prot.write_message_begin(&message_ident)?;
2300              ret_err.write_to_out_protocol(o_prot)?;
2301              o_prot.write_message_end()?;
2302              o_prot.flush()
2303            } else {
2304              let ret_err = {
2305                ApplicationError::new(
2306                  ApplicationErrorKind::Unknown,
2307                  usr_err.description()
2308                )
2309              };
2310              let message_ident = TMessageIdentifier::new("GetNetworkStatus", TMessageType::Exception, incoming_sequence_number);
2311              o_prot.write_message_begin(&message_ident)?;
2312              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2313              o_prot.write_message_end()?;
2314              o_prot.flush()
2315            }
2316          },
2317          thrift::Error::Application(app_err) => {
2318            let message_ident = TMessageIdentifier::new("GetNetworkStatus", TMessageType::Exception, incoming_sequence_number);
2319            o_prot.write_message_begin(&message_ident)?;
2320            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2321            o_prot.write_message_end()?;
2322            o_prot.flush()
2323          },
2324          _ => {
2325            let ret_err = {
2326              ApplicationError::new(
2327                ApplicationErrorKind::Unknown,
2328                e.description()
2329              )
2330            };
2331            let message_ident = TMessageIdentifier::new("GetNetworkStatus", TMessageType::Exception, incoming_sequence_number);
2332            o_prot.write_message_begin(&message_ident)?;
2333            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2334            o_prot.write_message_end()?;
2335            o_prot.flush()
2336          },
2337        }
2338      },
2339    }
2340  }
2341  pub fn process_ruyi_test_network<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2342    let _ = SettingSystemServiceRuyiTestNetworkArgs::read_from_in_protocol(i_prot)?;
2343    match handler.handle_ruyi_test_network() {
2344      Ok(handler_return) => {
2345        let message_ident = TMessageIdentifier::new("RuyiTestNetwork", TMessageType::Reply, incoming_sequence_number);
2346        o_prot.write_message_begin(&message_ident)?;
2347        let ret = SettingSystemServiceRuyiTestNetworkResult { result_value: Some(handler_return), error1: None };
2348        ret.write_to_out_protocol(o_prot)?;
2349        o_prot.write_message_end()?;
2350        o_prot.flush()
2351      },
2352      Err(e) => {
2353        match e {
2354          thrift::Error::User(usr_err) => {
2355            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2356              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2357              let ret_err = SettingSystemServiceRuyiTestNetworkResult{ result_value: None, error1: Some(*err) };
2358              let message_ident = TMessageIdentifier::new("RuyiTestNetwork", TMessageType::Reply, incoming_sequence_number);
2359              o_prot.write_message_begin(&message_ident)?;
2360              ret_err.write_to_out_protocol(o_prot)?;
2361              o_prot.write_message_end()?;
2362              o_prot.flush()
2363            } else {
2364              let ret_err = {
2365                ApplicationError::new(
2366                  ApplicationErrorKind::Unknown,
2367                  usr_err.description()
2368                )
2369              };
2370              let message_ident = TMessageIdentifier::new("RuyiTestNetwork", TMessageType::Exception, incoming_sequence_number);
2371              o_prot.write_message_begin(&message_ident)?;
2372              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2373              o_prot.write_message_end()?;
2374              o_prot.flush()
2375            }
2376          },
2377          thrift::Error::Application(app_err) => {
2378            let message_ident = TMessageIdentifier::new("RuyiTestNetwork", TMessageType::Exception, incoming_sequence_number);
2379            o_prot.write_message_begin(&message_ident)?;
2380            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2381            o_prot.write_message_end()?;
2382            o_prot.flush()
2383          },
2384          _ => {
2385            let ret_err = {
2386              ApplicationError::new(
2387                ApplicationErrorKind::Unknown,
2388                e.description()
2389              )
2390            };
2391            let message_ident = TMessageIdentifier::new("RuyiTestNetwork", TMessageType::Exception, incoming_sequence_number);
2392            o_prot.write_message_begin(&message_ident)?;
2393            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2394            o_prot.write_message_end()?;
2395            o_prot.flush()
2396          },
2397        }
2398      },
2399    }
2400  }
2401  pub fn process_ruyi_start_network_speed_test<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2402    let args = SettingSystemServiceRuyiStartNetworkSpeedTestArgs::read_from_in_protocol(i_prot)?;
2403    match handler.handle_ruyi_start_network_speed_test(args.userindex) {
2404      Ok(handler_return) => {
2405        let message_ident = TMessageIdentifier::new("RuyiStartNetworkSpeedTest", TMessageType::Reply, incoming_sequence_number);
2406        o_prot.write_message_begin(&message_ident)?;
2407        let ret = SettingSystemServiceRuyiStartNetworkSpeedTestResult { result_value: Some(handler_return), error1: None };
2408        ret.write_to_out_protocol(o_prot)?;
2409        o_prot.write_message_end()?;
2410        o_prot.flush()
2411      },
2412      Err(e) => {
2413        match e {
2414          thrift::Error::User(usr_err) => {
2415            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2416              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2417              let ret_err = SettingSystemServiceRuyiStartNetworkSpeedTestResult{ result_value: None, error1: Some(*err) };
2418              let message_ident = TMessageIdentifier::new("RuyiStartNetworkSpeedTest", TMessageType::Reply, incoming_sequence_number);
2419              o_prot.write_message_begin(&message_ident)?;
2420              ret_err.write_to_out_protocol(o_prot)?;
2421              o_prot.write_message_end()?;
2422              o_prot.flush()
2423            } else {
2424              let ret_err = {
2425                ApplicationError::new(
2426                  ApplicationErrorKind::Unknown,
2427                  usr_err.description()
2428                )
2429              };
2430              let message_ident = TMessageIdentifier::new("RuyiStartNetworkSpeedTest", TMessageType::Exception, incoming_sequence_number);
2431              o_prot.write_message_begin(&message_ident)?;
2432              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2433              o_prot.write_message_end()?;
2434              o_prot.flush()
2435            }
2436          },
2437          thrift::Error::Application(app_err) => {
2438            let message_ident = TMessageIdentifier::new("RuyiStartNetworkSpeedTest", TMessageType::Exception, incoming_sequence_number);
2439            o_prot.write_message_begin(&message_ident)?;
2440            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2441            o_prot.write_message_end()?;
2442            o_prot.flush()
2443          },
2444          _ => {
2445            let ret_err = {
2446              ApplicationError::new(
2447                ApplicationErrorKind::Unknown,
2448                e.description()
2449              )
2450            };
2451            let message_ident = TMessageIdentifier::new("RuyiStartNetworkSpeedTest", TMessageType::Exception, incoming_sequence_number);
2452            o_prot.write_message_begin(&message_ident)?;
2453            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2454            o_prot.write_message_end()?;
2455            o_prot.flush()
2456          },
2457        }
2458      },
2459    }
2460  }
2461  pub fn process_ruyi_stop_network_speed_test<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2462    let args = SettingSystemServiceRuyiStopNetworkSpeedTestArgs::read_from_in_protocol(i_prot)?;
2463    match handler.handle_ruyi_stop_network_speed_test(args.userindex) {
2464      Ok(handler_return) => {
2465        let message_ident = TMessageIdentifier::new("RuyiStopNetworkSpeedTest", TMessageType::Reply, incoming_sequence_number);
2466        o_prot.write_message_begin(&message_ident)?;
2467        let ret = SettingSystemServiceRuyiStopNetworkSpeedTestResult { result_value: Some(handler_return), error1: None };
2468        ret.write_to_out_protocol(o_prot)?;
2469        o_prot.write_message_end()?;
2470        o_prot.flush()
2471      },
2472      Err(e) => {
2473        match e {
2474          thrift::Error::User(usr_err) => {
2475            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2476              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2477              let ret_err = SettingSystemServiceRuyiStopNetworkSpeedTestResult{ result_value: None, error1: Some(*err) };
2478              let message_ident = TMessageIdentifier::new("RuyiStopNetworkSpeedTest", TMessageType::Reply, incoming_sequence_number);
2479              o_prot.write_message_begin(&message_ident)?;
2480              ret_err.write_to_out_protocol(o_prot)?;
2481              o_prot.write_message_end()?;
2482              o_prot.flush()
2483            } else {
2484              let ret_err = {
2485                ApplicationError::new(
2486                  ApplicationErrorKind::Unknown,
2487                  usr_err.description()
2488                )
2489              };
2490              let message_ident = TMessageIdentifier::new("RuyiStopNetworkSpeedTest", TMessageType::Exception, incoming_sequence_number);
2491              o_prot.write_message_begin(&message_ident)?;
2492              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2493              o_prot.write_message_end()?;
2494              o_prot.flush()
2495            }
2496          },
2497          thrift::Error::Application(app_err) => {
2498            let message_ident = TMessageIdentifier::new("RuyiStopNetworkSpeedTest", TMessageType::Exception, incoming_sequence_number);
2499            o_prot.write_message_begin(&message_ident)?;
2500            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2501            o_prot.write_message_end()?;
2502            o_prot.flush()
2503          },
2504          _ => {
2505            let ret_err = {
2506              ApplicationError::new(
2507                ApplicationErrorKind::Unknown,
2508                e.description()
2509              )
2510            };
2511            let message_ident = TMessageIdentifier::new("RuyiStopNetworkSpeedTest", TMessageType::Exception, incoming_sequence_number);
2512            o_prot.write_message_begin(&message_ident)?;
2513            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2514            o_prot.write_message_end()?;
2515            o_prot.flush()
2516          },
2517        }
2518      },
2519    }
2520  }
2521  pub fn process_get_available_wifi<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2522    let _ = SettingSystemServiceGetAvailableWifiArgs::read_from_in_protocol(i_prot)?;
2523    match handler.handle_get_available_wifi() {
2524      Ok(handler_return) => {
2525        let message_ident = TMessageIdentifier::new("GetAvailableWifi", TMessageType::Reply, incoming_sequence_number);
2526        o_prot.write_message_begin(&message_ident)?;
2527        let ret = SettingSystemServiceGetAvailableWifiResult { result_value: Some(handler_return), error1: None };
2528        ret.write_to_out_protocol(o_prot)?;
2529        o_prot.write_message_end()?;
2530        o_prot.flush()
2531      },
2532      Err(e) => {
2533        match e {
2534          thrift::Error::User(usr_err) => {
2535            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2536              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2537              let ret_err = SettingSystemServiceGetAvailableWifiResult{ result_value: None, error1: Some(*err) };
2538              let message_ident = TMessageIdentifier::new("GetAvailableWifi", TMessageType::Reply, incoming_sequence_number);
2539              o_prot.write_message_begin(&message_ident)?;
2540              ret_err.write_to_out_protocol(o_prot)?;
2541              o_prot.write_message_end()?;
2542              o_prot.flush()
2543            } else {
2544              let ret_err = {
2545                ApplicationError::new(
2546                  ApplicationErrorKind::Unknown,
2547                  usr_err.description()
2548                )
2549              };
2550              let message_ident = TMessageIdentifier::new("GetAvailableWifi", TMessageType::Exception, incoming_sequence_number);
2551              o_prot.write_message_begin(&message_ident)?;
2552              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2553              o_prot.write_message_end()?;
2554              o_prot.flush()
2555            }
2556          },
2557          thrift::Error::Application(app_err) => {
2558            let message_ident = TMessageIdentifier::new("GetAvailableWifi", TMessageType::Exception, incoming_sequence_number);
2559            o_prot.write_message_begin(&message_ident)?;
2560            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2561            o_prot.write_message_end()?;
2562            o_prot.flush()
2563          },
2564          _ => {
2565            let ret_err = {
2566              ApplicationError::new(
2567                ApplicationErrorKind::Unknown,
2568                e.description()
2569              )
2570            };
2571            let message_ident = TMessageIdentifier::new("GetAvailableWifi", TMessageType::Exception, incoming_sequence_number);
2572            o_prot.write_message_begin(&message_ident)?;
2573            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2574            o_prot.write_message_end()?;
2575            o_prot.flush()
2576          },
2577        }
2578      },
2579    }
2580  }
2581  pub fn process_disconnect_wifi<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2582    let _ = SettingSystemServiceDisconnectWifiArgs::read_from_in_protocol(i_prot)?;
2583    match handler.handle_disconnect_wifi() {
2584      Ok(handler_return) => {
2585        let message_ident = TMessageIdentifier::new("DisconnectWifi", TMessageType::Reply, incoming_sequence_number);
2586        o_prot.write_message_begin(&message_ident)?;
2587        let ret = SettingSystemServiceDisconnectWifiResult { result_value: Some(handler_return), error1: None };
2588        ret.write_to_out_protocol(o_prot)?;
2589        o_prot.write_message_end()?;
2590        o_prot.flush()
2591      },
2592      Err(e) => {
2593        match e {
2594          thrift::Error::User(usr_err) => {
2595            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2596              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2597              let ret_err = SettingSystemServiceDisconnectWifiResult{ result_value: None, error1: Some(*err) };
2598              let message_ident = TMessageIdentifier::new("DisconnectWifi", TMessageType::Reply, incoming_sequence_number);
2599              o_prot.write_message_begin(&message_ident)?;
2600              ret_err.write_to_out_protocol(o_prot)?;
2601              o_prot.write_message_end()?;
2602              o_prot.flush()
2603            } else {
2604              let ret_err = {
2605                ApplicationError::new(
2606                  ApplicationErrorKind::Unknown,
2607                  usr_err.description()
2608                )
2609              };
2610              let message_ident = TMessageIdentifier::new("DisconnectWifi", TMessageType::Exception, incoming_sequence_number);
2611              o_prot.write_message_begin(&message_ident)?;
2612              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2613              o_prot.write_message_end()?;
2614              o_prot.flush()
2615            }
2616          },
2617          thrift::Error::Application(app_err) => {
2618            let message_ident = TMessageIdentifier::new("DisconnectWifi", TMessageType::Exception, incoming_sequence_number);
2619            o_prot.write_message_begin(&message_ident)?;
2620            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2621            o_prot.write_message_end()?;
2622            o_prot.flush()
2623          },
2624          _ => {
2625            let ret_err = {
2626              ApplicationError::new(
2627                ApplicationErrorKind::Unknown,
2628                e.description()
2629              )
2630            };
2631            let message_ident = TMessageIdentifier::new("DisconnectWifi", TMessageType::Exception, incoming_sequence_number);
2632            o_prot.write_message_begin(&message_ident)?;
2633            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2634            o_prot.write_message_end()?;
2635            o_prot.flush()
2636          },
2637        }
2638      },
2639    }
2640  }
2641  pub fn process_discover_bluetooth_device<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2642    let _ = SettingSystemServiceDiscoverBluetoothDeviceArgs::read_from_in_protocol(i_prot)?;
2643    match handler.handle_discover_bluetooth_device() {
2644      Ok(handler_return) => {
2645        let message_ident = TMessageIdentifier::new("DiscoverBluetoothDevice", TMessageType::Reply, incoming_sequence_number);
2646        o_prot.write_message_begin(&message_ident)?;
2647        let ret = SettingSystemServiceDiscoverBluetoothDeviceResult { result_value: Some(handler_return), error1: None };
2648        ret.write_to_out_protocol(o_prot)?;
2649        o_prot.write_message_end()?;
2650        o_prot.flush()
2651      },
2652      Err(e) => {
2653        match e {
2654          thrift::Error::User(usr_err) => {
2655            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2656              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2657              let ret_err = SettingSystemServiceDiscoverBluetoothDeviceResult{ result_value: None, error1: Some(*err) };
2658              let message_ident = TMessageIdentifier::new("DiscoverBluetoothDevice", TMessageType::Reply, incoming_sequence_number);
2659              o_prot.write_message_begin(&message_ident)?;
2660              ret_err.write_to_out_protocol(o_prot)?;
2661              o_prot.write_message_end()?;
2662              o_prot.flush()
2663            } else {
2664              let ret_err = {
2665                ApplicationError::new(
2666                  ApplicationErrorKind::Unknown,
2667                  usr_err.description()
2668                )
2669              };
2670              let message_ident = TMessageIdentifier::new("DiscoverBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2671              o_prot.write_message_begin(&message_ident)?;
2672              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2673              o_prot.write_message_end()?;
2674              o_prot.flush()
2675            }
2676          },
2677          thrift::Error::Application(app_err) => {
2678            let message_ident = TMessageIdentifier::new("DiscoverBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2679            o_prot.write_message_begin(&message_ident)?;
2680            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2681            o_prot.write_message_end()?;
2682            o_prot.flush()
2683          },
2684          _ => {
2685            let ret_err = {
2686              ApplicationError::new(
2687                ApplicationErrorKind::Unknown,
2688                e.description()
2689              )
2690            };
2691            let message_ident = TMessageIdentifier::new("DiscoverBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2692            o_prot.write_message_begin(&message_ident)?;
2693            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2694            o_prot.write_message_end()?;
2695            o_prot.flush()
2696          },
2697        }
2698      },
2699    }
2700  }
2701  pub fn process_connect_bluetooth_device<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2702    let args = SettingSystemServiceConnectBluetoothDeviceArgs::read_from_in_protocol(i_prot)?;
2703    match handler.handle_connect_bluetooth_device(args.device_name, args.device_address) {
2704      Ok(handler_return) => {
2705        let message_ident = TMessageIdentifier::new("ConnectBluetoothDevice", TMessageType::Reply, incoming_sequence_number);
2706        o_prot.write_message_begin(&message_ident)?;
2707        let ret = SettingSystemServiceConnectBluetoothDeviceResult { result_value: Some(handler_return), error1: None };
2708        ret.write_to_out_protocol(o_prot)?;
2709        o_prot.write_message_end()?;
2710        o_prot.flush()
2711      },
2712      Err(e) => {
2713        match e {
2714          thrift::Error::User(usr_err) => {
2715            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2716              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2717              let ret_err = SettingSystemServiceConnectBluetoothDeviceResult{ result_value: None, error1: Some(*err) };
2718              let message_ident = TMessageIdentifier::new("ConnectBluetoothDevice", TMessageType::Reply, incoming_sequence_number);
2719              o_prot.write_message_begin(&message_ident)?;
2720              ret_err.write_to_out_protocol(o_prot)?;
2721              o_prot.write_message_end()?;
2722              o_prot.flush()
2723            } else {
2724              let ret_err = {
2725                ApplicationError::new(
2726                  ApplicationErrorKind::Unknown,
2727                  usr_err.description()
2728                )
2729              };
2730              let message_ident = TMessageIdentifier::new("ConnectBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2731              o_prot.write_message_begin(&message_ident)?;
2732              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2733              o_prot.write_message_end()?;
2734              o_prot.flush()
2735            }
2736          },
2737          thrift::Error::Application(app_err) => {
2738            let message_ident = TMessageIdentifier::new("ConnectBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2739            o_prot.write_message_begin(&message_ident)?;
2740            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2741            o_prot.write_message_end()?;
2742            o_prot.flush()
2743          },
2744          _ => {
2745            let ret_err = {
2746              ApplicationError::new(
2747                ApplicationErrorKind::Unknown,
2748                e.description()
2749              )
2750            };
2751            let message_ident = TMessageIdentifier::new("ConnectBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2752            o_prot.write_message_begin(&message_ident)?;
2753            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2754            o_prot.write_message_end()?;
2755            o_prot.flush()
2756          },
2757        }
2758      },
2759    }
2760  }
2761  pub fn process_disconnect_bluetooth_device<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2762    let args = SettingSystemServiceDisconnectBluetoothDeviceArgs::read_from_in_protocol(i_prot)?;
2763    match handler.handle_disconnect_bluetooth_device(args.device_name, args.device_address) {
2764      Ok(handler_return) => {
2765        let message_ident = TMessageIdentifier::new("DisconnectBluetoothDevice", TMessageType::Reply, incoming_sequence_number);
2766        o_prot.write_message_begin(&message_ident)?;
2767        let ret = SettingSystemServiceDisconnectBluetoothDeviceResult { result_value: Some(handler_return), error1: None };
2768        ret.write_to_out_protocol(o_prot)?;
2769        o_prot.write_message_end()?;
2770        o_prot.flush()
2771      },
2772      Err(e) => {
2773        match e {
2774          thrift::Error::User(usr_err) => {
2775            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2776              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2777              let ret_err = SettingSystemServiceDisconnectBluetoothDeviceResult{ result_value: None, error1: Some(*err) };
2778              let message_ident = TMessageIdentifier::new("DisconnectBluetoothDevice", TMessageType::Reply, incoming_sequence_number);
2779              o_prot.write_message_begin(&message_ident)?;
2780              ret_err.write_to_out_protocol(o_prot)?;
2781              o_prot.write_message_end()?;
2782              o_prot.flush()
2783            } else {
2784              let ret_err = {
2785                ApplicationError::new(
2786                  ApplicationErrorKind::Unknown,
2787                  usr_err.description()
2788                )
2789              };
2790              let message_ident = TMessageIdentifier::new("DisconnectBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2791              o_prot.write_message_begin(&message_ident)?;
2792              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2793              o_prot.write_message_end()?;
2794              o_prot.flush()
2795            }
2796          },
2797          thrift::Error::Application(app_err) => {
2798            let message_ident = TMessageIdentifier::new("DisconnectBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2799            o_prot.write_message_begin(&message_ident)?;
2800            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2801            o_prot.write_message_end()?;
2802            o_prot.flush()
2803          },
2804          _ => {
2805            let ret_err = {
2806              ApplicationError::new(
2807                ApplicationErrorKind::Unknown,
2808                e.description()
2809              )
2810            };
2811            let message_ident = TMessageIdentifier::new("DisconnectBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2812            o_prot.write_message_begin(&message_ident)?;
2813            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2814            o_prot.write_message_end()?;
2815            o_prot.flush()
2816          },
2817        }
2818      },
2819    }
2820  }
2821  pub fn process_remove_bluetooth_device<H: SettingSystemServiceSyncHandler>(handler: &H, incoming_sequence_number: i32, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2822    let args = SettingSystemServiceRemoveBluetoothDeviceArgs::read_from_in_protocol(i_prot)?;
2823    match handler.handle_remove_bluetooth_device(args.device_name, args.device_address) {
2824      Ok(handler_return) => {
2825        let message_ident = TMessageIdentifier::new("RemoveBluetoothDevice", TMessageType::Reply, incoming_sequence_number);
2826        o_prot.write_message_begin(&message_ident)?;
2827        let ret = SettingSystemServiceRemoveBluetoothDeviceResult { result_value: Some(handler_return), error1: None };
2828        ret.write_to_out_protocol(o_prot)?;
2829        o_prot.write_message_end()?;
2830        o_prot.flush()
2831      },
2832      Err(e) => {
2833        match e {
2834          thrift::Error::User(usr_err) => {
2835            if usr_err.downcast_ref::<common_type_s_d_k_data_types::ErrorException>().is_some() {
2836              let err = usr_err.downcast::<common_type_s_d_k_data_types::ErrorException>().expect("downcast already checked");
2837              let ret_err = SettingSystemServiceRemoveBluetoothDeviceResult{ result_value: None, error1: Some(*err) };
2838              let message_ident = TMessageIdentifier::new("RemoveBluetoothDevice", TMessageType::Reply, incoming_sequence_number);
2839              o_prot.write_message_begin(&message_ident)?;
2840              ret_err.write_to_out_protocol(o_prot)?;
2841              o_prot.write_message_end()?;
2842              o_prot.flush()
2843            } else {
2844              let ret_err = {
2845                ApplicationError::new(
2846                  ApplicationErrorKind::Unknown,
2847                  usr_err.description()
2848                )
2849              };
2850              let message_ident = TMessageIdentifier::new("RemoveBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2851              o_prot.write_message_begin(&message_ident)?;
2852              thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2853              o_prot.write_message_end()?;
2854              o_prot.flush()
2855            }
2856          },
2857          thrift::Error::Application(app_err) => {
2858            let message_ident = TMessageIdentifier::new("RemoveBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2859            o_prot.write_message_begin(&message_ident)?;
2860            thrift::Error::write_application_error_to_out_protocol(&app_err, o_prot)?;
2861            o_prot.write_message_end()?;
2862            o_prot.flush()
2863          },
2864          _ => {
2865            let ret_err = {
2866              ApplicationError::new(
2867                ApplicationErrorKind::Unknown,
2868                e.description()
2869              )
2870            };
2871            let message_ident = TMessageIdentifier::new("RemoveBluetoothDevice", TMessageType::Exception, incoming_sequence_number);
2872            o_prot.write_message_begin(&message_ident)?;
2873            thrift::Error::write_application_error_to_out_protocol(&ret_err, o_prot)?;
2874            o_prot.write_message_end()?;
2875            o_prot.flush()
2876          },
2877        }
2878      },
2879    }
2880  }
2881}
2882
2883impl <H: SettingSystemServiceSyncHandler> TProcessor for SettingSystemServiceSyncProcessor<H> {
2884  fn process(&self, i_prot: &mut TInputProtocol, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
2885    let message_ident = i_prot.read_message_begin()?;
2886    let res = match &*message_ident.name {
2887      "GetSettingItem" => {
2888        self.process_get_setting_item(message_ident.sequence_number, i_prot, o_prot)
2889      },
2890      "GetSettingItems" => {
2891        self.process_get_setting_items(message_ident.sequence_number, i_prot, o_prot)
2892      },
2893      "SearchSettingItems" => {
2894        self.process_search_setting_items(message_ident.sequence_number, i_prot, o_prot)
2895      },
2896      "GetCategoryNode" => {
2897        self.process_get_category_node(message_ident.sequence_number, i_prot, o_prot)
2898      },
2899      "GetChildNode" => {
2900        self.process_get_child_node(message_ident.sequence_number, i_prot, o_prot)
2901      },
2902      "SetSettingItem" => {
2903        self.process_set_setting_item(message_ident.sequence_number, i_prot, o_prot)
2904      },
2905      "SetSettingItems" => {
2906        self.process_set_setting_items(message_ident.sequence_number, i_prot, o_prot)
2907      },
2908      "RestoreDefault" => {
2909        self.process_restore_default(message_ident.sequence_number, i_prot, o_prot)
2910      },
2911      "RestoreUserDefault" => {
2912        self.process_restore_user_default(message_ident.sequence_number, i_prot, o_prot)
2913      },
2914      "UpdateModuleVersion" => {
2915        self.process_update_module_version(message_ident.sequence_number, i_prot, o_prot)
2916      },
2917      "SetUserAppData" => {
2918        self.process_set_user_app_data(message_ident.sequence_number, i_prot, o_prot)
2919      },
2920      "GetUserAppData" => {
2921        self.process_get_user_app_data(message_ident.sequence_number, i_prot, o_prot)
2922      },
2923      "RemoveUserAppData" => {
2924        self.process_remove_user_app_data(message_ident.sequence_number, i_prot, o_prot)
2925      },
2926      "SettingItemNotify" => {
2927        self.process_setting_item_notify(message_ident.sequence_number, i_prot, o_prot)
2928      },
2929      "GetNetworkAdapterSettings" => {
2930        self.process_get_network_adapter_settings(message_ident.sequence_number, i_prot, o_prot)
2931      },
2932      "GetLanNetworkName" => {
2933        self.process_get_lan_network_name(message_ident.sequence_number, i_prot, o_prot)
2934      },
2935      "SetNetworkSettings" => {
2936        self.process_set_network_settings(message_ident.sequence_number, i_prot, o_prot)
2937      },
2938      "SetNetworkProxy" => {
2939        self.process_set_network_proxy(message_ident.sequence_number, i_prot, o_prot)
2940      },
2941      "ConnectToWifi" => {
2942        self.process_connect_to_wifi(message_ident.sequence_number, i_prot, o_prot)
2943      },
2944      "ConnectToAppointedWifi" => {
2945        self.process_connect_to_appointed_wifi(message_ident.sequence_number, i_prot, o_prot)
2946      },
2947      "GetNetworkSettings" => {
2948        self.process_get_network_settings(message_ident.sequence_number, i_prot, o_prot)
2949      },
2950      "GetNetworkStatus" => {
2951        self.process_get_network_status(message_ident.sequence_number, i_prot, o_prot)
2952      },
2953      "RuyiTestNetwork" => {
2954        self.process_ruyi_test_network(message_ident.sequence_number, i_prot, o_prot)
2955      },
2956      "RuyiStartNetworkSpeedTest" => {
2957        self.process_ruyi_start_network_speed_test(message_ident.sequence_number, i_prot, o_prot)
2958      },
2959      "RuyiStopNetworkSpeedTest" => {
2960        self.process_ruyi_stop_network_speed_test(message_ident.sequence_number, i_prot, o_prot)
2961      },
2962      "GetAvailableWifi" => {
2963        self.process_get_available_wifi(message_ident.sequence_number, i_prot, o_prot)
2964      },
2965      "DisconnectWifi" => {
2966        self.process_disconnect_wifi(message_ident.sequence_number, i_prot, o_prot)
2967      },
2968      "DiscoverBluetoothDevice" => {
2969        self.process_discover_bluetooth_device(message_ident.sequence_number, i_prot, o_prot)
2970      },
2971      "ConnectBluetoothDevice" => {
2972        self.process_connect_bluetooth_device(message_ident.sequence_number, i_prot, o_prot)
2973      },
2974      "DisconnectBluetoothDevice" => {
2975        self.process_disconnect_bluetooth_device(message_ident.sequence_number, i_prot, o_prot)
2976      },
2977      "RemoveBluetoothDevice" => {
2978        self.process_remove_bluetooth_device(message_ident.sequence_number, i_prot, o_prot)
2979      },
2980      method => {
2981        Err(
2982          thrift::Error::Application(
2983            ApplicationError::new(
2984              ApplicationErrorKind::UnknownMethod,
2985              format!("unknown method {}", method)
2986            )
2987          )
2988        )
2989      },
2990    };
2991    thrift::server::handle_process_result(&message_ident, res, o_prot)
2992  }
2993}
2994
2995//
2996// SettingSystemServiceGetSettingItemArgs
2997//
2998
2999#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3000struct SettingSystemServiceGetSettingItemArgs {
3001  /// The setting's unique id in current module.
3002  id: String,
3003}
3004
3005impl SettingSystemServiceGetSettingItemArgs {
3006  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetSettingItemArgs> {
3007    i_prot.read_struct_begin()?;
3008    let mut f_1: Option<String> = None;
3009    loop {
3010      let field_ident = i_prot.read_field_begin()?;
3011      if field_ident.field_type == TType::Stop {
3012        break;
3013      }
3014      let field_id = field_id(&field_ident)?;
3015      match field_id {
3016        1 => {
3017          let val = i_prot.read_string()?;
3018          f_1 = Some(val);
3019        },
3020        _ => {
3021          i_prot.skip(field_ident.field_type)?;
3022        },
3023      };
3024      i_prot.read_field_end()?;
3025    }
3026    i_prot.read_struct_end()?;
3027    verify_required_field_exists("SettingSystemServiceGetSettingItemArgs.id", &f_1)?;
3028    let ret = SettingSystemServiceGetSettingItemArgs {
3029      id: f_1.expect("auto-generated code should have checked for presence of required fields"),
3030    };
3031    Ok(ret)
3032  }
3033  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3034    let struct_ident = TStructIdentifier::new("GetSettingItem_args");
3035    o_prot.write_struct_begin(&struct_ident)?;
3036    o_prot.write_field_begin(&TFieldIdentifier::new("id", TType::String, 1))?;
3037    o_prot.write_string(&self.id)?;
3038    o_prot.write_field_end()?;
3039    o_prot.write_field_stop()?;
3040    o_prot.write_struct_end()
3041  }
3042}
3043
3044//
3045// SettingSystemServiceGetSettingItemResult
3046//
3047
3048#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3049struct SettingSystemServiceGetSettingItemResult {
3050  result_value: Option<common_type_s_d_k_data_types::SettingItem>,
3051  error1: Option<common_type_s_d_k_data_types::ErrorException>,
3052}
3053
3054impl SettingSystemServiceGetSettingItemResult {
3055  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetSettingItemResult> {
3056    i_prot.read_struct_begin()?;
3057    let mut f_0: Option<common_type_s_d_k_data_types::SettingItem> = None;
3058    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
3059    loop {
3060      let field_ident = i_prot.read_field_begin()?;
3061      if field_ident.field_type == TType::Stop {
3062        break;
3063      }
3064      let field_id = field_id(&field_ident)?;
3065      match field_id {
3066        0 => {
3067          let val = common_type_s_d_k_data_types::SettingItem::read_from_in_protocol(i_prot)?;
3068          f_0 = Some(val);
3069        },
3070        1 => {
3071          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
3072          f_1 = Some(val);
3073        },
3074        _ => {
3075          i_prot.skip(field_ident.field_type)?;
3076        },
3077      };
3078      i_prot.read_field_end()?;
3079    }
3080    i_prot.read_struct_end()?;
3081    let ret = SettingSystemServiceGetSettingItemResult {
3082      result_value: f_0,
3083      error1: f_1,
3084    };
3085    Ok(ret)
3086  }
3087  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3088    let struct_ident = TStructIdentifier::new("SettingSystemServiceGetSettingItemResult");
3089    o_prot.write_struct_begin(&struct_ident)?;
3090    if let Some(ref fld_var) = self.result_value {
3091      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
3092      fld_var.write_to_out_protocol(o_prot)?;
3093      o_prot.write_field_end()?;
3094      ()
3095    } else {
3096      ()
3097    }
3098    if let Some(ref fld_var) = self.error1 {
3099      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
3100      fld_var.write_to_out_protocol(o_prot)?;
3101      o_prot.write_field_end()?;
3102      ()
3103    } else {
3104      ()
3105    }
3106    o_prot.write_field_stop()?;
3107    o_prot.write_struct_end()
3108  }
3109  fn ok_or(self) -> thrift::Result<common_type_s_d_k_data_types::SettingItem> {
3110    if self.error1.is_some() {
3111      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
3112    } else if self.result_value.is_some() {
3113      Ok(self.result_value.unwrap())
3114    } else {
3115      Err(
3116        thrift::Error::Application(
3117          ApplicationError::new(
3118            ApplicationErrorKind::MissingResult,
3119            "no result received for SettingSystemServiceGetSettingItem"
3120          )
3121        )
3122      )
3123    }
3124  }
3125}
3126
3127//
3128// SettingSystemServiceGetSettingItemsArgs
3129//
3130
3131#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3132struct SettingSystemServiceGetSettingItemsArgs {
3133  /// Category to filter the settings. Null indicates getting all settings of the module
3134  category: String,
3135  /// Whecher to get the settings of children cagegories.
3136  include_children: bool,
3137}
3138
3139impl SettingSystemServiceGetSettingItemsArgs {
3140  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetSettingItemsArgs> {
3141    i_prot.read_struct_begin()?;
3142    let mut f_1: Option<String> = None;
3143    let mut f_2: Option<bool> = None;
3144    loop {
3145      let field_ident = i_prot.read_field_begin()?;
3146      if field_ident.field_type == TType::Stop {
3147        break;
3148      }
3149      let field_id = field_id(&field_ident)?;
3150      match field_id {
3151        1 => {
3152          let val = i_prot.read_string()?;
3153          f_1 = Some(val);
3154        },
3155        2 => {
3156          let val = i_prot.read_bool()?;
3157          f_2 = Some(val);
3158        },
3159        _ => {
3160          i_prot.skip(field_ident.field_type)?;
3161        },
3162      };
3163      i_prot.read_field_end()?;
3164    }
3165    i_prot.read_struct_end()?;
3166    verify_required_field_exists("SettingSystemServiceGetSettingItemsArgs.category", &f_1)?;
3167    verify_required_field_exists("SettingSystemServiceGetSettingItemsArgs.include_children", &f_2)?;
3168    let ret = SettingSystemServiceGetSettingItemsArgs {
3169      category: f_1.expect("auto-generated code should have checked for presence of required fields"),
3170      include_children: f_2.expect("auto-generated code should have checked for presence of required fields"),
3171    };
3172    Ok(ret)
3173  }
3174  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3175    let struct_ident = TStructIdentifier::new("GetSettingItems_args");
3176    o_prot.write_struct_begin(&struct_ident)?;
3177    o_prot.write_field_begin(&TFieldIdentifier::new("category", TType::String, 1))?;
3178    o_prot.write_string(&self.category)?;
3179    o_prot.write_field_end()?;
3180    o_prot.write_field_begin(&TFieldIdentifier::new("includeChildren", TType::Bool, 2))?;
3181    o_prot.write_bool(self.include_children)?;
3182    o_prot.write_field_end()?;
3183    o_prot.write_field_stop()?;
3184    o_prot.write_struct_end()
3185  }
3186}
3187
3188//
3189// SettingSystemServiceGetSettingItemsResult
3190//
3191
3192#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3193struct SettingSystemServiceGetSettingItemsResult {
3194  result_value: Option<Vec<common_type_s_d_k_data_types::SettingItem>>,
3195  error1: Option<common_type_s_d_k_data_types::ErrorException>,
3196}
3197
3198impl SettingSystemServiceGetSettingItemsResult {
3199  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetSettingItemsResult> {
3200    i_prot.read_struct_begin()?;
3201    let mut f_0: Option<Vec<common_type_s_d_k_data_types::SettingItem>> = None;
3202    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
3203    loop {
3204      let field_ident = i_prot.read_field_begin()?;
3205      if field_ident.field_type == TType::Stop {
3206        break;
3207      }
3208      let field_id = field_id(&field_ident)?;
3209      match field_id {
3210        0 => {
3211          let list_ident = i_prot.read_list_begin()?;
3212          let mut val: Vec<common_type_s_d_k_data_types::SettingItem> = Vec::with_capacity(list_ident.size as usize);
3213          for _ in 0..list_ident.size {
3214            let list_elem_0 = common_type_s_d_k_data_types::SettingItem::read_from_in_protocol(i_prot)?;
3215            val.push(list_elem_0);
3216          }
3217          i_prot.read_list_end()?;
3218          f_0 = Some(val);
3219        },
3220        1 => {
3221          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
3222          f_1 = Some(val);
3223        },
3224        _ => {
3225          i_prot.skip(field_ident.field_type)?;
3226        },
3227      };
3228      i_prot.read_field_end()?;
3229    }
3230    i_prot.read_struct_end()?;
3231    let ret = SettingSystemServiceGetSettingItemsResult {
3232      result_value: f_0,
3233      error1: f_1,
3234    };
3235    Ok(ret)
3236  }
3237  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3238    let struct_ident = TStructIdentifier::new("SettingSystemServiceGetSettingItemsResult");
3239    o_prot.write_struct_begin(&struct_ident)?;
3240    if let Some(ref fld_var) = self.result_value {
3241      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::List, 0))?;
3242      o_prot.write_list_begin(&TListIdentifier::new(TType::Struct, fld_var.len() as i32))?;
3243      for e in fld_var {
3244        e.write_to_out_protocol(o_prot)?;
3245        o_prot.write_list_end()?;
3246      }
3247      o_prot.write_field_end()?;
3248      ()
3249    } else {
3250      ()
3251    }
3252    if let Some(ref fld_var) = self.error1 {
3253      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
3254      fld_var.write_to_out_protocol(o_prot)?;
3255      o_prot.write_field_end()?;
3256      ()
3257    } else {
3258      ()
3259    }
3260    o_prot.write_field_stop()?;
3261    o_prot.write_struct_end()
3262  }
3263  fn ok_or(self) -> thrift::Result<Vec<common_type_s_d_k_data_types::SettingItem>> {
3264    if self.error1.is_some() {
3265      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
3266    } else if self.result_value.is_some() {
3267      Ok(self.result_value.unwrap())
3268    } else {
3269      Err(
3270        thrift::Error::Application(
3271          ApplicationError::new(
3272            ApplicationErrorKind::MissingResult,
3273            "no result received for SettingSystemServiceGetSettingItems"
3274          )
3275        )
3276      )
3277    }
3278  }
3279}
3280
3281//
3282// SettingSystemServiceSearchSettingItemsArgs
3283//
3284
3285#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3286struct SettingSystemServiceSearchSettingItemsArgs {
3287  /// Json string used to search.
3288  filter_json: String,
3289}
3290
3291impl SettingSystemServiceSearchSettingItemsArgs {
3292  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSearchSettingItemsArgs> {
3293    i_prot.read_struct_begin()?;
3294    let mut f_1: Option<String> = None;
3295    loop {
3296      let field_ident = i_prot.read_field_begin()?;
3297      if field_ident.field_type == TType::Stop {
3298        break;
3299      }
3300      let field_id = field_id(&field_ident)?;
3301      match field_id {
3302        1 => {
3303          let val = i_prot.read_string()?;
3304          f_1 = Some(val);
3305        },
3306        _ => {
3307          i_prot.skip(field_ident.field_type)?;
3308        },
3309      };
3310      i_prot.read_field_end()?;
3311    }
3312    i_prot.read_struct_end()?;
3313    verify_required_field_exists("SettingSystemServiceSearchSettingItemsArgs.filter_json", &f_1)?;
3314    let ret = SettingSystemServiceSearchSettingItemsArgs {
3315      filter_json: f_1.expect("auto-generated code should have checked for presence of required fields"),
3316    };
3317    Ok(ret)
3318  }
3319  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3320    let struct_ident = TStructIdentifier::new("SearchSettingItems_args");
3321    o_prot.write_struct_begin(&struct_ident)?;
3322    o_prot.write_field_begin(&TFieldIdentifier::new("filterJson", TType::String, 1))?;
3323    o_prot.write_string(&self.filter_json)?;
3324    o_prot.write_field_end()?;
3325    o_prot.write_field_stop()?;
3326    o_prot.write_struct_end()
3327  }
3328}
3329
3330//
3331// SettingSystemServiceSearchSettingItemsResult
3332//
3333
3334#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3335struct SettingSystemServiceSearchSettingItemsResult {
3336  result_value: Option<BTreeMap<String, setting_system_s_d_k_data_types::SettingSearchResult>>,
3337  error1: Option<common_type_s_d_k_data_types::ErrorException>,
3338}
3339
3340impl SettingSystemServiceSearchSettingItemsResult {
3341  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSearchSettingItemsResult> {
3342    i_prot.read_struct_begin()?;
3343    let mut f_0: Option<BTreeMap<String, setting_system_s_d_k_data_types::SettingSearchResult>> = None;
3344    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
3345    loop {
3346      let field_ident = i_prot.read_field_begin()?;
3347      if field_ident.field_type == TType::Stop {
3348        break;
3349      }
3350      let field_id = field_id(&field_ident)?;
3351      match field_id {
3352        0 => {
3353          let map_ident = i_prot.read_map_begin()?;
3354          let mut val: BTreeMap<String, setting_system_s_d_k_data_types::SettingSearchResult> = BTreeMap::new();
3355          for _ in 0..map_ident.size {
3356            let map_key_1 = i_prot.read_string()?;
3357            let map_val_2 = setting_system_s_d_k_data_types::SettingSearchResult::read_from_in_protocol(i_prot)?;
3358            val.insert(map_key_1, map_val_2);
3359          }
3360          i_prot.read_map_end()?;
3361          f_0 = Some(val);
3362        },
3363        1 => {
3364          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
3365          f_1 = Some(val);
3366        },
3367        _ => {
3368          i_prot.skip(field_ident.field_type)?;
3369        },
3370      };
3371      i_prot.read_field_end()?;
3372    }
3373    i_prot.read_struct_end()?;
3374    let ret = SettingSystemServiceSearchSettingItemsResult {
3375      result_value: f_0,
3376      error1: f_1,
3377    };
3378    Ok(ret)
3379  }
3380  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3381    let struct_ident = TStructIdentifier::new("SettingSystemServiceSearchSettingItemsResult");
3382    o_prot.write_struct_begin(&struct_ident)?;
3383    if let Some(ref fld_var) = self.result_value {
3384      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Map, 0))?;
3385      o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::Struct, fld_var.len() as i32))?;
3386      for (k, v) in fld_var {
3387        o_prot.write_string(k)?;
3388        v.write_to_out_protocol(o_prot)?;
3389        o_prot.write_map_end()?;
3390      }
3391      o_prot.write_field_end()?;
3392      ()
3393    } else {
3394      ()
3395    }
3396    if let Some(ref fld_var) = self.error1 {
3397      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
3398      fld_var.write_to_out_protocol(o_prot)?;
3399      o_prot.write_field_end()?;
3400      ()
3401    } else {
3402      ()
3403    }
3404    o_prot.write_field_stop()?;
3405    o_prot.write_struct_end()
3406  }
3407  fn ok_or(self) -> thrift::Result<BTreeMap<String, setting_system_s_d_k_data_types::SettingSearchResult>> {
3408    if self.error1.is_some() {
3409      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
3410    } else if self.result_value.is_some() {
3411      Ok(self.result_value.unwrap())
3412    } else {
3413      Err(
3414        thrift::Error::Application(
3415          ApplicationError::new(
3416            ApplicationErrorKind::MissingResult,
3417            "no result received for SettingSystemServiceSearchSettingItems"
3418          )
3419        )
3420      )
3421    }
3422  }
3423}
3424
3425//
3426// SettingSystemServiceGetCategoryNodeArgs
3427//
3428
3429#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3430struct SettingSystemServiceGetCategoryNodeArgs {
3431}
3432
3433impl SettingSystemServiceGetCategoryNodeArgs {
3434  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetCategoryNodeArgs> {
3435    i_prot.read_struct_begin()?;
3436    loop {
3437      let field_ident = i_prot.read_field_begin()?;
3438      if field_ident.field_type == TType::Stop {
3439        break;
3440      }
3441      let field_id = field_id(&field_ident)?;
3442      match field_id {
3443        _ => {
3444          i_prot.skip(field_ident.field_type)?;
3445        },
3446      };
3447      i_prot.read_field_end()?;
3448    }
3449    i_prot.read_struct_end()?;
3450    let ret = SettingSystemServiceGetCategoryNodeArgs {};
3451    Ok(ret)
3452  }
3453  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3454    let struct_ident = TStructIdentifier::new("GetCategoryNode_args");
3455    o_prot.write_struct_begin(&struct_ident)?;
3456    o_prot.write_field_stop()?;
3457    o_prot.write_struct_end()
3458  }
3459}
3460
3461//
3462// SettingSystemServiceGetCategoryNodeResult
3463//
3464
3465#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3466struct SettingSystemServiceGetCategoryNodeResult {
3467  result_value: Option<setting_system_s_d_k_data_types::SettingTree>,
3468  error1: Option<common_type_s_d_k_data_types::ErrorException>,
3469}
3470
3471impl SettingSystemServiceGetCategoryNodeResult {
3472  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetCategoryNodeResult> {
3473    i_prot.read_struct_begin()?;
3474    let mut f_0: Option<setting_system_s_d_k_data_types::SettingTree> = None;
3475    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
3476    loop {
3477      let field_ident = i_prot.read_field_begin()?;
3478      if field_ident.field_type == TType::Stop {
3479        break;
3480      }
3481      let field_id = field_id(&field_ident)?;
3482      match field_id {
3483        0 => {
3484          let val = setting_system_s_d_k_data_types::SettingTree::read_from_in_protocol(i_prot)?;
3485          f_0 = Some(val);
3486        },
3487        1 => {
3488          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
3489          f_1 = Some(val);
3490        },
3491        _ => {
3492          i_prot.skip(field_ident.field_type)?;
3493        },
3494      };
3495      i_prot.read_field_end()?;
3496    }
3497    i_prot.read_struct_end()?;
3498    let ret = SettingSystemServiceGetCategoryNodeResult {
3499      result_value: f_0,
3500      error1: f_1,
3501    };
3502    Ok(ret)
3503  }
3504  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3505    let struct_ident = TStructIdentifier::new("SettingSystemServiceGetCategoryNodeResult");
3506    o_prot.write_struct_begin(&struct_ident)?;
3507    if let Some(ref fld_var) = self.result_value {
3508      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
3509      fld_var.write_to_out_protocol(o_prot)?;
3510      o_prot.write_field_end()?;
3511      ()
3512    } else {
3513      ()
3514    }
3515    if let Some(ref fld_var) = self.error1 {
3516      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
3517      fld_var.write_to_out_protocol(o_prot)?;
3518      o_prot.write_field_end()?;
3519      ()
3520    } else {
3521      ()
3522    }
3523    o_prot.write_field_stop()?;
3524    o_prot.write_struct_end()
3525  }
3526  fn ok_or(self) -> thrift::Result<setting_system_s_d_k_data_types::SettingTree> {
3527    if self.error1.is_some() {
3528      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
3529    } else if self.result_value.is_some() {
3530      Ok(self.result_value.unwrap())
3531    } else {
3532      Err(
3533        thrift::Error::Application(
3534          ApplicationError::new(
3535            ApplicationErrorKind::MissingResult,
3536            "no result received for SettingSystemServiceGetCategoryNode"
3537          )
3538        )
3539      )
3540    }
3541  }
3542}
3543
3544//
3545// SettingSystemServiceGetChildNodeArgs
3546//
3547
3548#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3549struct SettingSystemServiceGetChildNodeArgs {
3550  /// The parent node
3551  parent: String,
3552  /// Specifies whether the child nodes containing setting item or setting category, or both
3553  node_type: setting_system_s_d_k_data_types::NodeType,
3554  /// The parameter passed to the function which will be called while getting the item value
3555  param: String,
3556  /// Tags used to filter the setting items. Only items with specified tags will be added in the result
3557  tags: Vec<String>,
3558}
3559
3560impl SettingSystemServiceGetChildNodeArgs {
3561  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetChildNodeArgs> {
3562    i_prot.read_struct_begin()?;
3563    let mut f_1: Option<String> = None;
3564    let mut f_2: Option<setting_system_s_d_k_data_types::NodeType> = None;
3565    let mut f_3: Option<String> = None;
3566    let mut f_4: Option<Vec<String>> = None;
3567    loop {
3568      let field_ident = i_prot.read_field_begin()?;
3569      if field_ident.field_type == TType::Stop {
3570        break;
3571      }
3572      let field_id = field_id(&field_ident)?;
3573      match field_id {
3574        1 => {
3575          let val = i_prot.read_string()?;
3576          f_1 = Some(val);
3577        },
3578        2 => {
3579          let val = setting_system_s_d_k_data_types::NodeType::read_from_in_protocol(i_prot)?;
3580          f_2 = Some(val);
3581        },
3582        3 => {
3583          let val = i_prot.read_string()?;
3584          f_3 = Some(val);
3585        },
3586        4 => {
3587          let list_ident = i_prot.read_list_begin()?;
3588          let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
3589          for _ in 0..list_ident.size {
3590            let list_elem_3 = i_prot.read_string()?;
3591            val.push(list_elem_3);
3592          }
3593          i_prot.read_list_end()?;
3594          f_4 = Some(val);
3595        },
3596        _ => {
3597          i_prot.skip(field_ident.field_type)?;
3598        },
3599      };
3600      i_prot.read_field_end()?;
3601    }
3602    i_prot.read_struct_end()?;
3603    verify_required_field_exists("SettingSystemServiceGetChildNodeArgs.parent", &f_1)?;
3604    verify_required_field_exists("SettingSystemServiceGetChildNodeArgs.node_type", &f_2)?;
3605    verify_required_field_exists("SettingSystemServiceGetChildNodeArgs.param", &f_3)?;
3606    verify_required_field_exists("SettingSystemServiceGetChildNodeArgs.tags", &f_4)?;
3607    let ret = SettingSystemServiceGetChildNodeArgs {
3608      parent: f_1.expect("auto-generated code should have checked for presence of required fields"),
3609      node_type: f_2.expect("auto-generated code should have checked for presence of required fields"),
3610      param: f_3.expect("auto-generated code should have checked for presence of required fields"),
3611      tags: f_4.expect("auto-generated code should have checked for presence of required fields"),
3612    };
3613    Ok(ret)
3614  }
3615  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3616    let struct_ident = TStructIdentifier::new("GetChildNode_args");
3617    o_prot.write_struct_begin(&struct_ident)?;
3618    o_prot.write_field_begin(&TFieldIdentifier::new("parent", TType::String, 1))?;
3619    o_prot.write_string(&self.parent)?;
3620    o_prot.write_field_end()?;
3621    o_prot.write_field_begin(&TFieldIdentifier::new("nodeType", TType::I32, 2))?;
3622    self.node_type.write_to_out_protocol(o_prot)?;
3623    o_prot.write_field_end()?;
3624    o_prot.write_field_begin(&TFieldIdentifier::new("param", TType::String, 3))?;
3625    o_prot.write_string(&self.param)?;
3626    o_prot.write_field_end()?;
3627    o_prot.write_field_begin(&TFieldIdentifier::new("tags", TType::List, 4))?;
3628    o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.tags.len() as i32))?;
3629    for e in &self.tags {
3630      o_prot.write_string(e)?;
3631      o_prot.write_list_end()?;
3632    }
3633    o_prot.write_field_end()?;
3634    o_prot.write_field_stop()?;
3635    o_prot.write_struct_end()
3636  }
3637}
3638
3639//
3640// SettingSystemServiceGetChildNodeResult
3641//
3642
3643#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3644struct SettingSystemServiceGetChildNodeResult {
3645  result_value: Option<setting_system_s_d_k_data_types::NodeList>,
3646  error1: Option<common_type_s_d_k_data_types::ErrorException>,
3647}
3648
3649impl SettingSystemServiceGetChildNodeResult {
3650  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetChildNodeResult> {
3651    i_prot.read_struct_begin()?;
3652    let mut f_0: Option<setting_system_s_d_k_data_types::NodeList> = None;
3653    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
3654    loop {
3655      let field_ident = i_prot.read_field_begin()?;
3656      if field_ident.field_type == TType::Stop {
3657        break;
3658      }
3659      let field_id = field_id(&field_ident)?;
3660      match field_id {
3661        0 => {
3662          let val = setting_system_s_d_k_data_types::NodeList::read_from_in_protocol(i_prot)?;
3663          f_0 = Some(val);
3664        },
3665        1 => {
3666          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
3667          f_1 = Some(val);
3668        },
3669        _ => {
3670          i_prot.skip(field_ident.field_type)?;
3671        },
3672      };
3673      i_prot.read_field_end()?;
3674    }
3675    i_prot.read_struct_end()?;
3676    let ret = SettingSystemServiceGetChildNodeResult {
3677      result_value: f_0,
3678      error1: f_1,
3679    };
3680    Ok(ret)
3681  }
3682  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3683    let struct_ident = TStructIdentifier::new("SettingSystemServiceGetChildNodeResult");
3684    o_prot.write_struct_begin(&struct_ident)?;
3685    if let Some(ref fld_var) = self.result_value {
3686      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
3687      fld_var.write_to_out_protocol(o_prot)?;
3688      o_prot.write_field_end()?;
3689      ()
3690    } else {
3691      ()
3692    }
3693    if let Some(ref fld_var) = self.error1 {
3694      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
3695      fld_var.write_to_out_protocol(o_prot)?;
3696      o_prot.write_field_end()?;
3697      ()
3698    } else {
3699      ()
3700    }
3701    o_prot.write_field_stop()?;
3702    o_prot.write_struct_end()
3703  }
3704  fn ok_or(self) -> thrift::Result<setting_system_s_d_k_data_types::NodeList> {
3705    if self.error1.is_some() {
3706      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
3707    } else if self.result_value.is_some() {
3708      Ok(self.result_value.unwrap())
3709    } else {
3710      Err(
3711        thrift::Error::Application(
3712          ApplicationError::new(
3713            ApplicationErrorKind::MissingResult,
3714            "no result received for SettingSystemServiceGetChildNode"
3715          )
3716        )
3717      )
3718    }
3719  }
3720}
3721
3722//
3723// SettingSystemServiceSetSettingItemArgs
3724//
3725
3726#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3727struct SettingSystemServiceSetSettingItemArgs {
3728  /// Identity of the setting
3729  key: String,
3730  /// Value to be set
3731  val: String,
3732}
3733
3734impl SettingSystemServiceSetSettingItemArgs {
3735  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSetSettingItemArgs> {
3736    i_prot.read_struct_begin()?;
3737    let mut f_1: Option<String> = None;
3738    let mut f_2: Option<String> = None;
3739    loop {
3740      let field_ident = i_prot.read_field_begin()?;
3741      if field_ident.field_type == TType::Stop {
3742        break;
3743      }
3744      let field_id = field_id(&field_ident)?;
3745      match field_id {
3746        1 => {
3747          let val = i_prot.read_string()?;
3748          f_1 = Some(val);
3749        },
3750        2 => {
3751          let val = i_prot.read_string()?;
3752          f_2 = Some(val);
3753        },
3754        _ => {
3755          i_prot.skip(field_ident.field_type)?;
3756        },
3757      };
3758      i_prot.read_field_end()?;
3759    }
3760    i_prot.read_struct_end()?;
3761    verify_required_field_exists("SettingSystemServiceSetSettingItemArgs.key", &f_1)?;
3762    verify_required_field_exists("SettingSystemServiceSetSettingItemArgs.val", &f_2)?;
3763    let ret = SettingSystemServiceSetSettingItemArgs {
3764      key: f_1.expect("auto-generated code should have checked for presence of required fields"),
3765      val: f_2.expect("auto-generated code should have checked for presence of required fields"),
3766    };
3767    Ok(ret)
3768  }
3769  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3770    let struct_ident = TStructIdentifier::new("SetSettingItem_args");
3771    o_prot.write_struct_begin(&struct_ident)?;
3772    o_prot.write_field_begin(&TFieldIdentifier::new("key", TType::String, 1))?;
3773    o_prot.write_string(&self.key)?;
3774    o_prot.write_field_end()?;
3775    o_prot.write_field_begin(&TFieldIdentifier::new("val", TType::String, 2))?;
3776    o_prot.write_string(&self.val)?;
3777    o_prot.write_field_end()?;
3778    o_prot.write_field_stop()?;
3779    o_prot.write_struct_end()
3780  }
3781}
3782
3783//
3784// SettingSystemServiceSetSettingItemResult
3785//
3786
3787#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3788struct SettingSystemServiceSetSettingItemResult {
3789  result_value: Option<bool>,
3790  error1: Option<common_type_s_d_k_data_types::ErrorException>,
3791}
3792
3793impl SettingSystemServiceSetSettingItemResult {
3794  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSetSettingItemResult> {
3795    i_prot.read_struct_begin()?;
3796    let mut f_0: Option<bool> = None;
3797    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
3798    loop {
3799      let field_ident = i_prot.read_field_begin()?;
3800      if field_ident.field_type == TType::Stop {
3801        break;
3802      }
3803      let field_id = field_id(&field_ident)?;
3804      match field_id {
3805        0 => {
3806          let val = i_prot.read_bool()?;
3807          f_0 = Some(val);
3808        },
3809        1 => {
3810          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
3811          f_1 = Some(val);
3812        },
3813        _ => {
3814          i_prot.skip(field_ident.field_type)?;
3815        },
3816      };
3817      i_prot.read_field_end()?;
3818    }
3819    i_prot.read_struct_end()?;
3820    let ret = SettingSystemServiceSetSettingItemResult {
3821      result_value: f_0,
3822      error1: f_1,
3823    };
3824    Ok(ret)
3825  }
3826  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3827    let struct_ident = TStructIdentifier::new("SettingSystemServiceSetSettingItemResult");
3828    o_prot.write_struct_begin(&struct_ident)?;
3829    if let Some(fld_var) = self.result_value {
3830      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
3831      o_prot.write_bool(fld_var)?;
3832      o_prot.write_field_end()?;
3833      ()
3834    } else {
3835      ()
3836    }
3837    if let Some(ref fld_var) = self.error1 {
3838      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
3839      fld_var.write_to_out_protocol(o_prot)?;
3840      o_prot.write_field_end()?;
3841      ()
3842    } else {
3843      ()
3844    }
3845    o_prot.write_field_stop()?;
3846    o_prot.write_struct_end()
3847  }
3848  fn ok_or(self) -> thrift::Result<bool> {
3849    if self.error1.is_some() {
3850      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
3851    } else if self.result_value.is_some() {
3852      Ok(self.result_value.unwrap())
3853    } else {
3854      Err(
3855        thrift::Error::Application(
3856          ApplicationError::new(
3857            ApplicationErrorKind::MissingResult,
3858            "no result received for SettingSystemServiceSetSettingItem"
3859          )
3860        )
3861      )
3862    }
3863  }
3864}
3865
3866//
3867// SettingSystemServiceSetSettingItemsArgs
3868//
3869
3870#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3871struct SettingSystemServiceSetSettingItemsArgs {
3872  /// The key-values to be set.
3873  key_values: BTreeMap<String, String>,
3874}
3875
3876impl SettingSystemServiceSetSettingItemsArgs {
3877  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSetSettingItemsArgs> {
3878    i_prot.read_struct_begin()?;
3879    let mut f_1: Option<BTreeMap<String, String>> = None;
3880    loop {
3881      let field_ident = i_prot.read_field_begin()?;
3882      if field_ident.field_type == TType::Stop {
3883        break;
3884      }
3885      let field_id = field_id(&field_ident)?;
3886      match field_id {
3887        1 => {
3888          let map_ident = i_prot.read_map_begin()?;
3889          let mut val: BTreeMap<String, String> = BTreeMap::new();
3890          for _ in 0..map_ident.size {
3891            let map_key_4 = i_prot.read_string()?;
3892            let map_val_5 = i_prot.read_string()?;
3893            val.insert(map_key_4, map_val_5);
3894          }
3895          i_prot.read_map_end()?;
3896          f_1 = Some(val);
3897        },
3898        _ => {
3899          i_prot.skip(field_ident.field_type)?;
3900        },
3901      };
3902      i_prot.read_field_end()?;
3903    }
3904    i_prot.read_struct_end()?;
3905    verify_required_field_exists("SettingSystemServiceSetSettingItemsArgs.key_values", &f_1)?;
3906    let ret = SettingSystemServiceSetSettingItemsArgs {
3907      key_values: f_1.expect("auto-generated code should have checked for presence of required fields"),
3908    };
3909    Ok(ret)
3910  }
3911  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3912    let struct_ident = TStructIdentifier::new("SetSettingItems_args");
3913    o_prot.write_struct_begin(&struct_ident)?;
3914    o_prot.write_field_begin(&TFieldIdentifier::new("keyValues", TType::Map, 1))?;
3915    o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::String, self.key_values.len() as i32))?;
3916    for (k, v) in &self.key_values {
3917      o_prot.write_string(k)?;
3918      o_prot.write_string(v)?;
3919      o_prot.write_map_end()?;
3920    }
3921    o_prot.write_field_end()?;
3922    o_prot.write_field_stop()?;
3923    o_prot.write_struct_end()
3924  }
3925}
3926
3927//
3928// SettingSystemServiceSetSettingItemsResult
3929//
3930
3931#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3932struct SettingSystemServiceSetSettingItemsResult {
3933  result_value: Option<i32>,
3934  error1: Option<common_type_s_d_k_data_types::ErrorException>,
3935}
3936
3937impl SettingSystemServiceSetSettingItemsResult {
3938  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSetSettingItemsResult> {
3939    i_prot.read_struct_begin()?;
3940    let mut f_0: Option<i32> = None;
3941    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
3942    loop {
3943      let field_ident = i_prot.read_field_begin()?;
3944      if field_ident.field_type == TType::Stop {
3945        break;
3946      }
3947      let field_id = field_id(&field_ident)?;
3948      match field_id {
3949        0 => {
3950          let val = i_prot.read_i32()?;
3951          f_0 = Some(val);
3952        },
3953        1 => {
3954          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
3955          f_1 = Some(val);
3956        },
3957        _ => {
3958          i_prot.skip(field_ident.field_type)?;
3959        },
3960      };
3961      i_prot.read_field_end()?;
3962    }
3963    i_prot.read_struct_end()?;
3964    let ret = SettingSystemServiceSetSettingItemsResult {
3965      result_value: f_0,
3966      error1: f_1,
3967    };
3968    Ok(ret)
3969  }
3970  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
3971    let struct_ident = TStructIdentifier::new("SettingSystemServiceSetSettingItemsResult");
3972    o_prot.write_struct_begin(&struct_ident)?;
3973    if let Some(fld_var) = self.result_value {
3974      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::I32, 0))?;
3975      o_prot.write_i32(fld_var)?;
3976      o_prot.write_field_end()?;
3977      ()
3978    } else {
3979      ()
3980    }
3981    if let Some(ref fld_var) = self.error1 {
3982      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
3983      fld_var.write_to_out_protocol(o_prot)?;
3984      o_prot.write_field_end()?;
3985      ()
3986    } else {
3987      ()
3988    }
3989    o_prot.write_field_stop()?;
3990    o_prot.write_struct_end()
3991  }
3992  fn ok_or(self) -> thrift::Result<i32> {
3993    if self.error1.is_some() {
3994      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
3995    } else if self.result_value.is_some() {
3996      Ok(self.result_value.unwrap())
3997    } else {
3998      Err(
3999        thrift::Error::Application(
4000          ApplicationError::new(
4001            ApplicationErrorKind::MissingResult,
4002            "no result received for SettingSystemServiceSetSettingItems"
4003          )
4004        )
4005      )
4006    }
4007  }
4008}
4009
4010//
4011// SettingSystemServiceRestoreDefaultArgs
4012//
4013
4014#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4015struct SettingSystemServiceRestoreDefaultArgs {
4016  /// Module name specifies the module to be restored.
4017  module_name: String,
4018  /// The category of which to restored. Null indicates all settings.
4019  category: String,
4020}
4021
4022impl SettingSystemServiceRestoreDefaultArgs {
4023  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRestoreDefaultArgs> {
4024    i_prot.read_struct_begin()?;
4025    let mut f_1: Option<String> = None;
4026    let mut f_2: Option<String> = None;
4027    loop {
4028      let field_ident = i_prot.read_field_begin()?;
4029      if field_ident.field_type == TType::Stop {
4030        break;
4031      }
4032      let field_id = field_id(&field_ident)?;
4033      match field_id {
4034        1 => {
4035          let val = i_prot.read_string()?;
4036          f_1 = Some(val);
4037        },
4038        2 => {
4039          let val = i_prot.read_string()?;
4040          f_2 = Some(val);
4041        },
4042        _ => {
4043          i_prot.skip(field_ident.field_type)?;
4044        },
4045      };
4046      i_prot.read_field_end()?;
4047    }
4048    i_prot.read_struct_end()?;
4049    verify_required_field_exists("SettingSystemServiceRestoreDefaultArgs.module_name", &f_1)?;
4050    verify_required_field_exists("SettingSystemServiceRestoreDefaultArgs.category", &f_2)?;
4051    let ret = SettingSystemServiceRestoreDefaultArgs {
4052      module_name: f_1.expect("auto-generated code should have checked for presence of required fields"),
4053      category: f_2.expect("auto-generated code should have checked for presence of required fields"),
4054    };
4055    Ok(ret)
4056  }
4057  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4058    let struct_ident = TStructIdentifier::new("RestoreDefault_args");
4059    o_prot.write_struct_begin(&struct_ident)?;
4060    o_prot.write_field_begin(&TFieldIdentifier::new("moduleName", TType::String, 1))?;
4061    o_prot.write_string(&self.module_name)?;
4062    o_prot.write_field_end()?;
4063    o_prot.write_field_begin(&TFieldIdentifier::new("category", TType::String, 2))?;
4064    o_prot.write_string(&self.category)?;
4065    o_prot.write_field_end()?;
4066    o_prot.write_field_stop()?;
4067    o_prot.write_struct_end()
4068  }
4069}
4070
4071//
4072// SettingSystemServiceRestoreDefaultResult
4073//
4074
4075#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4076struct SettingSystemServiceRestoreDefaultResult {
4077  result_value: Option<bool>,
4078  error1: Option<common_type_s_d_k_data_types::ErrorException>,
4079}
4080
4081impl SettingSystemServiceRestoreDefaultResult {
4082  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRestoreDefaultResult> {
4083    i_prot.read_struct_begin()?;
4084    let mut f_0: Option<bool> = None;
4085    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
4086    loop {
4087      let field_ident = i_prot.read_field_begin()?;
4088      if field_ident.field_type == TType::Stop {
4089        break;
4090      }
4091      let field_id = field_id(&field_ident)?;
4092      match field_id {
4093        0 => {
4094          let val = i_prot.read_bool()?;
4095          f_0 = Some(val);
4096        },
4097        1 => {
4098          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
4099          f_1 = Some(val);
4100        },
4101        _ => {
4102          i_prot.skip(field_ident.field_type)?;
4103        },
4104      };
4105      i_prot.read_field_end()?;
4106    }
4107    i_prot.read_struct_end()?;
4108    let ret = SettingSystemServiceRestoreDefaultResult {
4109      result_value: f_0,
4110      error1: f_1,
4111    };
4112    Ok(ret)
4113  }
4114  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4115    let struct_ident = TStructIdentifier::new("SettingSystemServiceRestoreDefaultResult");
4116    o_prot.write_struct_begin(&struct_ident)?;
4117    if let Some(fld_var) = self.result_value {
4118      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
4119      o_prot.write_bool(fld_var)?;
4120      o_prot.write_field_end()?;
4121      ()
4122    } else {
4123      ()
4124    }
4125    if let Some(ref fld_var) = self.error1 {
4126      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
4127      fld_var.write_to_out_protocol(o_prot)?;
4128      o_prot.write_field_end()?;
4129      ()
4130    } else {
4131      ()
4132    }
4133    o_prot.write_field_stop()?;
4134    o_prot.write_struct_end()
4135  }
4136  fn ok_or(self) -> thrift::Result<bool> {
4137    if self.error1.is_some() {
4138      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
4139    } else if self.result_value.is_some() {
4140      Ok(self.result_value.unwrap())
4141    } else {
4142      Err(
4143        thrift::Error::Application(
4144          ApplicationError::new(
4145            ApplicationErrorKind::MissingResult,
4146            "no result received for SettingSystemServiceRestoreDefault"
4147          )
4148        )
4149      )
4150    }
4151  }
4152}
4153
4154//
4155// SettingSystemServiceRestoreUserDefaultArgs
4156//
4157
4158#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4159struct SettingSystemServiceRestoreUserDefaultArgs {
4160  /// @RestoreUserDefault_userId_desc
4161  user_id: String,
4162  /// @RestoreUserDefault_moduleName_desc
4163  module_name: String,
4164  /// @RestoreUserDefault_category_desc
4165  category: String,
4166}
4167
4168impl SettingSystemServiceRestoreUserDefaultArgs {
4169  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRestoreUserDefaultArgs> {
4170    i_prot.read_struct_begin()?;
4171    let mut f_1: Option<String> = None;
4172    let mut f_2: Option<String> = None;
4173    let mut f_3: Option<String> = None;
4174    loop {
4175      let field_ident = i_prot.read_field_begin()?;
4176      if field_ident.field_type == TType::Stop {
4177        break;
4178      }
4179      let field_id = field_id(&field_ident)?;
4180      match field_id {
4181        1 => {
4182          let val = i_prot.read_string()?;
4183          f_1 = Some(val);
4184        },
4185        2 => {
4186          let val = i_prot.read_string()?;
4187          f_2 = Some(val);
4188        },
4189        3 => {
4190          let val = i_prot.read_string()?;
4191          f_3 = Some(val);
4192        },
4193        _ => {
4194          i_prot.skip(field_ident.field_type)?;
4195        },
4196      };
4197      i_prot.read_field_end()?;
4198    }
4199    i_prot.read_struct_end()?;
4200    verify_required_field_exists("SettingSystemServiceRestoreUserDefaultArgs.user_id", &f_1)?;
4201    verify_required_field_exists("SettingSystemServiceRestoreUserDefaultArgs.module_name", &f_2)?;
4202    verify_required_field_exists("SettingSystemServiceRestoreUserDefaultArgs.category", &f_3)?;
4203    let ret = SettingSystemServiceRestoreUserDefaultArgs {
4204      user_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
4205      module_name: f_2.expect("auto-generated code should have checked for presence of required fields"),
4206      category: f_3.expect("auto-generated code should have checked for presence of required fields"),
4207    };
4208    Ok(ret)
4209  }
4210  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4211    let struct_ident = TStructIdentifier::new("RestoreUserDefault_args");
4212    o_prot.write_struct_begin(&struct_ident)?;
4213    o_prot.write_field_begin(&TFieldIdentifier::new("userId", TType::String, 1))?;
4214    o_prot.write_string(&self.user_id)?;
4215    o_prot.write_field_end()?;
4216    o_prot.write_field_begin(&TFieldIdentifier::new("moduleName", TType::String, 2))?;
4217    o_prot.write_string(&self.module_name)?;
4218    o_prot.write_field_end()?;
4219    o_prot.write_field_begin(&TFieldIdentifier::new("category", TType::String, 3))?;
4220    o_prot.write_string(&self.category)?;
4221    o_prot.write_field_end()?;
4222    o_prot.write_field_stop()?;
4223    o_prot.write_struct_end()
4224  }
4225}
4226
4227//
4228// SettingSystemServiceRestoreUserDefaultResult
4229//
4230
4231#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4232struct SettingSystemServiceRestoreUserDefaultResult {
4233  result_value: Option<bool>,
4234  error1: Option<common_type_s_d_k_data_types::ErrorException>,
4235}
4236
4237impl SettingSystemServiceRestoreUserDefaultResult {
4238  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRestoreUserDefaultResult> {
4239    i_prot.read_struct_begin()?;
4240    let mut f_0: Option<bool> = None;
4241    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
4242    loop {
4243      let field_ident = i_prot.read_field_begin()?;
4244      if field_ident.field_type == TType::Stop {
4245        break;
4246      }
4247      let field_id = field_id(&field_ident)?;
4248      match field_id {
4249        0 => {
4250          let val = i_prot.read_bool()?;
4251          f_0 = Some(val);
4252        },
4253        1 => {
4254          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
4255          f_1 = Some(val);
4256        },
4257        _ => {
4258          i_prot.skip(field_ident.field_type)?;
4259        },
4260      };
4261      i_prot.read_field_end()?;
4262    }
4263    i_prot.read_struct_end()?;
4264    let ret = SettingSystemServiceRestoreUserDefaultResult {
4265      result_value: f_0,
4266      error1: f_1,
4267    };
4268    Ok(ret)
4269  }
4270  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4271    let struct_ident = TStructIdentifier::new("SettingSystemServiceRestoreUserDefaultResult");
4272    o_prot.write_struct_begin(&struct_ident)?;
4273    if let Some(fld_var) = self.result_value {
4274      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
4275      o_prot.write_bool(fld_var)?;
4276      o_prot.write_field_end()?;
4277      ()
4278    } else {
4279      ()
4280    }
4281    if let Some(ref fld_var) = self.error1 {
4282      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
4283      fld_var.write_to_out_protocol(o_prot)?;
4284      o_prot.write_field_end()?;
4285      ()
4286    } else {
4287      ()
4288    }
4289    o_prot.write_field_stop()?;
4290    o_prot.write_struct_end()
4291  }
4292  fn ok_or(self) -> thrift::Result<bool> {
4293    if self.error1.is_some() {
4294      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
4295    } else if self.result_value.is_some() {
4296      Ok(self.result_value.unwrap())
4297    } else {
4298      Err(
4299        thrift::Error::Application(
4300          ApplicationError::new(
4301            ApplicationErrorKind::MissingResult,
4302            "no result received for SettingSystemServiceRestoreUserDefault"
4303          )
4304        )
4305      )
4306    }
4307  }
4308}
4309
4310//
4311// SettingSystemServiceUpdateModuleVersionArgs
4312//
4313
4314#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4315struct SettingSystemServiceUpdateModuleVersionArgs {
4316  /// Module of the setting
4317  module_name: String,
4318}
4319
4320impl SettingSystemServiceUpdateModuleVersionArgs {
4321  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceUpdateModuleVersionArgs> {
4322    i_prot.read_struct_begin()?;
4323    let mut f_1: Option<String> = None;
4324    loop {
4325      let field_ident = i_prot.read_field_begin()?;
4326      if field_ident.field_type == TType::Stop {
4327        break;
4328      }
4329      let field_id = field_id(&field_ident)?;
4330      match field_id {
4331        1 => {
4332          let val = i_prot.read_string()?;
4333          f_1 = Some(val);
4334        },
4335        _ => {
4336          i_prot.skip(field_ident.field_type)?;
4337        },
4338      };
4339      i_prot.read_field_end()?;
4340    }
4341    i_prot.read_struct_end()?;
4342    verify_required_field_exists("SettingSystemServiceUpdateModuleVersionArgs.module_name", &f_1)?;
4343    let ret = SettingSystemServiceUpdateModuleVersionArgs {
4344      module_name: f_1.expect("auto-generated code should have checked for presence of required fields"),
4345    };
4346    Ok(ret)
4347  }
4348  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4349    let struct_ident = TStructIdentifier::new("UpdateModuleVersion_args");
4350    o_prot.write_struct_begin(&struct_ident)?;
4351    o_prot.write_field_begin(&TFieldIdentifier::new("moduleName", TType::String, 1))?;
4352    o_prot.write_string(&self.module_name)?;
4353    o_prot.write_field_end()?;
4354    o_prot.write_field_stop()?;
4355    o_prot.write_struct_end()
4356  }
4357}
4358
4359//
4360// SettingSystemServiceUpdateModuleVersionResult
4361//
4362
4363#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4364struct SettingSystemServiceUpdateModuleVersionResult {
4365  result_value: Option<bool>,
4366  error1: Option<common_type_s_d_k_data_types::ErrorException>,
4367}
4368
4369impl SettingSystemServiceUpdateModuleVersionResult {
4370  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceUpdateModuleVersionResult> {
4371    i_prot.read_struct_begin()?;
4372    let mut f_0: Option<bool> = None;
4373    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
4374    loop {
4375      let field_ident = i_prot.read_field_begin()?;
4376      if field_ident.field_type == TType::Stop {
4377        break;
4378      }
4379      let field_id = field_id(&field_ident)?;
4380      match field_id {
4381        0 => {
4382          let val = i_prot.read_bool()?;
4383          f_0 = Some(val);
4384        },
4385        1 => {
4386          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
4387          f_1 = Some(val);
4388        },
4389        _ => {
4390          i_prot.skip(field_ident.field_type)?;
4391        },
4392      };
4393      i_prot.read_field_end()?;
4394    }
4395    i_prot.read_struct_end()?;
4396    let ret = SettingSystemServiceUpdateModuleVersionResult {
4397      result_value: f_0,
4398      error1: f_1,
4399    };
4400    Ok(ret)
4401  }
4402  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4403    let struct_ident = TStructIdentifier::new("SettingSystemServiceUpdateModuleVersionResult");
4404    o_prot.write_struct_begin(&struct_ident)?;
4405    if let Some(fld_var) = self.result_value {
4406      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
4407      o_prot.write_bool(fld_var)?;
4408      o_prot.write_field_end()?;
4409      ()
4410    } else {
4411      ()
4412    }
4413    if let Some(ref fld_var) = self.error1 {
4414      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
4415      fld_var.write_to_out_protocol(o_prot)?;
4416      o_prot.write_field_end()?;
4417      ()
4418    } else {
4419      ()
4420    }
4421    o_prot.write_field_stop()?;
4422    o_prot.write_struct_end()
4423  }
4424  fn ok_or(self) -> thrift::Result<bool> {
4425    if self.error1.is_some() {
4426      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
4427    } else if self.result_value.is_some() {
4428      Ok(self.result_value.unwrap())
4429    } else {
4430      Err(
4431        thrift::Error::Application(
4432          ApplicationError::new(
4433            ApplicationErrorKind::MissingResult,
4434            "no result received for SettingSystemServiceUpdateModuleVersion"
4435          )
4436        )
4437      )
4438    }
4439  }
4440}
4441
4442//
4443// SettingSystemServiceSetUserAppDataArgs
4444//
4445
4446#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4447struct SettingSystemServiceSetUserAppDataArgs {
4448  /// @SetUserAppData_userId_desc
4449  user_id: String,
4450  /// @SetUserAppData_category_desc
4451  category: String,
4452  /// @SetUserAppData_settingItems_desc
4453  setting_items: BTreeMap<String, common_type_s_d_k_data_types::SettingValue>,
4454}
4455
4456impl SettingSystemServiceSetUserAppDataArgs {
4457  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSetUserAppDataArgs> {
4458    i_prot.read_struct_begin()?;
4459    let mut f_1: Option<String> = None;
4460    let mut f_2: Option<String> = None;
4461    let mut f_3: Option<BTreeMap<String, common_type_s_d_k_data_types::SettingValue>> = None;
4462    loop {
4463      let field_ident = i_prot.read_field_begin()?;
4464      if field_ident.field_type == TType::Stop {
4465        break;
4466      }
4467      let field_id = field_id(&field_ident)?;
4468      match field_id {
4469        1 => {
4470          let val = i_prot.read_string()?;
4471          f_1 = Some(val);
4472        },
4473        2 => {
4474          let val = i_prot.read_string()?;
4475          f_2 = Some(val);
4476        },
4477        3 => {
4478          let map_ident = i_prot.read_map_begin()?;
4479          let mut val: BTreeMap<String, common_type_s_d_k_data_types::SettingValue> = BTreeMap::new();
4480          for _ in 0..map_ident.size {
4481            let map_key_6 = i_prot.read_string()?;
4482            let map_val_7 = common_type_s_d_k_data_types::SettingValue::read_from_in_protocol(i_prot)?;
4483            val.insert(map_key_6, map_val_7);
4484          }
4485          i_prot.read_map_end()?;
4486          f_3 = Some(val);
4487        },
4488        _ => {
4489          i_prot.skip(field_ident.field_type)?;
4490        },
4491      };
4492      i_prot.read_field_end()?;
4493    }
4494    i_prot.read_struct_end()?;
4495    verify_required_field_exists("SettingSystemServiceSetUserAppDataArgs.user_id", &f_1)?;
4496    verify_required_field_exists("SettingSystemServiceSetUserAppDataArgs.category", &f_2)?;
4497    verify_required_field_exists("SettingSystemServiceSetUserAppDataArgs.setting_items", &f_3)?;
4498    let ret = SettingSystemServiceSetUserAppDataArgs {
4499      user_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
4500      category: f_2.expect("auto-generated code should have checked for presence of required fields"),
4501      setting_items: f_3.expect("auto-generated code should have checked for presence of required fields"),
4502    };
4503    Ok(ret)
4504  }
4505  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4506    let struct_ident = TStructIdentifier::new("SetUserAppData_args");
4507    o_prot.write_struct_begin(&struct_ident)?;
4508    o_prot.write_field_begin(&TFieldIdentifier::new("userId", TType::String, 1))?;
4509    o_prot.write_string(&self.user_id)?;
4510    o_prot.write_field_end()?;
4511    o_prot.write_field_begin(&TFieldIdentifier::new("category", TType::String, 2))?;
4512    o_prot.write_string(&self.category)?;
4513    o_prot.write_field_end()?;
4514    o_prot.write_field_begin(&TFieldIdentifier::new("settingItems", TType::Map, 3))?;
4515    o_prot.write_map_begin(&TMapIdentifier::new(TType::String, TType::Struct, self.setting_items.len() as i32))?;
4516    for (k, v) in &self.setting_items {
4517      o_prot.write_string(k)?;
4518      v.write_to_out_protocol(o_prot)?;
4519      o_prot.write_map_end()?;
4520    }
4521    o_prot.write_field_end()?;
4522    o_prot.write_field_stop()?;
4523    o_prot.write_struct_end()
4524  }
4525}
4526
4527//
4528// SettingSystemServiceSetUserAppDataResult
4529//
4530
4531#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4532struct SettingSystemServiceSetUserAppDataResult {
4533  result_value: Option<i32>,
4534  error1: Option<common_type_s_d_k_data_types::ErrorException>,
4535}
4536
4537impl SettingSystemServiceSetUserAppDataResult {
4538  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSetUserAppDataResult> {
4539    i_prot.read_struct_begin()?;
4540    let mut f_0: Option<i32> = None;
4541    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
4542    loop {
4543      let field_ident = i_prot.read_field_begin()?;
4544      if field_ident.field_type == TType::Stop {
4545        break;
4546      }
4547      let field_id = field_id(&field_ident)?;
4548      match field_id {
4549        0 => {
4550          let val = i_prot.read_i32()?;
4551          f_0 = Some(val);
4552        },
4553        1 => {
4554          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
4555          f_1 = Some(val);
4556        },
4557        _ => {
4558          i_prot.skip(field_ident.field_type)?;
4559        },
4560      };
4561      i_prot.read_field_end()?;
4562    }
4563    i_prot.read_struct_end()?;
4564    let ret = SettingSystemServiceSetUserAppDataResult {
4565      result_value: f_0,
4566      error1: f_1,
4567    };
4568    Ok(ret)
4569  }
4570  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4571    let struct_ident = TStructIdentifier::new("SettingSystemServiceSetUserAppDataResult");
4572    o_prot.write_struct_begin(&struct_ident)?;
4573    if let Some(fld_var) = self.result_value {
4574      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::I32, 0))?;
4575      o_prot.write_i32(fld_var)?;
4576      o_prot.write_field_end()?;
4577      ()
4578    } else {
4579      ()
4580    }
4581    if let Some(ref fld_var) = self.error1 {
4582      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
4583      fld_var.write_to_out_protocol(o_prot)?;
4584      o_prot.write_field_end()?;
4585      ()
4586    } else {
4587      ()
4588    }
4589    o_prot.write_field_stop()?;
4590    o_prot.write_struct_end()
4591  }
4592  fn ok_or(self) -> thrift::Result<i32> {
4593    if self.error1.is_some() {
4594      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
4595    } else if self.result_value.is_some() {
4596      Ok(self.result_value.unwrap())
4597    } else {
4598      Err(
4599        thrift::Error::Application(
4600          ApplicationError::new(
4601            ApplicationErrorKind::MissingResult,
4602            "no result received for SettingSystemServiceSetUserAppData"
4603          )
4604        )
4605      )
4606    }
4607  }
4608}
4609
4610//
4611// SettingSystemServiceGetUserAppDataArgs
4612//
4613
4614#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4615struct SettingSystemServiceGetUserAppDataArgs {
4616  /// @GetUserAppData_userId_desc
4617  user_id: String,
4618  /// @GetUserAppData_category_desc
4619  category: String,
4620  /// @GetUserAppData_settingKeys_desc
4621  setting_keys: Vec<String>,
4622}
4623
4624impl SettingSystemServiceGetUserAppDataArgs {
4625  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetUserAppDataArgs> {
4626    i_prot.read_struct_begin()?;
4627    let mut f_1: Option<String> = None;
4628    let mut f_2: Option<String> = None;
4629    let mut f_3: Option<Vec<String>> = None;
4630    loop {
4631      let field_ident = i_prot.read_field_begin()?;
4632      if field_ident.field_type == TType::Stop {
4633        break;
4634      }
4635      let field_id = field_id(&field_ident)?;
4636      match field_id {
4637        1 => {
4638          let val = i_prot.read_string()?;
4639          f_1 = Some(val);
4640        },
4641        2 => {
4642          let val = i_prot.read_string()?;
4643          f_2 = Some(val);
4644        },
4645        3 => {
4646          let list_ident = i_prot.read_list_begin()?;
4647          let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
4648          for _ in 0..list_ident.size {
4649            let list_elem_8 = i_prot.read_string()?;
4650            val.push(list_elem_8);
4651          }
4652          i_prot.read_list_end()?;
4653          f_3 = Some(val);
4654        },
4655        _ => {
4656          i_prot.skip(field_ident.field_type)?;
4657        },
4658      };
4659      i_prot.read_field_end()?;
4660    }
4661    i_prot.read_struct_end()?;
4662    verify_required_field_exists("SettingSystemServiceGetUserAppDataArgs.user_id", &f_1)?;
4663    verify_required_field_exists("SettingSystemServiceGetUserAppDataArgs.category", &f_2)?;
4664    verify_required_field_exists("SettingSystemServiceGetUserAppDataArgs.setting_keys", &f_3)?;
4665    let ret = SettingSystemServiceGetUserAppDataArgs {
4666      user_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
4667      category: f_2.expect("auto-generated code should have checked for presence of required fields"),
4668      setting_keys: f_3.expect("auto-generated code should have checked for presence of required fields"),
4669    };
4670    Ok(ret)
4671  }
4672  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4673    let struct_ident = TStructIdentifier::new("GetUserAppData_args");
4674    o_prot.write_struct_begin(&struct_ident)?;
4675    o_prot.write_field_begin(&TFieldIdentifier::new("userId", TType::String, 1))?;
4676    o_prot.write_string(&self.user_id)?;
4677    o_prot.write_field_end()?;
4678    o_prot.write_field_begin(&TFieldIdentifier::new("category", TType::String, 2))?;
4679    o_prot.write_string(&self.category)?;
4680    o_prot.write_field_end()?;
4681    o_prot.write_field_begin(&TFieldIdentifier::new("settingKeys", TType::List, 3))?;
4682    o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.setting_keys.len() as i32))?;
4683    for e in &self.setting_keys {
4684      o_prot.write_string(e)?;
4685      o_prot.write_list_end()?;
4686    }
4687    o_prot.write_field_end()?;
4688    o_prot.write_field_stop()?;
4689    o_prot.write_struct_end()
4690  }
4691}
4692
4693//
4694// SettingSystemServiceGetUserAppDataResult
4695//
4696
4697#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4698struct SettingSystemServiceGetUserAppDataResult {
4699  result_value: Option<common_type_s_d_k_data_types::AppData>,
4700  error1: Option<common_type_s_d_k_data_types::ErrorException>,
4701}
4702
4703impl SettingSystemServiceGetUserAppDataResult {
4704  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetUserAppDataResult> {
4705    i_prot.read_struct_begin()?;
4706    let mut f_0: Option<common_type_s_d_k_data_types::AppData> = None;
4707    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
4708    loop {
4709      let field_ident = i_prot.read_field_begin()?;
4710      if field_ident.field_type == TType::Stop {
4711        break;
4712      }
4713      let field_id = field_id(&field_ident)?;
4714      match field_id {
4715        0 => {
4716          let val = common_type_s_d_k_data_types::AppData::read_from_in_protocol(i_prot)?;
4717          f_0 = Some(val);
4718        },
4719        1 => {
4720          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
4721          f_1 = Some(val);
4722        },
4723        _ => {
4724          i_prot.skip(field_ident.field_type)?;
4725        },
4726      };
4727      i_prot.read_field_end()?;
4728    }
4729    i_prot.read_struct_end()?;
4730    let ret = SettingSystemServiceGetUserAppDataResult {
4731      result_value: f_0,
4732      error1: f_1,
4733    };
4734    Ok(ret)
4735  }
4736  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4737    let struct_ident = TStructIdentifier::new("SettingSystemServiceGetUserAppDataResult");
4738    o_prot.write_struct_begin(&struct_ident)?;
4739    if let Some(ref fld_var) = self.result_value {
4740      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
4741      fld_var.write_to_out_protocol(o_prot)?;
4742      o_prot.write_field_end()?;
4743      ()
4744    } else {
4745      ()
4746    }
4747    if let Some(ref fld_var) = self.error1 {
4748      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
4749      fld_var.write_to_out_protocol(o_prot)?;
4750      o_prot.write_field_end()?;
4751      ()
4752    } else {
4753      ()
4754    }
4755    o_prot.write_field_stop()?;
4756    o_prot.write_struct_end()
4757  }
4758  fn ok_or(self) -> thrift::Result<common_type_s_d_k_data_types::AppData> {
4759    if self.error1.is_some() {
4760      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
4761    } else if self.result_value.is_some() {
4762      Ok(self.result_value.unwrap())
4763    } else {
4764      Err(
4765        thrift::Error::Application(
4766          ApplicationError::new(
4767            ApplicationErrorKind::MissingResult,
4768            "no result received for SettingSystemServiceGetUserAppData"
4769          )
4770        )
4771      )
4772    }
4773  }
4774}
4775
4776//
4777// SettingSystemServiceRemoveUserAppDataArgs
4778//
4779
4780#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4781struct SettingSystemServiceRemoveUserAppDataArgs {
4782  /// @RemoveUserAppData_userId_desc
4783  user_id: String,
4784  /// @RemoveUserAppData_category_desc
4785  category: String,
4786  /// @RemoveUserAppData_settingKeys_desc
4787  setting_keys: Vec<String>,
4788}
4789
4790impl SettingSystemServiceRemoveUserAppDataArgs {
4791  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRemoveUserAppDataArgs> {
4792    i_prot.read_struct_begin()?;
4793    let mut f_1: Option<String> = None;
4794    let mut f_2: Option<String> = None;
4795    let mut f_3: Option<Vec<String>> = None;
4796    loop {
4797      let field_ident = i_prot.read_field_begin()?;
4798      if field_ident.field_type == TType::Stop {
4799        break;
4800      }
4801      let field_id = field_id(&field_ident)?;
4802      match field_id {
4803        1 => {
4804          let val = i_prot.read_string()?;
4805          f_1 = Some(val);
4806        },
4807        2 => {
4808          let val = i_prot.read_string()?;
4809          f_2 = Some(val);
4810        },
4811        3 => {
4812          let list_ident = i_prot.read_list_begin()?;
4813          let mut val: Vec<String> = Vec::with_capacity(list_ident.size as usize);
4814          for _ in 0..list_ident.size {
4815            let list_elem_9 = i_prot.read_string()?;
4816            val.push(list_elem_9);
4817          }
4818          i_prot.read_list_end()?;
4819          f_3 = Some(val);
4820        },
4821        _ => {
4822          i_prot.skip(field_ident.field_type)?;
4823        },
4824      };
4825      i_prot.read_field_end()?;
4826    }
4827    i_prot.read_struct_end()?;
4828    verify_required_field_exists("SettingSystemServiceRemoveUserAppDataArgs.user_id", &f_1)?;
4829    verify_required_field_exists("SettingSystemServiceRemoveUserAppDataArgs.category", &f_2)?;
4830    verify_required_field_exists("SettingSystemServiceRemoveUserAppDataArgs.setting_keys", &f_3)?;
4831    let ret = SettingSystemServiceRemoveUserAppDataArgs {
4832      user_id: f_1.expect("auto-generated code should have checked for presence of required fields"),
4833      category: f_2.expect("auto-generated code should have checked for presence of required fields"),
4834      setting_keys: f_3.expect("auto-generated code should have checked for presence of required fields"),
4835    };
4836    Ok(ret)
4837  }
4838  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4839    let struct_ident = TStructIdentifier::new("RemoveUserAppData_args");
4840    o_prot.write_struct_begin(&struct_ident)?;
4841    o_prot.write_field_begin(&TFieldIdentifier::new("userId", TType::String, 1))?;
4842    o_prot.write_string(&self.user_id)?;
4843    o_prot.write_field_end()?;
4844    o_prot.write_field_begin(&TFieldIdentifier::new("category", TType::String, 2))?;
4845    o_prot.write_string(&self.category)?;
4846    o_prot.write_field_end()?;
4847    o_prot.write_field_begin(&TFieldIdentifier::new("settingKeys", TType::List, 3))?;
4848    o_prot.write_list_begin(&TListIdentifier::new(TType::String, self.setting_keys.len() as i32))?;
4849    for e in &self.setting_keys {
4850      o_prot.write_string(e)?;
4851      o_prot.write_list_end()?;
4852    }
4853    o_prot.write_field_end()?;
4854    o_prot.write_field_stop()?;
4855    o_prot.write_struct_end()
4856  }
4857}
4858
4859//
4860// SettingSystemServiceRemoveUserAppDataResult
4861//
4862
4863#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4864struct SettingSystemServiceRemoveUserAppDataResult {
4865  result_value: Option<i32>,
4866  error1: Option<common_type_s_d_k_data_types::ErrorException>,
4867}
4868
4869impl SettingSystemServiceRemoveUserAppDataResult {
4870  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRemoveUserAppDataResult> {
4871    i_prot.read_struct_begin()?;
4872    let mut f_0: Option<i32> = None;
4873    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
4874    loop {
4875      let field_ident = i_prot.read_field_begin()?;
4876      if field_ident.field_type == TType::Stop {
4877        break;
4878      }
4879      let field_id = field_id(&field_ident)?;
4880      match field_id {
4881        0 => {
4882          let val = i_prot.read_i32()?;
4883          f_0 = Some(val);
4884        },
4885        1 => {
4886          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
4887          f_1 = Some(val);
4888        },
4889        _ => {
4890          i_prot.skip(field_ident.field_type)?;
4891        },
4892      };
4893      i_prot.read_field_end()?;
4894    }
4895    i_prot.read_struct_end()?;
4896    let ret = SettingSystemServiceRemoveUserAppDataResult {
4897      result_value: f_0,
4898      error1: f_1,
4899    };
4900    Ok(ret)
4901  }
4902  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4903    let struct_ident = TStructIdentifier::new("SettingSystemServiceRemoveUserAppDataResult");
4904    o_prot.write_struct_begin(&struct_ident)?;
4905    if let Some(fld_var) = self.result_value {
4906      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::I32, 0))?;
4907      o_prot.write_i32(fld_var)?;
4908      o_prot.write_field_end()?;
4909      ()
4910    } else {
4911      ()
4912    }
4913    if let Some(ref fld_var) = self.error1 {
4914      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
4915      fld_var.write_to_out_protocol(o_prot)?;
4916      o_prot.write_field_end()?;
4917      ()
4918    } else {
4919      ()
4920    }
4921    o_prot.write_field_stop()?;
4922    o_prot.write_struct_end()
4923  }
4924  fn ok_or(self) -> thrift::Result<i32> {
4925    if self.error1.is_some() {
4926      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
4927    } else if self.result_value.is_some() {
4928      Ok(self.result_value.unwrap())
4929    } else {
4930      Err(
4931        thrift::Error::Application(
4932          ApplicationError::new(
4933            ApplicationErrorKind::MissingResult,
4934            "no result received for SettingSystemServiceRemoveUserAppData"
4935          )
4936        )
4937      )
4938    }
4939  }
4940}
4941
4942//
4943// SettingSystemServiceSettingItemNotifyArgs
4944//
4945
4946#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4947struct SettingSystemServiceSettingItemNotifyArgs {
4948  /// The item's ID
4949  key: String,
4950  /// Optional. The arguments of the notification. In json string format
4951  contents: setting_system_s_d_k_data_types::JSON,
4952}
4953
4954impl SettingSystemServiceSettingItemNotifyArgs {
4955  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSettingItemNotifyArgs> {
4956    i_prot.read_struct_begin()?;
4957    let mut f_1: Option<String> = None;
4958    let mut f_2: Option<setting_system_s_d_k_data_types::JSON> = None;
4959    loop {
4960      let field_ident = i_prot.read_field_begin()?;
4961      if field_ident.field_type == TType::Stop {
4962        break;
4963      }
4964      let field_id = field_id(&field_ident)?;
4965      match field_id {
4966        1 => {
4967          let val = i_prot.read_string()?;
4968          f_1 = Some(val);
4969        },
4970        2 => {
4971          let val = i_prot.read_string()?;
4972          f_2 = Some(val);
4973        },
4974        _ => {
4975          i_prot.skip(field_ident.field_type)?;
4976        },
4977      };
4978      i_prot.read_field_end()?;
4979    }
4980    i_prot.read_struct_end()?;
4981    verify_required_field_exists("SettingSystemServiceSettingItemNotifyArgs.key", &f_1)?;
4982    verify_required_field_exists("SettingSystemServiceSettingItemNotifyArgs.contents", &f_2)?;
4983    let ret = SettingSystemServiceSettingItemNotifyArgs {
4984      key: f_1.expect("auto-generated code should have checked for presence of required fields"),
4985      contents: f_2.expect("auto-generated code should have checked for presence of required fields"),
4986    };
4987    Ok(ret)
4988  }
4989  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
4990    let struct_ident = TStructIdentifier::new("SettingItemNotify_args");
4991    o_prot.write_struct_begin(&struct_ident)?;
4992    o_prot.write_field_begin(&TFieldIdentifier::new("key", TType::String, 1))?;
4993    o_prot.write_string(&self.key)?;
4994    o_prot.write_field_end()?;
4995    o_prot.write_field_begin(&TFieldIdentifier::new("contents", TType::String, 2))?;
4996    o_prot.write_string(&self.contents)?;
4997    o_prot.write_field_end()?;
4998    o_prot.write_field_stop()?;
4999    o_prot.write_struct_end()
5000  }
5001}
5002
5003//
5004// SettingSystemServiceSettingItemNotifyResult
5005//
5006
5007#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5008struct SettingSystemServiceSettingItemNotifyResult {
5009  result_value: Option<bool>,
5010  error1: Option<common_type_s_d_k_data_types::ErrorException>,
5011}
5012
5013impl SettingSystemServiceSettingItemNotifyResult {
5014  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSettingItemNotifyResult> {
5015    i_prot.read_struct_begin()?;
5016    let mut f_0: Option<bool> = None;
5017    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
5018    loop {
5019      let field_ident = i_prot.read_field_begin()?;
5020      if field_ident.field_type == TType::Stop {
5021        break;
5022      }
5023      let field_id = field_id(&field_ident)?;
5024      match field_id {
5025        0 => {
5026          let val = i_prot.read_bool()?;
5027          f_0 = Some(val);
5028        },
5029        1 => {
5030          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
5031          f_1 = Some(val);
5032        },
5033        _ => {
5034          i_prot.skip(field_ident.field_type)?;
5035        },
5036      };
5037      i_prot.read_field_end()?;
5038    }
5039    i_prot.read_struct_end()?;
5040    let ret = SettingSystemServiceSettingItemNotifyResult {
5041      result_value: f_0,
5042      error1: f_1,
5043    };
5044    Ok(ret)
5045  }
5046  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5047    let struct_ident = TStructIdentifier::new("SettingSystemServiceSettingItemNotifyResult");
5048    o_prot.write_struct_begin(&struct_ident)?;
5049    if let Some(fld_var) = self.result_value {
5050      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
5051      o_prot.write_bool(fld_var)?;
5052      o_prot.write_field_end()?;
5053      ()
5054    } else {
5055      ()
5056    }
5057    if let Some(ref fld_var) = self.error1 {
5058      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
5059      fld_var.write_to_out_protocol(o_prot)?;
5060      o_prot.write_field_end()?;
5061      ()
5062    } else {
5063      ()
5064    }
5065    o_prot.write_field_stop()?;
5066    o_prot.write_struct_end()
5067  }
5068  fn ok_or(self) -> thrift::Result<bool> {
5069    if self.error1.is_some() {
5070      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
5071    } else if self.result_value.is_some() {
5072      Ok(self.result_value.unwrap())
5073    } else {
5074      Err(
5075        thrift::Error::Application(
5076          ApplicationError::new(
5077            ApplicationErrorKind::MissingResult,
5078            "no result received for SettingSystemServiceSettingItemNotify"
5079          )
5080        )
5081      )
5082    }
5083  }
5084}
5085
5086//
5087// SettingSystemServiceGetNetworkAdapterSettingsArgs
5088//
5089
5090#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5091struct SettingSystemServiceGetNetworkAdapterSettingsArgs {
5092}
5093
5094impl SettingSystemServiceGetNetworkAdapterSettingsArgs {
5095  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetNetworkAdapterSettingsArgs> {
5096    i_prot.read_struct_begin()?;
5097    loop {
5098      let field_ident = i_prot.read_field_begin()?;
5099      if field_ident.field_type == TType::Stop {
5100        break;
5101      }
5102      let field_id = field_id(&field_ident)?;
5103      match field_id {
5104        _ => {
5105          i_prot.skip(field_ident.field_type)?;
5106        },
5107      };
5108      i_prot.read_field_end()?;
5109    }
5110    i_prot.read_struct_end()?;
5111    let ret = SettingSystemServiceGetNetworkAdapterSettingsArgs {};
5112    Ok(ret)
5113  }
5114  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5115    let struct_ident = TStructIdentifier::new("GetNetworkAdapterSettings_args");
5116    o_prot.write_struct_begin(&struct_ident)?;
5117    o_prot.write_field_stop()?;
5118    o_prot.write_struct_end()
5119  }
5120}
5121
5122//
5123// SettingSystemServiceGetNetworkAdapterSettingsResult
5124//
5125
5126#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5127struct SettingSystemServiceGetNetworkAdapterSettingsResult {
5128  result_value: Option<setting_system_s_d_k_data_types::NetworkSettings>,
5129}
5130
5131impl SettingSystemServiceGetNetworkAdapterSettingsResult {
5132  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetNetworkAdapterSettingsResult> {
5133    i_prot.read_struct_begin()?;
5134    let mut f_0: Option<setting_system_s_d_k_data_types::NetworkSettings> = None;
5135    loop {
5136      let field_ident = i_prot.read_field_begin()?;
5137      if field_ident.field_type == TType::Stop {
5138        break;
5139      }
5140      let field_id = field_id(&field_ident)?;
5141      match field_id {
5142        0 => {
5143          let val = setting_system_s_d_k_data_types::NetworkSettings::read_from_in_protocol(i_prot)?;
5144          f_0 = Some(val);
5145        },
5146        _ => {
5147          i_prot.skip(field_ident.field_type)?;
5148        },
5149      };
5150      i_prot.read_field_end()?;
5151    }
5152    i_prot.read_struct_end()?;
5153    let ret = SettingSystemServiceGetNetworkAdapterSettingsResult {
5154      result_value: f_0,
5155    };
5156    Ok(ret)
5157  }
5158  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5159    let struct_ident = TStructIdentifier::new("SettingSystemServiceGetNetworkAdapterSettingsResult");
5160    o_prot.write_struct_begin(&struct_ident)?;
5161    if let Some(ref fld_var) = self.result_value {
5162      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
5163      fld_var.write_to_out_protocol(o_prot)?;
5164      o_prot.write_field_end()?;
5165      ()
5166    } else {
5167      ()
5168    }
5169    o_prot.write_field_stop()?;
5170    o_prot.write_struct_end()
5171  }
5172  fn ok_or(self) -> thrift::Result<setting_system_s_d_k_data_types::NetworkSettings> {
5173    if self.result_value.is_some() {
5174      Ok(self.result_value.unwrap())
5175    } else {
5176      Err(
5177        thrift::Error::Application(
5178          ApplicationError::new(
5179            ApplicationErrorKind::MissingResult,
5180            "no result received for SettingSystemServiceGetNetworkAdapterSettings"
5181          )
5182        )
5183      )
5184    }
5185  }
5186}
5187
5188//
5189// SettingSystemServiceGetLanNetworkNameArgs
5190//
5191
5192#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5193struct SettingSystemServiceGetLanNetworkNameArgs {
5194}
5195
5196impl SettingSystemServiceGetLanNetworkNameArgs {
5197  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetLanNetworkNameArgs> {
5198    i_prot.read_struct_begin()?;
5199    loop {
5200      let field_ident = i_prot.read_field_begin()?;
5201      if field_ident.field_type == TType::Stop {
5202        break;
5203      }
5204      let field_id = field_id(&field_ident)?;
5205      match field_id {
5206        _ => {
5207          i_prot.skip(field_ident.field_type)?;
5208        },
5209      };
5210      i_prot.read_field_end()?;
5211    }
5212    i_prot.read_struct_end()?;
5213    let ret = SettingSystemServiceGetLanNetworkNameArgs {};
5214    Ok(ret)
5215  }
5216  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5217    let struct_ident = TStructIdentifier::new("GetLanNetworkName_args");
5218    o_prot.write_struct_begin(&struct_ident)?;
5219    o_prot.write_field_stop()?;
5220    o_prot.write_struct_end()
5221  }
5222}
5223
5224//
5225// SettingSystemServiceGetLanNetworkNameResult
5226//
5227
5228#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5229struct SettingSystemServiceGetLanNetworkNameResult {
5230  result_value: Option<String>,
5231}
5232
5233impl SettingSystemServiceGetLanNetworkNameResult {
5234  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetLanNetworkNameResult> {
5235    i_prot.read_struct_begin()?;
5236    let mut f_0: Option<String> = None;
5237    loop {
5238      let field_ident = i_prot.read_field_begin()?;
5239      if field_ident.field_type == TType::Stop {
5240        break;
5241      }
5242      let field_id = field_id(&field_ident)?;
5243      match field_id {
5244        0 => {
5245          let val = i_prot.read_string()?;
5246          f_0 = Some(val);
5247        },
5248        _ => {
5249          i_prot.skip(field_ident.field_type)?;
5250        },
5251      };
5252      i_prot.read_field_end()?;
5253    }
5254    i_prot.read_struct_end()?;
5255    let ret = SettingSystemServiceGetLanNetworkNameResult {
5256      result_value: f_0,
5257    };
5258    Ok(ret)
5259  }
5260  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5261    let struct_ident = TStructIdentifier::new("SettingSystemServiceGetLanNetworkNameResult");
5262    o_prot.write_struct_begin(&struct_ident)?;
5263    if let Some(ref fld_var) = self.result_value {
5264      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::String, 0))?;
5265      o_prot.write_string(fld_var)?;
5266      o_prot.write_field_end()?;
5267      ()
5268    } else {
5269      ()
5270    }
5271    o_prot.write_field_stop()?;
5272    o_prot.write_struct_end()
5273  }
5274  fn ok_or(self) -> thrift::Result<String> {
5275    if self.result_value.is_some() {
5276      Ok(self.result_value.unwrap())
5277    } else {
5278      Err(
5279        thrift::Error::Application(
5280          ApplicationError::new(
5281            ApplicationErrorKind::MissingResult,
5282            "no result received for SettingSystemServiceGetLanNetworkName"
5283          )
5284        )
5285      )
5286    }
5287  }
5288}
5289
5290//
5291// SettingSystemServiceSetNetworkSettingsArgs
5292//
5293
5294#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5295struct SettingSystemServiceSetNetworkSettingsArgs {
5296  is_w_lan: bool,
5297  enable_d_h_c_p: bool,
5298  ip_address: String,
5299  sub_mask: String,
5300  gateway: String,
5301  main_d_n_s: String,
5302  sub_d_n_s: String,
5303}
5304
5305impl SettingSystemServiceSetNetworkSettingsArgs {
5306  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSetNetworkSettingsArgs> {
5307    i_prot.read_struct_begin()?;
5308    let mut f_1: Option<bool> = None;
5309    let mut f_2: Option<bool> = None;
5310    let mut f_3: Option<String> = None;
5311    let mut f_4: Option<String> = None;
5312    let mut f_5: Option<String> = None;
5313    let mut f_6: Option<String> = None;
5314    let mut f_7: Option<String> = None;
5315    loop {
5316      let field_ident = i_prot.read_field_begin()?;
5317      if field_ident.field_type == TType::Stop {
5318        break;
5319      }
5320      let field_id = field_id(&field_ident)?;
5321      match field_id {
5322        1 => {
5323          let val = i_prot.read_bool()?;
5324          f_1 = Some(val);
5325        },
5326        2 => {
5327          let val = i_prot.read_bool()?;
5328          f_2 = Some(val);
5329        },
5330        3 => {
5331          let val = i_prot.read_string()?;
5332          f_3 = Some(val);
5333        },
5334        4 => {
5335          let val = i_prot.read_string()?;
5336          f_4 = Some(val);
5337        },
5338        5 => {
5339          let val = i_prot.read_string()?;
5340          f_5 = Some(val);
5341        },
5342        6 => {
5343          let val = i_prot.read_string()?;
5344          f_6 = Some(val);
5345        },
5346        7 => {
5347          let val = i_prot.read_string()?;
5348          f_7 = Some(val);
5349        },
5350        _ => {
5351          i_prot.skip(field_ident.field_type)?;
5352        },
5353      };
5354      i_prot.read_field_end()?;
5355    }
5356    i_prot.read_struct_end()?;
5357    verify_required_field_exists("SettingSystemServiceSetNetworkSettingsArgs.is_w_lan", &f_1)?;
5358    verify_required_field_exists("SettingSystemServiceSetNetworkSettingsArgs.enable_d_h_c_p", &f_2)?;
5359    verify_required_field_exists("SettingSystemServiceSetNetworkSettingsArgs.ip_address", &f_3)?;
5360    verify_required_field_exists("SettingSystemServiceSetNetworkSettingsArgs.sub_mask", &f_4)?;
5361    verify_required_field_exists("SettingSystemServiceSetNetworkSettingsArgs.gateway", &f_5)?;
5362    verify_required_field_exists("SettingSystemServiceSetNetworkSettingsArgs.main_d_n_s", &f_6)?;
5363    verify_required_field_exists("SettingSystemServiceSetNetworkSettingsArgs.sub_d_n_s", &f_7)?;
5364    let ret = SettingSystemServiceSetNetworkSettingsArgs {
5365      is_w_lan: f_1.expect("auto-generated code should have checked for presence of required fields"),
5366      enable_d_h_c_p: f_2.expect("auto-generated code should have checked for presence of required fields"),
5367      ip_address: f_3.expect("auto-generated code should have checked for presence of required fields"),
5368      sub_mask: f_4.expect("auto-generated code should have checked for presence of required fields"),
5369      gateway: f_5.expect("auto-generated code should have checked for presence of required fields"),
5370      main_d_n_s: f_6.expect("auto-generated code should have checked for presence of required fields"),
5371      sub_d_n_s: f_7.expect("auto-generated code should have checked for presence of required fields"),
5372    };
5373    Ok(ret)
5374  }
5375  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5376    let struct_ident = TStructIdentifier::new("SetNetworkSettings_args");
5377    o_prot.write_struct_begin(&struct_ident)?;
5378    o_prot.write_field_begin(&TFieldIdentifier::new("isWLan", TType::Bool, 1))?;
5379    o_prot.write_bool(self.is_w_lan)?;
5380    o_prot.write_field_end()?;
5381    o_prot.write_field_begin(&TFieldIdentifier::new("EnableDHCP", TType::Bool, 2))?;
5382    o_prot.write_bool(self.enable_d_h_c_p)?;
5383    o_prot.write_field_end()?;
5384    o_prot.write_field_begin(&TFieldIdentifier::new("IpAddress", TType::String, 3))?;
5385    o_prot.write_string(&self.ip_address)?;
5386    o_prot.write_field_end()?;
5387    o_prot.write_field_begin(&TFieldIdentifier::new("SubMask", TType::String, 4))?;
5388    o_prot.write_string(&self.sub_mask)?;
5389    o_prot.write_field_end()?;
5390    o_prot.write_field_begin(&TFieldIdentifier::new("Gateway", TType::String, 5))?;
5391    o_prot.write_string(&self.gateway)?;
5392    o_prot.write_field_end()?;
5393    o_prot.write_field_begin(&TFieldIdentifier::new("MainDNS", TType::String, 6))?;
5394    o_prot.write_string(&self.main_d_n_s)?;
5395    o_prot.write_field_end()?;
5396    o_prot.write_field_begin(&TFieldIdentifier::new("SubDNS", TType::String, 7))?;
5397    o_prot.write_string(&self.sub_d_n_s)?;
5398    o_prot.write_field_end()?;
5399    o_prot.write_field_stop()?;
5400    o_prot.write_struct_end()
5401  }
5402}
5403
5404//
5405// SettingSystemServiceSetNetworkSettingsResult
5406//
5407
5408#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5409struct SettingSystemServiceSetNetworkSettingsResult {
5410  result_value: Option<bool>,
5411}
5412
5413impl SettingSystemServiceSetNetworkSettingsResult {
5414  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSetNetworkSettingsResult> {
5415    i_prot.read_struct_begin()?;
5416    let mut f_0: Option<bool> = None;
5417    loop {
5418      let field_ident = i_prot.read_field_begin()?;
5419      if field_ident.field_type == TType::Stop {
5420        break;
5421      }
5422      let field_id = field_id(&field_ident)?;
5423      match field_id {
5424        0 => {
5425          let val = i_prot.read_bool()?;
5426          f_0 = Some(val);
5427        },
5428        _ => {
5429          i_prot.skip(field_ident.field_type)?;
5430        },
5431      };
5432      i_prot.read_field_end()?;
5433    }
5434    i_prot.read_struct_end()?;
5435    let ret = SettingSystemServiceSetNetworkSettingsResult {
5436      result_value: f_0,
5437    };
5438    Ok(ret)
5439  }
5440  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5441    let struct_ident = TStructIdentifier::new("SettingSystemServiceSetNetworkSettingsResult");
5442    o_prot.write_struct_begin(&struct_ident)?;
5443    if let Some(fld_var) = self.result_value {
5444      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
5445      o_prot.write_bool(fld_var)?;
5446      o_prot.write_field_end()?;
5447      ()
5448    } else {
5449      ()
5450    }
5451    o_prot.write_field_stop()?;
5452    o_prot.write_struct_end()
5453  }
5454  fn ok_or(self) -> thrift::Result<bool> {
5455    if self.result_value.is_some() {
5456      Ok(self.result_value.unwrap())
5457    } else {
5458      Err(
5459        thrift::Error::Application(
5460          ApplicationError::new(
5461            ApplicationErrorKind::MissingResult,
5462            "no result received for SettingSystemServiceSetNetworkSettings"
5463          )
5464        )
5465      )
5466    }
5467  }
5468}
5469
5470//
5471// SettingSystemServiceSetNetworkProxyArgs
5472//
5473
5474#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5475struct SettingSystemServiceSetNetworkProxyArgs {
5476  proxy_server: String,
5477  proxy_port: String,
5478}
5479
5480impl SettingSystemServiceSetNetworkProxyArgs {
5481  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSetNetworkProxyArgs> {
5482    i_prot.read_struct_begin()?;
5483    let mut f_1: Option<String> = None;
5484    let mut f_2: Option<String> = None;
5485    loop {
5486      let field_ident = i_prot.read_field_begin()?;
5487      if field_ident.field_type == TType::Stop {
5488        break;
5489      }
5490      let field_id = field_id(&field_ident)?;
5491      match field_id {
5492        1 => {
5493          let val = i_prot.read_string()?;
5494          f_1 = Some(val);
5495        },
5496        2 => {
5497          let val = i_prot.read_string()?;
5498          f_2 = Some(val);
5499        },
5500        _ => {
5501          i_prot.skip(field_ident.field_type)?;
5502        },
5503      };
5504      i_prot.read_field_end()?;
5505    }
5506    i_prot.read_struct_end()?;
5507    verify_required_field_exists("SettingSystemServiceSetNetworkProxyArgs.proxy_server", &f_1)?;
5508    verify_required_field_exists("SettingSystemServiceSetNetworkProxyArgs.proxy_port", &f_2)?;
5509    let ret = SettingSystemServiceSetNetworkProxyArgs {
5510      proxy_server: f_1.expect("auto-generated code should have checked for presence of required fields"),
5511      proxy_port: f_2.expect("auto-generated code should have checked for presence of required fields"),
5512    };
5513    Ok(ret)
5514  }
5515  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5516    let struct_ident = TStructIdentifier::new("SetNetworkProxy_args");
5517    o_prot.write_struct_begin(&struct_ident)?;
5518    o_prot.write_field_begin(&TFieldIdentifier::new("ProxyServer", TType::String, 1))?;
5519    o_prot.write_string(&self.proxy_server)?;
5520    o_prot.write_field_end()?;
5521    o_prot.write_field_begin(&TFieldIdentifier::new("ProxyPort", TType::String, 2))?;
5522    o_prot.write_string(&self.proxy_port)?;
5523    o_prot.write_field_end()?;
5524    o_prot.write_field_stop()?;
5525    o_prot.write_struct_end()
5526  }
5527}
5528
5529//
5530// SettingSystemServiceSetNetworkProxyResult
5531//
5532
5533#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5534struct SettingSystemServiceSetNetworkProxyResult {
5535  result_value: Option<bool>,
5536}
5537
5538impl SettingSystemServiceSetNetworkProxyResult {
5539  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceSetNetworkProxyResult> {
5540    i_prot.read_struct_begin()?;
5541    let mut f_0: Option<bool> = None;
5542    loop {
5543      let field_ident = i_prot.read_field_begin()?;
5544      if field_ident.field_type == TType::Stop {
5545        break;
5546      }
5547      let field_id = field_id(&field_ident)?;
5548      match field_id {
5549        0 => {
5550          let val = i_prot.read_bool()?;
5551          f_0 = Some(val);
5552        },
5553        _ => {
5554          i_prot.skip(field_ident.field_type)?;
5555        },
5556      };
5557      i_prot.read_field_end()?;
5558    }
5559    i_prot.read_struct_end()?;
5560    let ret = SettingSystemServiceSetNetworkProxyResult {
5561      result_value: f_0,
5562    };
5563    Ok(ret)
5564  }
5565  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5566    let struct_ident = TStructIdentifier::new("SettingSystemServiceSetNetworkProxyResult");
5567    o_prot.write_struct_begin(&struct_ident)?;
5568    if let Some(fld_var) = self.result_value {
5569      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
5570      o_prot.write_bool(fld_var)?;
5571      o_prot.write_field_end()?;
5572      ()
5573    } else {
5574      ()
5575    }
5576    o_prot.write_field_stop()?;
5577    o_prot.write_struct_end()
5578  }
5579  fn ok_or(self) -> thrift::Result<bool> {
5580    if self.result_value.is_some() {
5581      Ok(self.result_value.unwrap())
5582    } else {
5583      Err(
5584        thrift::Error::Application(
5585          ApplicationError::new(
5586            ApplicationErrorKind::MissingResult,
5587            "no result received for SettingSystemServiceSetNetworkProxy"
5588          )
5589        )
5590      )
5591    }
5592  }
5593}
5594
5595//
5596// SettingSystemServiceConnectToWifiArgs
5597//
5598
5599#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5600struct SettingSystemServiceConnectToWifiArgs {
5601  profile_name: String,
5602  key: String,
5603}
5604
5605impl SettingSystemServiceConnectToWifiArgs {
5606  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceConnectToWifiArgs> {
5607    i_prot.read_struct_begin()?;
5608    let mut f_1: Option<String> = None;
5609    let mut f_2: Option<String> = None;
5610    loop {
5611      let field_ident = i_prot.read_field_begin()?;
5612      if field_ident.field_type == TType::Stop {
5613        break;
5614      }
5615      let field_id = field_id(&field_ident)?;
5616      match field_id {
5617        1 => {
5618          let val = i_prot.read_string()?;
5619          f_1 = Some(val);
5620        },
5621        2 => {
5622          let val = i_prot.read_string()?;
5623          f_2 = Some(val);
5624        },
5625        _ => {
5626          i_prot.skip(field_ident.field_type)?;
5627        },
5628      };
5629      i_prot.read_field_end()?;
5630    }
5631    i_prot.read_struct_end()?;
5632    verify_required_field_exists("SettingSystemServiceConnectToWifiArgs.profile_name", &f_1)?;
5633    verify_required_field_exists("SettingSystemServiceConnectToWifiArgs.key", &f_2)?;
5634    let ret = SettingSystemServiceConnectToWifiArgs {
5635      profile_name: f_1.expect("auto-generated code should have checked for presence of required fields"),
5636      key: f_2.expect("auto-generated code should have checked for presence of required fields"),
5637    };
5638    Ok(ret)
5639  }
5640  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5641    let struct_ident = TStructIdentifier::new("ConnectToWifi_args");
5642    o_prot.write_struct_begin(&struct_ident)?;
5643    o_prot.write_field_begin(&TFieldIdentifier::new("profileName", TType::String, 1))?;
5644    o_prot.write_string(&self.profile_name)?;
5645    o_prot.write_field_end()?;
5646    o_prot.write_field_begin(&TFieldIdentifier::new("key", TType::String, 2))?;
5647    o_prot.write_string(&self.key)?;
5648    o_prot.write_field_end()?;
5649    o_prot.write_field_stop()?;
5650    o_prot.write_struct_end()
5651  }
5652}
5653
5654//
5655// SettingSystemServiceConnectToWifiResult
5656//
5657
5658#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5659struct SettingSystemServiceConnectToWifiResult {
5660  result_value: Option<bool>,
5661  error1: Option<common_type_s_d_k_data_types::ErrorException>,
5662}
5663
5664impl SettingSystemServiceConnectToWifiResult {
5665  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceConnectToWifiResult> {
5666    i_prot.read_struct_begin()?;
5667    let mut f_0: Option<bool> = None;
5668    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
5669    loop {
5670      let field_ident = i_prot.read_field_begin()?;
5671      if field_ident.field_type == TType::Stop {
5672        break;
5673      }
5674      let field_id = field_id(&field_ident)?;
5675      match field_id {
5676        0 => {
5677          let val = i_prot.read_bool()?;
5678          f_0 = Some(val);
5679        },
5680        1 => {
5681          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
5682          f_1 = Some(val);
5683        },
5684        _ => {
5685          i_prot.skip(field_ident.field_type)?;
5686        },
5687      };
5688      i_prot.read_field_end()?;
5689    }
5690    i_prot.read_struct_end()?;
5691    let ret = SettingSystemServiceConnectToWifiResult {
5692      result_value: f_0,
5693      error1: f_1,
5694    };
5695    Ok(ret)
5696  }
5697  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5698    let struct_ident = TStructIdentifier::new("SettingSystemServiceConnectToWifiResult");
5699    o_prot.write_struct_begin(&struct_ident)?;
5700    if let Some(fld_var) = self.result_value {
5701      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
5702      o_prot.write_bool(fld_var)?;
5703      o_prot.write_field_end()?;
5704      ()
5705    } else {
5706      ()
5707    }
5708    if let Some(ref fld_var) = self.error1 {
5709      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
5710      fld_var.write_to_out_protocol(o_prot)?;
5711      o_prot.write_field_end()?;
5712      ()
5713    } else {
5714      ()
5715    }
5716    o_prot.write_field_stop()?;
5717    o_prot.write_struct_end()
5718  }
5719  fn ok_or(self) -> thrift::Result<bool> {
5720    if self.error1.is_some() {
5721      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
5722    } else if self.result_value.is_some() {
5723      Ok(self.result_value.unwrap())
5724    } else {
5725      Err(
5726        thrift::Error::Application(
5727          ApplicationError::new(
5728            ApplicationErrorKind::MissingResult,
5729            "no result received for SettingSystemServiceConnectToWifi"
5730          )
5731        )
5732      )
5733    }
5734  }
5735}
5736
5737//
5738// SettingSystemServiceConnectToAppointedWifiArgs
5739//
5740
5741#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5742struct SettingSystemServiceConnectToAppointedWifiArgs {
5743  profile_name: String,
5744  auth: String,
5745  ciper: String,
5746  key_type: String,
5747  key: String,
5748}
5749
5750impl SettingSystemServiceConnectToAppointedWifiArgs {
5751  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceConnectToAppointedWifiArgs> {
5752    i_prot.read_struct_begin()?;
5753    let mut f_1: Option<String> = None;
5754    let mut f_2: Option<String> = None;
5755    let mut f_3: Option<String> = None;
5756    let mut f_4: Option<String> = None;
5757    let mut f_5: Option<String> = None;
5758    loop {
5759      let field_ident = i_prot.read_field_begin()?;
5760      if field_ident.field_type == TType::Stop {
5761        break;
5762      }
5763      let field_id = field_id(&field_ident)?;
5764      match field_id {
5765        1 => {
5766          let val = i_prot.read_string()?;
5767          f_1 = Some(val);
5768        },
5769        2 => {
5770          let val = i_prot.read_string()?;
5771          f_2 = Some(val);
5772        },
5773        3 => {
5774          let val = i_prot.read_string()?;
5775          f_3 = Some(val);
5776        },
5777        4 => {
5778          let val = i_prot.read_string()?;
5779          f_4 = Some(val);
5780        },
5781        5 => {
5782          let val = i_prot.read_string()?;
5783          f_5 = Some(val);
5784        },
5785        _ => {
5786          i_prot.skip(field_ident.field_type)?;
5787        },
5788      };
5789      i_prot.read_field_end()?;
5790    }
5791    i_prot.read_struct_end()?;
5792    verify_required_field_exists("SettingSystemServiceConnectToAppointedWifiArgs.profile_name", &f_1)?;
5793    verify_required_field_exists("SettingSystemServiceConnectToAppointedWifiArgs.auth", &f_2)?;
5794    verify_required_field_exists("SettingSystemServiceConnectToAppointedWifiArgs.ciper", &f_3)?;
5795    verify_required_field_exists("SettingSystemServiceConnectToAppointedWifiArgs.key_type", &f_4)?;
5796    verify_required_field_exists("SettingSystemServiceConnectToAppointedWifiArgs.key", &f_5)?;
5797    let ret = SettingSystemServiceConnectToAppointedWifiArgs {
5798      profile_name: f_1.expect("auto-generated code should have checked for presence of required fields"),
5799      auth: f_2.expect("auto-generated code should have checked for presence of required fields"),
5800      ciper: f_3.expect("auto-generated code should have checked for presence of required fields"),
5801      key_type: f_4.expect("auto-generated code should have checked for presence of required fields"),
5802      key: f_5.expect("auto-generated code should have checked for presence of required fields"),
5803    };
5804    Ok(ret)
5805  }
5806  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5807    let struct_ident = TStructIdentifier::new("ConnectToAppointedWifi_args");
5808    o_prot.write_struct_begin(&struct_ident)?;
5809    o_prot.write_field_begin(&TFieldIdentifier::new("profileName", TType::String, 1))?;
5810    o_prot.write_string(&self.profile_name)?;
5811    o_prot.write_field_end()?;
5812    o_prot.write_field_begin(&TFieldIdentifier::new("Auth", TType::String, 2))?;
5813    o_prot.write_string(&self.auth)?;
5814    o_prot.write_field_end()?;
5815    o_prot.write_field_begin(&TFieldIdentifier::new("Ciper", TType::String, 3))?;
5816    o_prot.write_string(&self.ciper)?;
5817    o_prot.write_field_end()?;
5818    o_prot.write_field_begin(&TFieldIdentifier::new("KeyType", TType::String, 4))?;
5819    o_prot.write_string(&self.key_type)?;
5820    o_prot.write_field_end()?;
5821    o_prot.write_field_begin(&TFieldIdentifier::new("key", TType::String, 5))?;
5822    o_prot.write_string(&self.key)?;
5823    o_prot.write_field_end()?;
5824    o_prot.write_field_stop()?;
5825    o_prot.write_struct_end()
5826  }
5827}
5828
5829//
5830// SettingSystemServiceConnectToAppointedWifiResult
5831//
5832
5833#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5834struct SettingSystemServiceConnectToAppointedWifiResult {
5835  result_value: Option<bool>,
5836  error1: Option<common_type_s_d_k_data_types::ErrorException>,
5837}
5838
5839impl SettingSystemServiceConnectToAppointedWifiResult {
5840  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceConnectToAppointedWifiResult> {
5841    i_prot.read_struct_begin()?;
5842    let mut f_0: Option<bool> = None;
5843    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
5844    loop {
5845      let field_ident = i_prot.read_field_begin()?;
5846      if field_ident.field_type == TType::Stop {
5847        break;
5848      }
5849      let field_id = field_id(&field_ident)?;
5850      match field_id {
5851        0 => {
5852          let val = i_prot.read_bool()?;
5853          f_0 = Some(val);
5854        },
5855        1 => {
5856          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
5857          f_1 = Some(val);
5858        },
5859        _ => {
5860          i_prot.skip(field_ident.field_type)?;
5861        },
5862      };
5863      i_prot.read_field_end()?;
5864    }
5865    i_prot.read_struct_end()?;
5866    let ret = SettingSystemServiceConnectToAppointedWifiResult {
5867      result_value: f_0,
5868      error1: f_1,
5869    };
5870    Ok(ret)
5871  }
5872  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5873    let struct_ident = TStructIdentifier::new("SettingSystemServiceConnectToAppointedWifiResult");
5874    o_prot.write_struct_begin(&struct_ident)?;
5875    if let Some(fld_var) = self.result_value {
5876      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
5877      o_prot.write_bool(fld_var)?;
5878      o_prot.write_field_end()?;
5879      ()
5880    } else {
5881      ()
5882    }
5883    if let Some(ref fld_var) = self.error1 {
5884      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
5885      fld_var.write_to_out_protocol(o_prot)?;
5886      o_prot.write_field_end()?;
5887      ()
5888    } else {
5889      ()
5890    }
5891    o_prot.write_field_stop()?;
5892    o_prot.write_struct_end()
5893  }
5894  fn ok_or(self) -> thrift::Result<bool> {
5895    if self.error1.is_some() {
5896      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
5897    } else if self.result_value.is_some() {
5898      Ok(self.result_value.unwrap())
5899    } else {
5900      Err(
5901        thrift::Error::Application(
5902          ApplicationError::new(
5903            ApplicationErrorKind::MissingResult,
5904            "no result received for SettingSystemServiceConnectToAppointedWifi"
5905          )
5906        )
5907      )
5908    }
5909  }
5910}
5911
5912//
5913// SettingSystemServiceGetNetworkSettingsArgs
5914//
5915
5916#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5917struct SettingSystemServiceGetNetworkSettingsArgs {
5918}
5919
5920impl SettingSystemServiceGetNetworkSettingsArgs {
5921  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetNetworkSettingsArgs> {
5922    i_prot.read_struct_begin()?;
5923    loop {
5924      let field_ident = i_prot.read_field_begin()?;
5925      if field_ident.field_type == TType::Stop {
5926        break;
5927      }
5928      let field_id = field_id(&field_ident)?;
5929      match field_id {
5930        _ => {
5931          i_prot.skip(field_ident.field_type)?;
5932        },
5933      };
5934      i_prot.read_field_end()?;
5935    }
5936    i_prot.read_struct_end()?;
5937    let ret = SettingSystemServiceGetNetworkSettingsArgs {};
5938    Ok(ret)
5939  }
5940  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5941    let struct_ident = TStructIdentifier::new("GetNetworkSettings_args");
5942    o_prot.write_struct_begin(&struct_ident)?;
5943    o_prot.write_field_stop()?;
5944    o_prot.write_struct_end()
5945  }
5946}
5947
5948//
5949// SettingSystemServiceGetNetworkSettingsResult
5950//
5951
5952#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5953struct SettingSystemServiceGetNetworkSettingsResult {
5954  result_value: Option<setting_system_s_d_k_data_types::RuyiNetworkSettings>,
5955  error1: Option<common_type_s_d_k_data_types::ErrorException>,
5956}
5957
5958impl SettingSystemServiceGetNetworkSettingsResult {
5959  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetNetworkSettingsResult> {
5960    i_prot.read_struct_begin()?;
5961    let mut f_0: Option<setting_system_s_d_k_data_types::RuyiNetworkSettings> = None;
5962    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
5963    loop {
5964      let field_ident = i_prot.read_field_begin()?;
5965      if field_ident.field_type == TType::Stop {
5966        break;
5967      }
5968      let field_id = field_id(&field_ident)?;
5969      match field_id {
5970        0 => {
5971          let val = setting_system_s_d_k_data_types::RuyiNetworkSettings::read_from_in_protocol(i_prot)?;
5972          f_0 = Some(val);
5973        },
5974        1 => {
5975          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
5976          f_1 = Some(val);
5977        },
5978        _ => {
5979          i_prot.skip(field_ident.field_type)?;
5980        },
5981      };
5982      i_prot.read_field_end()?;
5983    }
5984    i_prot.read_struct_end()?;
5985    let ret = SettingSystemServiceGetNetworkSettingsResult {
5986      result_value: f_0,
5987      error1: f_1,
5988    };
5989    Ok(ret)
5990  }
5991  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
5992    let struct_ident = TStructIdentifier::new("SettingSystemServiceGetNetworkSettingsResult");
5993    o_prot.write_struct_begin(&struct_ident)?;
5994    if let Some(ref fld_var) = self.result_value {
5995      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
5996      fld_var.write_to_out_protocol(o_prot)?;
5997      o_prot.write_field_end()?;
5998      ()
5999    } else {
6000      ()
6001    }
6002    if let Some(ref fld_var) = self.error1 {
6003      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
6004      fld_var.write_to_out_protocol(o_prot)?;
6005      o_prot.write_field_end()?;
6006      ()
6007    } else {
6008      ()
6009    }
6010    o_prot.write_field_stop()?;
6011    o_prot.write_struct_end()
6012  }
6013  fn ok_or(self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkSettings> {
6014    if self.error1.is_some() {
6015      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
6016    } else if self.result_value.is_some() {
6017      Ok(self.result_value.unwrap())
6018    } else {
6019      Err(
6020        thrift::Error::Application(
6021          ApplicationError::new(
6022            ApplicationErrorKind::MissingResult,
6023            "no result received for SettingSystemServiceGetNetworkSettings"
6024          )
6025        )
6026      )
6027    }
6028  }
6029}
6030
6031//
6032// SettingSystemServiceGetNetworkStatusArgs
6033//
6034
6035#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6036struct SettingSystemServiceGetNetworkStatusArgs {
6037}
6038
6039impl SettingSystemServiceGetNetworkStatusArgs {
6040  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetNetworkStatusArgs> {
6041    i_prot.read_struct_begin()?;
6042    loop {
6043      let field_ident = i_prot.read_field_begin()?;
6044      if field_ident.field_type == TType::Stop {
6045        break;
6046      }
6047      let field_id = field_id(&field_ident)?;
6048      match field_id {
6049        _ => {
6050          i_prot.skip(field_ident.field_type)?;
6051        },
6052      };
6053      i_prot.read_field_end()?;
6054    }
6055    i_prot.read_struct_end()?;
6056    let ret = SettingSystemServiceGetNetworkStatusArgs {};
6057    Ok(ret)
6058  }
6059  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6060    let struct_ident = TStructIdentifier::new("GetNetworkStatus_args");
6061    o_prot.write_struct_begin(&struct_ident)?;
6062    o_prot.write_field_stop()?;
6063    o_prot.write_struct_end()
6064  }
6065}
6066
6067//
6068// SettingSystemServiceGetNetworkStatusResult
6069//
6070
6071#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6072struct SettingSystemServiceGetNetworkStatusResult {
6073  result_value: Option<setting_system_s_d_k_data_types::RuyiNetworkStatus>,
6074  error1: Option<common_type_s_d_k_data_types::ErrorException>,
6075}
6076
6077impl SettingSystemServiceGetNetworkStatusResult {
6078  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetNetworkStatusResult> {
6079    i_prot.read_struct_begin()?;
6080    let mut f_0: Option<setting_system_s_d_k_data_types::RuyiNetworkStatus> = None;
6081    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
6082    loop {
6083      let field_ident = i_prot.read_field_begin()?;
6084      if field_ident.field_type == TType::Stop {
6085        break;
6086      }
6087      let field_id = field_id(&field_ident)?;
6088      match field_id {
6089        0 => {
6090          let val = setting_system_s_d_k_data_types::RuyiNetworkStatus::read_from_in_protocol(i_prot)?;
6091          f_0 = Some(val);
6092        },
6093        1 => {
6094          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
6095          f_1 = Some(val);
6096        },
6097        _ => {
6098          i_prot.skip(field_ident.field_type)?;
6099        },
6100      };
6101      i_prot.read_field_end()?;
6102    }
6103    i_prot.read_struct_end()?;
6104    let ret = SettingSystemServiceGetNetworkStatusResult {
6105      result_value: f_0,
6106      error1: f_1,
6107    };
6108    Ok(ret)
6109  }
6110  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6111    let struct_ident = TStructIdentifier::new("SettingSystemServiceGetNetworkStatusResult");
6112    o_prot.write_struct_begin(&struct_ident)?;
6113    if let Some(ref fld_var) = self.result_value {
6114      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
6115      fld_var.write_to_out_protocol(o_prot)?;
6116      o_prot.write_field_end()?;
6117      ()
6118    } else {
6119      ()
6120    }
6121    if let Some(ref fld_var) = self.error1 {
6122      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
6123      fld_var.write_to_out_protocol(o_prot)?;
6124      o_prot.write_field_end()?;
6125      ()
6126    } else {
6127      ()
6128    }
6129    o_prot.write_field_stop()?;
6130    o_prot.write_struct_end()
6131  }
6132  fn ok_or(self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkStatus> {
6133    if self.error1.is_some() {
6134      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
6135    } else if self.result_value.is_some() {
6136      Ok(self.result_value.unwrap())
6137    } else {
6138      Err(
6139        thrift::Error::Application(
6140          ApplicationError::new(
6141            ApplicationErrorKind::MissingResult,
6142            "no result received for SettingSystemServiceGetNetworkStatus"
6143          )
6144        )
6145      )
6146    }
6147  }
6148}
6149
6150//
6151// SettingSystemServiceRuyiTestNetworkArgs
6152//
6153
6154#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6155struct SettingSystemServiceRuyiTestNetworkArgs {
6156}
6157
6158impl SettingSystemServiceRuyiTestNetworkArgs {
6159  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRuyiTestNetworkArgs> {
6160    i_prot.read_struct_begin()?;
6161    loop {
6162      let field_ident = i_prot.read_field_begin()?;
6163      if field_ident.field_type == TType::Stop {
6164        break;
6165      }
6166      let field_id = field_id(&field_ident)?;
6167      match field_id {
6168        _ => {
6169          i_prot.skip(field_ident.field_type)?;
6170        },
6171      };
6172      i_prot.read_field_end()?;
6173    }
6174    i_prot.read_struct_end()?;
6175    let ret = SettingSystemServiceRuyiTestNetworkArgs {};
6176    Ok(ret)
6177  }
6178  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6179    let struct_ident = TStructIdentifier::new("RuyiTestNetwork_args");
6180    o_prot.write_struct_begin(&struct_ident)?;
6181    o_prot.write_field_stop()?;
6182    o_prot.write_struct_end()
6183  }
6184}
6185
6186//
6187// SettingSystemServiceRuyiTestNetworkResult
6188//
6189
6190#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6191struct SettingSystemServiceRuyiTestNetworkResult {
6192  result_value: Option<setting_system_s_d_k_data_types::RuyiNetworkTestResult>,
6193  error1: Option<common_type_s_d_k_data_types::ErrorException>,
6194}
6195
6196impl SettingSystemServiceRuyiTestNetworkResult {
6197  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRuyiTestNetworkResult> {
6198    i_prot.read_struct_begin()?;
6199    let mut f_0: Option<setting_system_s_d_k_data_types::RuyiNetworkTestResult> = None;
6200    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
6201    loop {
6202      let field_ident = i_prot.read_field_begin()?;
6203      if field_ident.field_type == TType::Stop {
6204        break;
6205      }
6206      let field_id = field_id(&field_ident)?;
6207      match field_id {
6208        0 => {
6209          let val = setting_system_s_d_k_data_types::RuyiNetworkTestResult::read_from_in_protocol(i_prot)?;
6210          f_0 = Some(val);
6211        },
6212        1 => {
6213          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
6214          f_1 = Some(val);
6215        },
6216        _ => {
6217          i_prot.skip(field_ident.field_type)?;
6218        },
6219      };
6220      i_prot.read_field_end()?;
6221    }
6222    i_prot.read_struct_end()?;
6223    let ret = SettingSystemServiceRuyiTestNetworkResult {
6224      result_value: f_0,
6225      error1: f_1,
6226    };
6227    Ok(ret)
6228  }
6229  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6230    let struct_ident = TStructIdentifier::new("SettingSystemServiceRuyiTestNetworkResult");
6231    o_prot.write_struct_begin(&struct_ident)?;
6232    if let Some(ref fld_var) = self.result_value {
6233      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Struct, 0))?;
6234      fld_var.write_to_out_protocol(o_prot)?;
6235      o_prot.write_field_end()?;
6236      ()
6237    } else {
6238      ()
6239    }
6240    if let Some(ref fld_var) = self.error1 {
6241      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
6242      fld_var.write_to_out_protocol(o_prot)?;
6243      o_prot.write_field_end()?;
6244      ()
6245    } else {
6246      ()
6247    }
6248    o_prot.write_field_stop()?;
6249    o_prot.write_struct_end()
6250  }
6251  fn ok_or(self) -> thrift::Result<setting_system_s_d_k_data_types::RuyiNetworkTestResult> {
6252    if self.error1.is_some() {
6253      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
6254    } else if self.result_value.is_some() {
6255      Ok(self.result_value.unwrap())
6256    } else {
6257      Err(
6258        thrift::Error::Application(
6259          ApplicationError::new(
6260            ApplicationErrorKind::MissingResult,
6261            "no result received for SettingSystemServiceRuyiTestNetwork"
6262          )
6263        )
6264      )
6265    }
6266  }
6267}
6268
6269//
6270// SettingSystemServiceRuyiStartNetworkSpeedTestArgs
6271//
6272
6273#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6274struct SettingSystemServiceRuyiStartNetworkSpeedTestArgs {
6275  userindex: i32,
6276}
6277
6278impl SettingSystemServiceRuyiStartNetworkSpeedTestArgs {
6279  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRuyiStartNetworkSpeedTestArgs> {
6280    i_prot.read_struct_begin()?;
6281    let mut f_1: Option<i32> = None;
6282    loop {
6283      let field_ident = i_prot.read_field_begin()?;
6284      if field_ident.field_type == TType::Stop {
6285        break;
6286      }
6287      let field_id = field_id(&field_ident)?;
6288      match field_id {
6289        1 => {
6290          let val = i_prot.read_i32()?;
6291          f_1 = Some(val);
6292        },
6293        _ => {
6294          i_prot.skip(field_ident.field_type)?;
6295        },
6296      };
6297      i_prot.read_field_end()?;
6298    }
6299    i_prot.read_struct_end()?;
6300    verify_required_field_exists("SettingSystemServiceRuyiStartNetworkSpeedTestArgs.userindex", &f_1)?;
6301    let ret = SettingSystemServiceRuyiStartNetworkSpeedTestArgs {
6302      userindex: f_1.expect("auto-generated code should have checked for presence of required fields"),
6303    };
6304    Ok(ret)
6305  }
6306  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6307    let struct_ident = TStructIdentifier::new("RuyiStartNetworkSpeedTest_args");
6308    o_prot.write_struct_begin(&struct_ident)?;
6309    o_prot.write_field_begin(&TFieldIdentifier::new("userindex", TType::I32, 1))?;
6310    o_prot.write_i32(self.userindex)?;
6311    o_prot.write_field_end()?;
6312    o_prot.write_field_stop()?;
6313    o_prot.write_struct_end()
6314  }
6315}
6316
6317//
6318// SettingSystemServiceRuyiStartNetworkSpeedTestResult
6319//
6320
6321#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6322struct SettingSystemServiceRuyiStartNetworkSpeedTestResult {
6323  result_value: Option<bool>,
6324  error1: Option<common_type_s_d_k_data_types::ErrorException>,
6325}
6326
6327impl SettingSystemServiceRuyiStartNetworkSpeedTestResult {
6328  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRuyiStartNetworkSpeedTestResult> {
6329    i_prot.read_struct_begin()?;
6330    let mut f_0: Option<bool> = None;
6331    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
6332    loop {
6333      let field_ident = i_prot.read_field_begin()?;
6334      if field_ident.field_type == TType::Stop {
6335        break;
6336      }
6337      let field_id = field_id(&field_ident)?;
6338      match field_id {
6339        0 => {
6340          let val = i_prot.read_bool()?;
6341          f_0 = Some(val);
6342        },
6343        1 => {
6344          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
6345          f_1 = Some(val);
6346        },
6347        _ => {
6348          i_prot.skip(field_ident.field_type)?;
6349        },
6350      };
6351      i_prot.read_field_end()?;
6352    }
6353    i_prot.read_struct_end()?;
6354    let ret = SettingSystemServiceRuyiStartNetworkSpeedTestResult {
6355      result_value: f_0,
6356      error1: f_1,
6357    };
6358    Ok(ret)
6359  }
6360  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6361    let struct_ident = TStructIdentifier::new("SettingSystemServiceRuyiStartNetworkSpeedTestResult");
6362    o_prot.write_struct_begin(&struct_ident)?;
6363    if let Some(fld_var) = self.result_value {
6364      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
6365      o_prot.write_bool(fld_var)?;
6366      o_prot.write_field_end()?;
6367      ()
6368    } else {
6369      ()
6370    }
6371    if let Some(ref fld_var) = self.error1 {
6372      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
6373      fld_var.write_to_out_protocol(o_prot)?;
6374      o_prot.write_field_end()?;
6375      ()
6376    } else {
6377      ()
6378    }
6379    o_prot.write_field_stop()?;
6380    o_prot.write_struct_end()
6381  }
6382  fn ok_or(self) -> thrift::Result<bool> {
6383    if self.error1.is_some() {
6384      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
6385    } else if self.result_value.is_some() {
6386      Ok(self.result_value.unwrap())
6387    } else {
6388      Err(
6389        thrift::Error::Application(
6390          ApplicationError::new(
6391            ApplicationErrorKind::MissingResult,
6392            "no result received for SettingSystemServiceRuyiStartNetworkSpeedTest"
6393          )
6394        )
6395      )
6396    }
6397  }
6398}
6399
6400//
6401// SettingSystemServiceRuyiStopNetworkSpeedTestArgs
6402//
6403
6404#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6405struct SettingSystemServiceRuyiStopNetworkSpeedTestArgs {
6406  userindex: i32,
6407}
6408
6409impl SettingSystemServiceRuyiStopNetworkSpeedTestArgs {
6410  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRuyiStopNetworkSpeedTestArgs> {
6411    i_prot.read_struct_begin()?;
6412    let mut f_1: Option<i32> = None;
6413    loop {
6414      let field_ident = i_prot.read_field_begin()?;
6415      if field_ident.field_type == TType::Stop {
6416        break;
6417      }
6418      let field_id = field_id(&field_ident)?;
6419      match field_id {
6420        1 => {
6421          let val = i_prot.read_i32()?;
6422          f_1 = Some(val);
6423        },
6424        _ => {
6425          i_prot.skip(field_ident.field_type)?;
6426        },
6427      };
6428      i_prot.read_field_end()?;
6429    }
6430    i_prot.read_struct_end()?;
6431    verify_required_field_exists("SettingSystemServiceRuyiStopNetworkSpeedTestArgs.userindex", &f_1)?;
6432    let ret = SettingSystemServiceRuyiStopNetworkSpeedTestArgs {
6433      userindex: f_1.expect("auto-generated code should have checked for presence of required fields"),
6434    };
6435    Ok(ret)
6436  }
6437  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6438    let struct_ident = TStructIdentifier::new("RuyiStopNetworkSpeedTest_args");
6439    o_prot.write_struct_begin(&struct_ident)?;
6440    o_prot.write_field_begin(&TFieldIdentifier::new("userindex", TType::I32, 1))?;
6441    o_prot.write_i32(self.userindex)?;
6442    o_prot.write_field_end()?;
6443    o_prot.write_field_stop()?;
6444    o_prot.write_struct_end()
6445  }
6446}
6447
6448//
6449// SettingSystemServiceRuyiStopNetworkSpeedTestResult
6450//
6451
6452#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6453struct SettingSystemServiceRuyiStopNetworkSpeedTestResult {
6454  result_value: Option<bool>,
6455  error1: Option<common_type_s_d_k_data_types::ErrorException>,
6456}
6457
6458impl SettingSystemServiceRuyiStopNetworkSpeedTestResult {
6459  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRuyiStopNetworkSpeedTestResult> {
6460    i_prot.read_struct_begin()?;
6461    let mut f_0: Option<bool> = None;
6462    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
6463    loop {
6464      let field_ident = i_prot.read_field_begin()?;
6465      if field_ident.field_type == TType::Stop {
6466        break;
6467      }
6468      let field_id = field_id(&field_ident)?;
6469      match field_id {
6470        0 => {
6471          let val = i_prot.read_bool()?;
6472          f_0 = Some(val);
6473        },
6474        1 => {
6475          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
6476          f_1 = Some(val);
6477        },
6478        _ => {
6479          i_prot.skip(field_ident.field_type)?;
6480        },
6481      };
6482      i_prot.read_field_end()?;
6483    }
6484    i_prot.read_struct_end()?;
6485    let ret = SettingSystemServiceRuyiStopNetworkSpeedTestResult {
6486      result_value: f_0,
6487      error1: f_1,
6488    };
6489    Ok(ret)
6490  }
6491  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6492    let struct_ident = TStructIdentifier::new("SettingSystemServiceRuyiStopNetworkSpeedTestResult");
6493    o_prot.write_struct_begin(&struct_ident)?;
6494    if let Some(fld_var) = self.result_value {
6495      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
6496      o_prot.write_bool(fld_var)?;
6497      o_prot.write_field_end()?;
6498      ()
6499    } else {
6500      ()
6501    }
6502    if let Some(ref fld_var) = self.error1 {
6503      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
6504      fld_var.write_to_out_protocol(o_prot)?;
6505      o_prot.write_field_end()?;
6506      ()
6507    } else {
6508      ()
6509    }
6510    o_prot.write_field_stop()?;
6511    o_prot.write_struct_end()
6512  }
6513  fn ok_or(self) -> thrift::Result<bool> {
6514    if self.error1.is_some() {
6515      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
6516    } else if self.result_value.is_some() {
6517      Ok(self.result_value.unwrap())
6518    } else {
6519      Err(
6520        thrift::Error::Application(
6521          ApplicationError::new(
6522            ApplicationErrorKind::MissingResult,
6523            "no result received for SettingSystemServiceRuyiStopNetworkSpeedTest"
6524          )
6525        )
6526      )
6527    }
6528  }
6529}
6530
6531//
6532// SettingSystemServiceGetAvailableWifiArgs
6533//
6534
6535#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6536struct SettingSystemServiceGetAvailableWifiArgs {
6537}
6538
6539impl SettingSystemServiceGetAvailableWifiArgs {
6540  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetAvailableWifiArgs> {
6541    i_prot.read_struct_begin()?;
6542    loop {
6543      let field_ident = i_prot.read_field_begin()?;
6544      if field_ident.field_type == TType::Stop {
6545        break;
6546      }
6547      let field_id = field_id(&field_ident)?;
6548      match field_id {
6549        _ => {
6550          i_prot.skip(field_ident.field_type)?;
6551        },
6552      };
6553      i_prot.read_field_end()?;
6554    }
6555    i_prot.read_struct_end()?;
6556    let ret = SettingSystemServiceGetAvailableWifiArgs {};
6557    Ok(ret)
6558  }
6559  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6560    let struct_ident = TStructIdentifier::new("GetAvailableWifi_args");
6561    o_prot.write_struct_begin(&struct_ident)?;
6562    o_prot.write_field_stop()?;
6563    o_prot.write_struct_end()
6564  }
6565}
6566
6567//
6568// SettingSystemServiceGetAvailableWifiResult
6569//
6570
6571#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6572struct SettingSystemServiceGetAvailableWifiResult {
6573  result_value: Option<Vec<setting_system_s_d_k_data_types::WifiEntity>>,
6574  error1: Option<common_type_s_d_k_data_types::ErrorException>,
6575}
6576
6577impl SettingSystemServiceGetAvailableWifiResult {
6578  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceGetAvailableWifiResult> {
6579    i_prot.read_struct_begin()?;
6580    let mut f_0: Option<Vec<setting_system_s_d_k_data_types::WifiEntity>> = None;
6581    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
6582    loop {
6583      let field_ident = i_prot.read_field_begin()?;
6584      if field_ident.field_type == TType::Stop {
6585        break;
6586      }
6587      let field_id = field_id(&field_ident)?;
6588      match field_id {
6589        0 => {
6590          let list_ident = i_prot.read_list_begin()?;
6591          let mut val: Vec<setting_system_s_d_k_data_types::WifiEntity> = Vec::with_capacity(list_ident.size as usize);
6592          for _ in 0..list_ident.size {
6593            let list_elem_10 = setting_system_s_d_k_data_types::WifiEntity::read_from_in_protocol(i_prot)?;
6594            val.push(list_elem_10);
6595          }
6596          i_prot.read_list_end()?;
6597          f_0 = Some(val);
6598        },
6599        1 => {
6600          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
6601          f_1 = Some(val);
6602        },
6603        _ => {
6604          i_prot.skip(field_ident.field_type)?;
6605        },
6606      };
6607      i_prot.read_field_end()?;
6608    }
6609    i_prot.read_struct_end()?;
6610    let ret = SettingSystemServiceGetAvailableWifiResult {
6611      result_value: f_0,
6612      error1: f_1,
6613    };
6614    Ok(ret)
6615  }
6616  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6617    let struct_ident = TStructIdentifier::new("SettingSystemServiceGetAvailableWifiResult");
6618    o_prot.write_struct_begin(&struct_ident)?;
6619    if let Some(ref fld_var) = self.result_value {
6620      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::List, 0))?;
6621      o_prot.write_list_begin(&TListIdentifier::new(TType::Struct, fld_var.len() as i32))?;
6622      for e in fld_var {
6623        e.write_to_out_protocol(o_prot)?;
6624        o_prot.write_list_end()?;
6625      }
6626      o_prot.write_field_end()?;
6627      ()
6628    } else {
6629      ()
6630    }
6631    if let Some(ref fld_var) = self.error1 {
6632      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
6633      fld_var.write_to_out_protocol(o_prot)?;
6634      o_prot.write_field_end()?;
6635      ()
6636    } else {
6637      ()
6638    }
6639    o_prot.write_field_stop()?;
6640    o_prot.write_struct_end()
6641  }
6642  fn ok_or(self) -> thrift::Result<Vec<setting_system_s_d_k_data_types::WifiEntity>> {
6643    if self.error1.is_some() {
6644      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
6645    } else if self.result_value.is_some() {
6646      Ok(self.result_value.unwrap())
6647    } else {
6648      Err(
6649        thrift::Error::Application(
6650          ApplicationError::new(
6651            ApplicationErrorKind::MissingResult,
6652            "no result received for SettingSystemServiceGetAvailableWifi"
6653          )
6654        )
6655      )
6656    }
6657  }
6658}
6659
6660//
6661// SettingSystemServiceDisconnectWifiArgs
6662//
6663
6664#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6665struct SettingSystemServiceDisconnectWifiArgs {
6666}
6667
6668impl SettingSystemServiceDisconnectWifiArgs {
6669  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceDisconnectWifiArgs> {
6670    i_prot.read_struct_begin()?;
6671    loop {
6672      let field_ident = i_prot.read_field_begin()?;
6673      if field_ident.field_type == TType::Stop {
6674        break;
6675      }
6676      let field_id = field_id(&field_ident)?;
6677      match field_id {
6678        _ => {
6679          i_prot.skip(field_ident.field_type)?;
6680        },
6681      };
6682      i_prot.read_field_end()?;
6683    }
6684    i_prot.read_struct_end()?;
6685    let ret = SettingSystemServiceDisconnectWifiArgs {};
6686    Ok(ret)
6687  }
6688  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6689    let struct_ident = TStructIdentifier::new("DisconnectWifi_args");
6690    o_prot.write_struct_begin(&struct_ident)?;
6691    o_prot.write_field_stop()?;
6692    o_prot.write_struct_end()
6693  }
6694}
6695
6696//
6697// SettingSystemServiceDisconnectWifiResult
6698//
6699
6700#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6701struct SettingSystemServiceDisconnectWifiResult {
6702  result_value: Option<bool>,
6703  error1: Option<common_type_s_d_k_data_types::ErrorException>,
6704}
6705
6706impl SettingSystemServiceDisconnectWifiResult {
6707  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceDisconnectWifiResult> {
6708    i_prot.read_struct_begin()?;
6709    let mut f_0: Option<bool> = None;
6710    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
6711    loop {
6712      let field_ident = i_prot.read_field_begin()?;
6713      if field_ident.field_type == TType::Stop {
6714        break;
6715      }
6716      let field_id = field_id(&field_ident)?;
6717      match field_id {
6718        0 => {
6719          let val = i_prot.read_bool()?;
6720          f_0 = Some(val);
6721        },
6722        1 => {
6723          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
6724          f_1 = Some(val);
6725        },
6726        _ => {
6727          i_prot.skip(field_ident.field_type)?;
6728        },
6729      };
6730      i_prot.read_field_end()?;
6731    }
6732    i_prot.read_struct_end()?;
6733    let ret = SettingSystemServiceDisconnectWifiResult {
6734      result_value: f_0,
6735      error1: f_1,
6736    };
6737    Ok(ret)
6738  }
6739  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6740    let struct_ident = TStructIdentifier::new("SettingSystemServiceDisconnectWifiResult");
6741    o_prot.write_struct_begin(&struct_ident)?;
6742    if let Some(fld_var) = self.result_value {
6743      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
6744      o_prot.write_bool(fld_var)?;
6745      o_prot.write_field_end()?;
6746      ()
6747    } else {
6748      ()
6749    }
6750    if let Some(ref fld_var) = self.error1 {
6751      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
6752      fld_var.write_to_out_protocol(o_prot)?;
6753      o_prot.write_field_end()?;
6754      ()
6755    } else {
6756      ()
6757    }
6758    o_prot.write_field_stop()?;
6759    o_prot.write_struct_end()
6760  }
6761  fn ok_or(self) -> thrift::Result<bool> {
6762    if self.error1.is_some() {
6763      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
6764    } else if self.result_value.is_some() {
6765      Ok(self.result_value.unwrap())
6766    } else {
6767      Err(
6768        thrift::Error::Application(
6769          ApplicationError::new(
6770            ApplicationErrorKind::MissingResult,
6771            "no result received for SettingSystemServiceDisconnectWifi"
6772          )
6773        )
6774      )
6775    }
6776  }
6777}
6778
6779//
6780// SettingSystemServiceDiscoverBluetoothDeviceArgs
6781//
6782
6783#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6784struct SettingSystemServiceDiscoverBluetoothDeviceArgs {
6785}
6786
6787impl SettingSystemServiceDiscoverBluetoothDeviceArgs {
6788  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceDiscoverBluetoothDeviceArgs> {
6789    i_prot.read_struct_begin()?;
6790    loop {
6791      let field_ident = i_prot.read_field_begin()?;
6792      if field_ident.field_type == TType::Stop {
6793        break;
6794      }
6795      let field_id = field_id(&field_ident)?;
6796      match field_id {
6797        _ => {
6798          i_prot.skip(field_ident.field_type)?;
6799        },
6800      };
6801      i_prot.read_field_end()?;
6802    }
6803    i_prot.read_struct_end()?;
6804    let ret = SettingSystemServiceDiscoverBluetoothDeviceArgs {};
6805    Ok(ret)
6806  }
6807  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6808    let struct_ident = TStructIdentifier::new("DiscoverBluetoothDevice_args");
6809    o_prot.write_struct_begin(&struct_ident)?;
6810    o_prot.write_field_stop()?;
6811    o_prot.write_struct_end()
6812  }
6813}
6814
6815//
6816// SettingSystemServiceDiscoverBluetoothDeviceResult
6817//
6818
6819#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6820struct SettingSystemServiceDiscoverBluetoothDeviceResult {
6821  result_value: Option<bool>,
6822  error1: Option<common_type_s_d_k_data_types::ErrorException>,
6823}
6824
6825impl SettingSystemServiceDiscoverBluetoothDeviceResult {
6826  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceDiscoverBluetoothDeviceResult> {
6827    i_prot.read_struct_begin()?;
6828    let mut f_0: Option<bool> = None;
6829    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
6830    loop {
6831      let field_ident = i_prot.read_field_begin()?;
6832      if field_ident.field_type == TType::Stop {
6833        break;
6834      }
6835      let field_id = field_id(&field_ident)?;
6836      match field_id {
6837        0 => {
6838          let val = i_prot.read_bool()?;
6839          f_0 = Some(val);
6840        },
6841        1 => {
6842          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
6843          f_1 = Some(val);
6844        },
6845        _ => {
6846          i_prot.skip(field_ident.field_type)?;
6847        },
6848      };
6849      i_prot.read_field_end()?;
6850    }
6851    i_prot.read_struct_end()?;
6852    let ret = SettingSystemServiceDiscoverBluetoothDeviceResult {
6853      result_value: f_0,
6854      error1: f_1,
6855    };
6856    Ok(ret)
6857  }
6858  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6859    let struct_ident = TStructIdentifier::new("SettingSystemServiceDiscoverBluetoothDeviceResult");
6860    o_prot.write_struct_begin(&struct_ident)?;
6861    if let Some(fld_var) = self.result_value {
6862      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
6863      o_prot.write_bool(fld_var)?;
6864      o_prot.write_field_end()?;
6865      ()
6866    } else {
6867      ()
6868    }
6869    if let Some(ref fld_var) = self.error1 {
6870      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
6871      fld_var.write_to_out_protocol(o_prot)?;
6872      o_prot.write_field_end()?;
6873      ()
6874    } else {
6875      ()
6876    }
6877    o_prot.write_field_stop()?;
6878    o_prot.write_struct_end()
6879  }
6880  fn ok_or(self) -> thrift::Result<bool> {
6881    if self.error1.is_some() {
6882      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
6883    } else if self.result_value.is_some() {
6884      Ok(self.result_value.unwrap())
6885    } else {
6886      Err(
6887        thrift::Error::Application(
6888          ApplicationError::new(
6889            ApplicationErrorKind::MissingResult,
6890            "no result received for SettingSystemServiceDiscoverBluetoothDevice"
6891          )
6892        )
6893      )
6894    }
6895  }
6896}
6897
6898//
6899// SettingSystemServiceConnectBluetoothDeviceArgs
6900//
6901
6902#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6903struct SettingSystemServiceConnectBluetoothDeviceArgs {
6904  device_name: String,
6905  device_address: String,
6906}
6907
6908impl SettingSystemServiceConnectBluetoothDeviceArgs {
6909  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceConnectBluetoothDeviceArgs> {
6910    i_prot.read_struct_begin()?;
6911    let mut f_1: Option<String> = None;
6912    let mut f_2: Option<String> = None;
6913    loop {
6914      let field_ident = i_prot.read_field_begin()?;
6915      if field_ident.field_type == TType::Stop {
6916        break;
6917      }
6918      let field_id = field_id(&field_ident)?;
6919      match field_id {
6920        1 => {
6921          let val = i_prot.read_string()?;
6922          f_1 = Some(val);
6923        },
6924        2 => {
6925          let val = i_prot.read_string()?;
6926          f_2 = Some(val);
6927        },
6928        _ => {
6929          i_prot.skip(field_ident.field_type)?;
6930        },
6931      };
6932      i_prot.read_field_end()?;
6933    }
6934    i_prot.read_struct_end()?;
6935    verify_required_field_exists("SettingSystemServiceConnectBluetoothDeviceArgs.device_name", &f_1)?;
6936    verify_required_field_exists("SettingSystemServiceConnectBluetoothDeviceArgs.device_address", &f_2)?;
6937    let ret = SettingSystemServiceConnectBluetoothDeviceArgs {
6938      device_name: f_1.expect("auto-generated code should have checked for presence of required fields"),
6939      device_address: f_2.expect("auto-generated code should have checked for presence of required fields"),
6940    };
6941    Ok(ret)
6942  }
6943  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
6944    let struct_ident = TStructIdentifier::new("ConnectBluetoothDevice_args");
6945    o_prot.write_struct_begin(&struct_ident)?;
6946    o_prot.write_field_begin(&TFieldIdentifier::new("DeviceName", TType::String, 1))?;
6947    o_prot.write_string(&self.device_name)?;
6948    o_prot.write_field_end()?;
6949    o_prot.write_field_begin(&TFieldIdentifier::new("DeviceAddress", TType::String, 2))?;
6950    o_prot.write_string(&self.device_address)?;
6951    o_prot.write_field_end()?;
6952    o_prot.write_field_stop()?;
6953    o_prot.write_struct_end()
6954  }
6955}
6956
6957//
6958// SettingSystemServiceConnectBluetoothDeviceResult
6959//
6960
6961#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6962struct SettingSystemServiceConnectBluetoothDeviceResult {
6963  result_value: Option<bool>,
6964  error1: Option<common_type_s_d_k_data_types::ErrorException>,
6965}
6966
6967impl SettingSystemServiceConnectBluetoothDeviceResult {
6968  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceConnectBluetoothDeviceResult> {
6969    i_prot.read_struct_begin()?;
6970    let mut f_0: Option<bool> = None;
6971    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
6972    loop {
6973      let field_ident = i_prot.read_field_begin()?;
6974      if field_ident.field_type == TType::Stop {
6975        break;
6976      }
6977      let field_id = field_id(&field_ident)?;
6978      match field_id {
6979        0 => {
6980          let val = i_prot.read_bool()?;
6981          f_0 = Some(val);
6982        },
6983        1 => {
6984          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
6985          f_1 = Some(val);
6986        },
6987        _ => {
6988          i_prot.skip(field_ident.field_type)?;
6989        },
6990      };
6991      i_prot.read_field_end()?;
6992    }
6993    i_prot.read_struct_end()?;
6994    let ret = SettingSystemServiceConnectBluetoothDeviceResult {
6995      result_value: f_0,
6996      error1: f_1,
6997    };
6998    Ok(ret)
6999  }
7000  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
7001    let struct_ident = TStructIdentifier::new("SettingSystemServiceConnectBluetoothDeviceResult");
7002    o_prot.write_struct_begin(&struct_ident)?;
7003    if let Some(fld_var) = self.result_value {
7004      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
7005      o_prot.write_bool(fld_var)?;
7006      o_prot.write_field_end()?;
7007      ()
7008    } else {
7009      ()
7010    }
7011    if let Some(ref fld_var) = self.error1 {
7012      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
7013      fld_var.write_to_out_protocol(o_prot)?;
7014      o_prot.write_field_end()?;
7015      ()
7016    } else {
7017      ()
7018    }
7019    o_prot.write_field_stop()?;
7020    o_prot.write_struct_end()
7021  }
7022  fn ok_or(self) -> thrift::Result<bool> {
7023    if self.error1.is_some() {
7024      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
7025    } else if self.result_value.is_some() {
7026      Ok(self.result_value.unwrap())
7027    } else {
7028      Err(
7029        thrift::Error::Application(
7030          ApplicationError::new(
7031            ApplicationErrorKind::MissingResult,
7032            "no result received for SettingSystemServiceConnectBluetoothDevice"
7033          )
7034        )
7035      )
7036    }
7037  }
7038}
7039
7040//
7041// SettingSystemServiceDisconnectBluetoothDeviceArgs
7042//
7043
7044#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7045struct SettingSystemServiceDisconnectBluetoothDeviceArgs {
7046  device_name: String,
7047  device_address: String,
7048}
7049
7050impl SettingSystemServiceDisconnectBluetoothDeviceArgs {
7051  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceDisconnectBluetoothDeviceArgs> {
7052    i_prot.read_struct_begin()?;
7053    let mut f_1: Option<String> = None;
7054    let mut f_2: Option<String> = None;
7055    loop {
7056      let field_ident = i_prot.read_field_begin()?;
7057      if field_ident.field_type == TType::Stop {
7058        break;
7059      }
7060      let field_id = field_id(&field_ident)?;
7061      match field_id {
7062        1 => {
7063          let val = i_prot.read_string()?;
7064          f_1 = Some(val);
7065        },
7066        2 => {
7067          let val = i_prot.read_string()?;
7068          f_2 = Some(val);
7069        },
7070        _ => {
7071          i_prot.skip(field_ident.field_type)?;
7072        },
7073      };
7074      i_prot.read_field_end()?;
7075    }
7076    i_prot.read_struct_end()?;
7077    verify_required_field_exists("SettingSystemServiceDisconnectBluetoothDeviceArgs.device_name", &f_1)?;
7078    verify_required_field_exists("SettingSystemServiceDisconnectBluetoothDeviceArgs.device_address", &f_2)?;
7079    let ret = SettingSystemServiceDisconnectBluetoothDeviceArgs {
7080      device_name: f_1.expect("auto-generated code should have checked for presence of required fields"),
7081      device_address: f_2.expect("auto-generated code should have checked for presence of required fields"),
7082    };
7083    Ok(ret)
7084  }
7085  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
7086    let struct_ident = TStructIdentifier::new("DisconnectBluetoothDevice_args");
7087    o_prot.write_struct_begin(&struct_ident)?;
7088    o_prot.write_field_begin(&TFieldIdentifier::new("DeviceName", TType::String, 1))?;
7089    o_prot.write_string(&self.device_name)?;
7090    o_prot.write_field_end()?;
7091    o_prot.write_field_begin(&TFieldIdentifier::new("DeviceAddress", TType::String, 2))?;
7092    o_prot.write_string(&self.device_address)?;
7093    o_prot.write_field_end()?;
7094    o_prot.write_field_stop()?;
7095    o_prot.write_struct_end()
7096  }
7097}
7098
7099//
7100// SettingSystemServiceDisconnectBluetoothDeviceResult
7101//
7102
7103#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7104struct SettingSystemServiceDisconnectBluetoothDeviceResult {
7105  result_value: Option<bool>,
7106  error1: Option<common_type_s_d_k_data_types::ErrorException>,
7107}
7108
7109impl SettingSystemServiceDisconnectBluetoothDeviceResult {
7110  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceDisconnectBluetoothDeviceResult> {
7111    i_prot.read_struct_begin()?;
7112    let mut f_0: Option<bool> = None;
7113    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
7114    loop {
7115      let field_ident = i_prot.read_field_begin()?;
7116      if field_ident.field_type == TType::Stop {
7117        break;
7118      }
7119      let field_id = field_id(&field_ident)?;
7120      match field_id {
7121        0 => {
7122          let val = i_prot.read_bool()?;
7123          f_0 = Some(val);
7124        },
7125        1 => {
7126          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
7127          f_1 = Some(val);
7128        },
7129        _ => {
7130          i_prot.skip(field_ident.field_type)?;
7131        },
7132      };
7133      i_prot.read_field_end()?;
7134    }
7135    i_prot.read_struct_end()?;
7136    let ret = SettingSystemServiceDisconnectBluetoothDeviceResult {
7137      result_value: f_0,
7138      error1: f_1,
7139    };
7140    Ok(ret)
7141  }
7142  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
7143    let struct_ident = TStructIdentifier::new("SettingSystemServiceDisconnectBluetoothDeviceResult");
7144    o_prot.write_struct_begin(&struct_ident)?;
7145    if let Some(fld_var) = self.result_value {
7146      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
7147      o_prot.write_bool(fld_var)?;
7148      o_prot.write_field_end()?;
7149      ()
7150    } else {
7151      ()
7152    }
7153    if let Some(ref fld_var) = self.error1 {
7154      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
7155      fld_var.write_to_out_protocol(o_prot)?;
7156      o_prot.write_field_end()?;
7157      ()
7158    } else {
7159      ()
7160    }
7161    o_prot.write_field_stop()?;
7162    o_prot.write_struct_end()
7163  }
7164  fn ok_or(self) -> thrift::Result<bool> {
7165    if self.error1.is_some() {
7166      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
7167    } else if self.result_value.is_some() {
7168      Ok(self.result_value.unwrap())
7169    } else {
7170      Err(
7171        thrift::Error::Application(
7172          ApplicationError::new(
7173            ApplicationErrorKind::MissingResult,
7174            "no result received for SettingSystemServiceDisconnectBluetoothDevice"
7175          )
7176        )
7177      )
7178    }
7179  }
7180}
7181
7182//
7183// SettingSystemServiceRemoveBluetoothDeviceArgs
7184//
7185
7186#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7187struct SettingSystemServiceRemoveBluetoothDeviceArgs {
7188  device_name: String,
7189  device_address: String,
7190}
7191
7192impl SettingSystemServiceRemoveBluetoothDeviceArgs {
7193  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRemoveBluetoothDeviceArgs> {
7194    i_prot.read_struct_begin()?;
7195    let mut f_1: Option<String> = None;
7196    let mut f_2: Option<String> = None;
7197    loop {
7198      let field_ident = i_prot.read_field_begin()?;
7199      if field_ident.field_type == TType::Stop {
7200        break;
7201      }
7202      let field_id = field_id(&field_ident)?;
7203      match field_id {
7204        1 => {
7205          let val = i_prot.read_string()?;
7206          f_1 = Some(val);
7207        },
7208        2 => {
7209          let val = i_prot.read_string()?;
7210          f_2 = Some(val);
7211        },
7212        _ => {
7213          i_prot.skip(field_ident.field_type)?;
7214        },
7215      };
7216      i_prot.read_field_end()?;
7217    }
7218    i_prot.read_struct_end()?;
7219    verify_required_field_exists("SettingSystemServiceRemoveBluetoothDeviceArgs.device_name", &f_1)?;
7220    verify_required_field_exists("SettingSystemServiceRemoveBluetoothDeviceArgs.device_address", &f_2)?;
7221    let ret = SettingSystemServiceRemoveBluetoothDeviceArgs {
7222      device_name: f_1.expect("auto-generated code should have checked for presence of required fields"),
7223      device_address: f_2.expect("auto-generated code should have checked for presence of required fields"),
7224    };
7225    Ok(ret)
7226  }
7227  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
7228    let struct_ident = TStructIdentifier::new("RemoveBluetoothDevice_args");
7229    o_prot.write_struct_begin(&struct_ident)?;
7230    o_prot.write_field_begin(&TFieldIdentifier::new("DeviceName", TType::String, 1))?;
7231    o_prot.write_string(&self.device_name)?;
7232    o_prot.write_field_end()?;
7233    o_prot.write_field_begin(&TFieldIdentifier::new("DeviceAddress", TType::String, 2))?;
7234    o_prot.write_string(&self.device_address)?;
7235    o_prot.write_field_end()?;
7236    o_prot.write_field_stop()?;
7237    o_prot.write_struct_end()
7238  }
7239}
7240
7241//
7242// SettingSystemServiceRemoveBluetoothDeviceResult
7243//
7244
7245#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7246struct SettingSystemServiceRemoveBluetoothDeviceResult {
7247  result_value: Option<bool>,
7248  error1: Option<common_type_s_d_k_data_types::ErrorException>,
7249}
7250
7251impl SettingSystemServiceRemoveBluetoothDeviceResult {
7252  fn read_from_in_protocol(i_prot: &mut TInputProtocol) -> thrift::Result<SettingSystemServiceRemoveBluetoothDeviceResult> {
7253    i_prot.read_struct_begin()?;
7254    let mut f_0: Option<bool> = None;
7255    let mut f_1: Option<common_type_s_d_k_data_types::ErrorException> = None;
7256    loop {
7257      let field_ident = i_prot.read_field_begin()?;
7258      if field_ident.field_type == TType::Stop {
7259        break;
7260      }
7261      let field_id = field_id(&field_ident)?;
7262      match field_id {
7263        0 => {
7264          let val = i_prot.read_bool()?;
7265          f_0 = Some(val);
7266        },
7267        1 => {
7268          let val = common_type_s_d_k_data_types::ErrorException::read_from_in_protocol(i_prot)?;
7269          f_1 = Some(val);
7270        },
7271        _ => {
7272          i_prot.skip(field_ident.field_type)?;
7273        },
7274      };
7275      i_prot.read_field_end()?;
7276    }
7277    i_prot.read_struct_end()?;
7278    let ret = SettingSystemServiceRemoveBluetoothDeviceResult {
7279      result_value: f_0,
7280      error1: f_1,
7281    };
7282    Ok(ret)
7283  }
7284  fn write_to_out_protocol(&self, o_prot: &mut TOutputProtocol) -> thrift::Result<()> {
7285    let struct_ident = TStructIdentifier::new("SettingSystemServiceRemoveBluetoothDeviceResult");
7286    o_prot.write_struct_begin(&struct_ident)?;
7287    if let Some(fld_var) = self.result_value {
7288      o_prot.write_field_begin(&TFieldIdentifier::new("result_value", TType::Bool, 0))?;
7289      o_prot.write_bool(fld_var)?;
7290      o_prot.write_field_end()?;
7291      ()
7292    } else {
7293      ()
7294    }
7295    if let Some(ref fld_var) = self.error1 {
7296      o_prot.write_field_begin(&TFieldIdentifier::new("error1", TType::Struct, 1))?;
7297      fld_var.write_to_out_protocol(o_prot)?;
7298      o_prot.write_field_end()?;
7299      ()
7300    } else {
7301      ()
7302    }
7303    o_prot.write_field_stop()?;
7304    o_prot.write_struct_end()
7305  }
7306  fn ok_or(self) -> thrift::Result<bool> {
7307    if self.error1.is_some() {
7308      Err(thrift::Error::User(Box::new(self.error1.unwrap())))
7309    } else if self.result_value.is_some() {
7310      Ok(self.result_value.unwrap())
7311    } else {
7312      Err(
7313        thrift::Error::Application(
7314          ApplicationError::new(
7315            ApplicationErrorKind::MissingResult,
7316            "no result received for SettingSystemServiceRemoveBluetoothDevice"
7317          )
7318        )
7319      )
7320    }
7321  }
7322}
7323